Replies: 3 comments 2 replies
-
As always, if what the default theme provides is not good enough, you can swizzle. We are open to improving things, but what do you expect us to do? The best would be to have someone in the community (like you) swizzle our sidebar and show us what a good UX would look like. Then we can learn the lessons on community sites and try to port them to our official theme in a non-disruptive way. Does this improved UX always makes sense, or is it only relevant for API refs with very long labels and no clear way to break lines properly? What kind of API do we need to support this? |
Beta Was this translation helpful? Give feedback.
-
I tried to add the following to my custom.css: .theme-doc-sidebar-container {
cursor: ew-resize;
resize: horizontal;
overflow: hidden
} The definitions are considered, since the cursor changes when hovering over the separating line, but trying to move the line fails, probably some other properties keep the width to a certain value. Also the It looks a bit more complicated than expected. |
Beta Was this translation helpful? Give feedback.
-
I'm revising my proposal. The sidebar keeps the actual width, and the button remains on the right, but the label text is rendered truncated, i.e. via the right CSS, if the text is longer than the available space, it is clipped, preferably with an ellipsis Optionally, the sidebar is resizable, to allow the user to see the clipped text. I think that neither of these changes break compatibility with existing sites, if the labels are short they do not get clipped, and if the user does not grab the separating line, the resizable sidebar is not noticeable. I did some experimentation with CSS, and I managed to prevent it rendering the button on the next line, and to clip the text, but my knowledge of CSS is not good enough for a full detailed proposal. :-( |
Beta Was this translation helpful? Give feedback.
-
I have a C++ project and the reference site is generated by Doxygen. 'm migrating it to Docusaurus, and I encountered an issue with the way the sidebar is rendered.
The original page looks like this:
As it can be seen, the full class names are pretty long, and they do not fit the sidebar. But this is not a problem, since the sidebar is resizeable and I can make it wide enough for the names to fit:
A similar content rendered by Docusaurus looks like this:
The aesthetics are quite debatable, to put it mildly.
First, the sidebar is not resizable, and some names, like the two derived classes at the bottom, cannot be seen at all.
But even more displeasing is the way collapsable items are rendered, wrapped and with the button on the left, not on the right as for regular items.
As usual for Docusaurus sites, the rest of the pages looks quite nice, but for the API Reference sidebar... I'm afraid that the current implementation is not satisfactory... :-(
Any suggestions how to proceed?
Beta Was this translation helpful? Give feedback.
All reactions