Closed Bug 1060041 Opened 5 years ago Closed 5 years ago

Project Editor: Do not expand folders in project tree by default

Categories

(DevTools :: WebIDE, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 34

People

(Reporter: canuckistani, Assigned: bgrins)

References

Details

Attachments

(1 file)

As a developer working with a large codebase with lots of images, I tend to only look at certain parts of the tree in most cases, so I would like webide to remember the state of the tree and re-set that state when I open the project next. 

Currently the tree is always expanded which does not play nicely with a lot of our examples ( eg the Boilerplate example or the angular one ) because those examples ship with many many files, most of which probably don't need to be accessed.
Right now we don't have any persistence inside the project editor - there was IDB in the initial prototype to keep track of the last loaded project but it wasn't needed for the WebIDE so that was taken out.

Even with the WebIDE providing the root path, we will still need to store metadata about each resource at a path to keep track of the state of folders in the tree.  Maybe in IndexedDB or in the addon SDK simple-storage module?

Can you think of anything else that we may want to persist across sessions for the project editor besides folder state?
(In reply to Brian Grinstead [:bgrins] from comment #1)
> Right now we don't have any persistence inside the project editor - there
> was IDB in the initial prototype to keep track of the last loaded project
> but it wasn't needed for the WebIDE so that was taken out.
> 
> Even with the WebIDE providing the root path, we will still need to store
> metadata about each resource at a path to keep track of the state of folders
> in the tree.  Maybe in IndexedDB or in the addon SDK simple-storage module?
> 
> Can you think of anything else that we may want to persist across sessions
> for the project editor besides folder state?

I have two thoughts about this:

* we will eventually start storing per-project settings, sure. Can't think of any right now that involve features that exist, but for example if we had a 'test runner' feature, the project would need to remember project-specific test args. 

* for now it would go a long way (for me) to initialize the project tree as collapsed - less work opening the few things I do want to look at than closing everything else. YMMV?
(In reply to Jeff Griffiths (:canuckistani) from comment #2)
> * for now it would go a long way (for me) to initialize the project tree as
> collapsed - less work opening the few things I do want to look at than
> closing everything else. YMMV?

I agree, we should just show first level contents of the app initially (assuming we go this simpler route for now).
Going to just collapse them by default, since that seems like it will be generally less annoying of an issue.  Will file a follow up for persisting state.  Pushed to try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=1b39a7cb9b51
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #8481295 - Flags: review?(jryans)
Summary: Remember the state of the tree per-project → Project Editor: Do not expand folders in project tree by default
Blocks: 1060362
Comment on attachment 8481295 [details] [diff] [review]
tree-collapsed.patch

Review of attachment 8481295 [details] [diff] [review]:
-----------------------------------------------------------------

Great, this is much nicer! :D
Attachment #8481295 - Flags: review?(jryans) → review+
(In reply to Brian Grinstead [:bgrins] from comment #4)
> Created attachment 8481295 [details] [diff] [review]
> tree-collapsed.patch
> 
> Going to just collapse them by default, since that seems like it will be
> generally less annoying of an issue.  Will file a follow up for persisting
> state.  Pushed to try:
> https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=1b39a7cb9b51

awesome :)
Keywords: checkin-needed
Version: 16 Branch → Trunk
https://hg.mozilla.org/mozilla-central/rev/c84a9d0486c0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Verified using latest Aurora 34.0a2 2014-10-09 (under all platforms) that the folders in the project tree are not expanded by default anymore.
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.