Closed Bug 1288487 Opened 8 years ago Closed 8 years ago

Pin Switch Tree menu

Categories

(Webtools Graveyard :: DXR, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: erik, Unassigned)

Details

(Whiteboard: css easy)

The Switch Tree menu shouldn't move as you scroll. This way, you'll be able to be partway through a file and switch to the same file in a similar, parallel tree (like moz-central vs. moz-beta). If you have a line highlighted, you'll even end up at the correct line, IIRC.

This may necessitate other minor visual changes as well, like pinning the breadcrumbs as well and making sure scrolling down doesn't caused the main page content to collide with them. The breadcrumbs and Switch Tree menu should probably form a secondary immovable bar below the main search panel.
Err, but the "Switch Tree" menu doesn't fit in my viewport!

(In fact, I was just wondering if anyone had complained about the fact that this menu seems determined to disappear whenever the scrollbar is activated, and was hoping that "Pin Switch Tree menu" represented such a complaint.)

Though I guess that wouldn't be a problem if the menu were independently scrollable.
Note: I'm not sure if my issue happens in files, it might only happen on directory listings.
I've been taking a look at this. I can add a pinned/immovable bar containing the breadcrumb and Switch Tree menu. These changes could have additional side effects and I'm not sure what the desired behavior is. 

I'm unclear on what should happen if a user searches: 
- In the search results view, should the Switch Tree menu still be pinned?
- If it should be pinned, should the top of the search results view (where it says e.g. "8 results from the code2 tree:", and located at the same position as the breadcrumb) also be pinned?
- I'm assuming if the user is viewing a file/folder and then does a search, the pinned bar with the breadcrumb should disappear and be replaced by whatever the answer to the previous questions are. Correct?
Flags: needinfo?(erik)
Thanks, both of you, for jumping in on this! Let me try to answer some of your questions....

> Err, but the "Switch Tree" menu doesn't fit in my viewport!

At the least, we should make the menu independently scrollable, which should be possible with just CSS. If you want to get fancy, I always thought we'd add a type-to-filter field to the top of that menu when it got long.

> In the search results view, should the Switch Tree menu still be pinned?

Yes. Let's be consistent and pin it everywhere, unless there's a good reason not to.

> If it should be pinned, should the top of the search results view (where it says e.g. "8 results from the code2 tree:", and located at the same position as the breadcrumb) also be pinned?

Probably. The breadcrumbs in dir listings should be pinned, so pinning the "8 results" text that lives in the same location would probably result in the least confusion.

> I'm assuming if the user is viewing a file/folder and then does a search, the pinned bar with the breadcrumb should disappear and be replaced by whatever the answer to the previous questions are. Correct?

Yes.
Flags: needinfo?(erik)
Commit pushed to master at https://github.com/mozilla/dxr

https://github.com/mozilla/dxr/commit/ae8362d03bd9597e522e7c0cad0f1a6845d2678b
Merge pinning of the Switch Tree menu and breadcrumbs. Fixes bug 1288487.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.