Coder Social home page Coder Social logo

Comments (13)

josevalim avatar josevalim commented on July 17, 2024 2

@frankdugan3 I am pushing an option to resize the sidebar but a PR that adds another breakpoint for larger screens is definitely welcome.

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024 1

@yasoob a pull request would be welcome.

@zachdaniel there is a feature in ExDoc that allows you to collapse namespaces for cases like yours. :)

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024 1

Actually, the breakpoint won't play well with the resizing. 🤔

Perhaps the best option is to store the sidebar width. I will explore this.

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024 1

Now it has storage! Please give it a try!

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024

@yasoob actually, there is an issue in doing that. Screen readers will read both title and content, reading the same content twice. So we probably need a solution that does not rely on title=....

from ex_doc.

yasoob avatar yasoob commented on July 17, 2024

I am researching if there is a way to use title and make screen readers discard its value. Just thinking out loud here as I am not an accessibility expert. How about setting the aria-label to an empty string and then setting title to the link name? aria-label takes precedence over title according to my research and this way we can get around the issue you mentioned.

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024

Good call. I did some tests though and always having the title makes it a bit uncomfortable to navigate. Maybe we can add the title only if after a certain number of characters? Or we figure out a way to remove the elipses on mouse-over.

from ex_doc.

yasoob avatar yasoob commented on July 17, 2024

Regarding removing the elipses on mouse-over, are you envisioning an expanding sidebar when the elipses are removed? I am not sure how I feel about the layout shift that this would cause. Or if you are thinking about the sidebar being scrollable horizontally once the elipses are removed, that would not work because I don't know how the user can scroll horizontally while hovering over the link.

I am personally in favor of the first suggestion you put forward a.k.a putting the title only after certain number of characters. That seems like a decent trade-off. However, I am not sure how big of a fan you are of the inconsistency this could potentially cause (some links having title attribute and some not). I am in favor of this solution but it is your call now 😄

from ex_doc.

josevalim avatar josevalim commented on July 17, 2024

I guess making the sidebar width configurable is probably the best option here. As it generally solves the problem.

from ex_doc.

yasoob avatar yasoob commented on July 17, 2024

That is also a good option. We already have the settings modal. Maybe add this option there? However, the discoverability of that feature would be a bit questionable for those who are not aware of the settings modal.

from ex_doc.

zachdaniel avatar zachdaniel commented on July 17, 2024

I will make an issue to collapse module names in our hex packages, but it does seem like some kind of "universal" solution would be a good idea. Like being able to click and drag the sidebar to make more room if you're browsing the list, or something along those lines. Thanks for the heads up :)

from ex_doc.

frankdugan3 avatar frankdugan3 commented on July 17, 2024

Or adding a responsive breakpoint so that sidebar gets wider on larger screens. Even on 1080p, the body max size leaves substantial unused space while truncating the menu.

2024-01-10T16:09:33,998240552-06:00

from ex_doc.

zachdaniel avatar zachdaniel commented on July 17, 2024

I'll still use the namespacing feature, but I appreciate this change, there are plenty of places including outside of Ash where I've encountered this, and have definitely had room to make the sidebar bigger.

from ex_doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.