Ex_doc: Clicking on the Item in Sidebar should open top by default

Created on 12 Sep 2018  路  5Comments  路  Source: elixir-lang/ex_doc

The current behavior is not a good user experience. Having to open the sidebar menu and then select top is really redundant, and after some time annoying.

I have read the previous issues and found that the community has mixed feelings about this, but it would be great if we could work out a solution.

HTML Bug Discussion

Most helpful comment

I pushed a feature were we now have a "goto" arrow close to the sidebar root entries. Clicking on the arrow sends you directly to that page. This arrow appears only on mouse over to not pollute the UI:

image

Clicking on the menu still expands up the menu. We also fixed #953 to consistently expand the menu.

All 5 comments

frame 5

Clicking on the title should go to the top by default and open up the sidebar, and when the + is clicked it should stay on the current page and open up the sidebar

I actually like your proposal a lot. We always thought about adding something to the beginning of each item but at the end provides a better user experience. The issue though is that it conflicts with #834, so we need a solution that works nicely in both cases.

I very like @aswinmohanme 's idea.

Another issue I have with our current menu (similar to #953 ) is that when a module (or another page) has content, the default way to navigate to this page is to click "Top", which uses an anchor link #content. After refreshing a page that was opened this way (for example, after closing the browser and restoring pages from previous session) the browser scroll position wouldn't be preserved.

I would really like if the default way of opening a page wouldn't use anchor links.

I pushed a feature were we now have a "goto" arrow close to the sidebar root entries. Clicking on the arrow sends you directly to that page. This arrow appears only on mouse over to not pollute the UI:

image

Clicking on the menu still expands up the menu. We also fixed #953 to consistently expand the menu.

Here is a live page http://hexdocs.pm/ex_doc with the latest changes.

Was this page helpful?
0 / 5 - 0 ratings