Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Creating or deleting file does not update folder's "collapsed" status. #702

Closed

Description

@phyllisstein
Steps to Reproduce
  1. Enable the "Collapse directories" setting in the tree-view package.
  2. Create a nested directory---for instance, foo/bar.
  3. Create a new file under foo---for instance, baz.md.
  4. Reload the window.
  5. Delete baz.md.
Expected Behavior

The folders should "expand" from their collapsed state when a file is created, making foo/baz.md visible in the tree. Deleting foo/baz.md should collapse the folders again, now that foo has no children.

Actual Behavior

When creating a single child, it remains hidden and its parent remains collapsed until the window is reloaded. When deleting a single child, the parent remains expanded until the window is reloaded.

Demo

collapse-demo

Activity

  1. dingus9 commented on Feb 23, 2016

    @dingus9

    I was going to report this... I guess I don't have to. I can verify that this is an issue as of tree-view#0.198.1 Same steps to reproduce as above with the addition of renaming a file into another sub directory also does not trigger a refresh.

  2. miguelcg commented on Dec 31, 2016

    @miguelcg
    Contributor

    This might be fixed with #1008

  3. winstliu commented on Dec 31, 2016

    @winstliu
    Contributor

    I believe that only covers the deletion case, not the creation case.

  4. miguelcg commented on Dec 31, 2016

    @miguelcg
    Contributor

    I'll check it and prepare a PR when I have some time :)
    Even if it's solved by #1008 it may be worthy to have a test covering this scenario.
    Happy new year!

  5. miguelcg commented on Jan 2, 2017

    @miguelcg
    Contributor

    @50Wliu PR ready to review! #1012

  6. lee-dohm commented on Jan 4, 2017

    @lee-dohm
    Contributor

    This is fixed in #1012. There are some alternative repro steps where it still occurs, but I'll file a new issue for those since the primary use case (creating and deleting files/directories through the tree-view itself) is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions