Comments (13)
@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.
@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.
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.
Now it has storage! Please give it a try!
from ex_doc.
@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.
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.
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.
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.
I guess making the sidebar width configurable is probably the best option here. As it generally solves the problem.
from ex_doc.
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.
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.
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.
from ex_doc.
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)
- Empty source AST HOT 6
- Heading with content `tooltip` is not visible HOT 1
- Truly light theme HOT 5
- Admonition does not work in Erlang @doc blocks HOT 8
- New ex_doc release
- Support blockquote highlighting for GitHub Markdown HOT 1
- Add syntax highlighting for JavaScript/TypeScript HOT 3
- links for otp apps' (gen_tcp/ssl) types use old format HOT 4
- Bullet list not displayed correctly HOT 4
- Better integrate Erlang/Elixir
- Mobile: Search bar is too sensitive to page scroll HOT 2
- Warn about docs for out-of-date versions HOT 1
- Odd Gradient with mobile breakpoint in light mode HOT 1
- feature request: Link to Anchor callback/function auto-links like with Modules and Extra pages
- Possible error when deprecating binaries path for assets HOT 4
- Failure to render links for specs when using Elixir 1.17 or later HOT 1
- No support for debug_info keys? HOT 1
- Search page shows no results even though autocomplete finds them HOT 1
- Signs in integer literals trigger warning HOT 3
- More explicit warning when type not visible because module is not visible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ex_doc.