docusaurus: Long labels in the sidebar do not display correctly
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I’m using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
I have sidebar items auto generated with @grapql-markdown Some of the labels in the sidebar are very long and cannot be fully seen
It would be very helpful for the long labels to be truncated with an ellipse and a tooltip added so the full label can be seen on hover
Reproducible demo
No response
Steps to reproduce
Create a new Docusaurus site Create content which has very long labels in the sidebar
The labels are hidden behind the page view
Expected behavior
Would like to see the labels truncated with an ellipse and a tooltip displayed on hover of the label
Actual behavior
The long labels in the sidebar are hidden by the page
Your environment
- Public source code: none
- Public site URL: none
- Docusaurus version used: latest
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Edge
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 10
Self-service
- I’d be willing to fix this bug myself.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 16
cc @pwizla I remember seeing Strapi docs also truncating sidebar labels, maybe that could serve as an inspiration for the CSS to use to solve this
https://docs.strapi.io/dev-docs/api/document-service
Thank you so much for sharing that. 😄