Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar menu dropdown arrow size varies on long width lines #4565

Closed
duanwilliam opened this issue Apr 3, 2021 · 1 comment · Fixed by facebookincubator/infima#106 or #4627
Closed
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@duanwilliam
Copy link
Contributor

🐛 Bug Report

Lines whose length are close to but do not exceed the maximum length for a sidebar menu item (classic theme; don't know if it affects others) affect the location and size of the dropdown arrow.

Encountered while building pure CSS sidebar menu, of which, whoever it's built by, will ideally not have this issue so it may not necessarily be the highest priority.

Have you read the Contributing Guidelines on issues?

yes.

To Reproduce

  1. Create a new Docusaurus site using the classic theme.
    npx @docusaurus/init@latest init [name] classic
  2. Add sidebar categories with labels close to the length of sidebar item max length to sidebars.js. For example,
module.exports = {
  docs: [
    {
      items: [
+       {
+         'Normal Category Name': ['thank-you'],
+         'Long Category Name ...............................': ['thank-you'],
+         'Longer Category Name ...............................................': ['thank-you'],
+         'Even Longer Category Name ............................................................': ['thank-you'],
+         'Even Longer Category Name ....................................... ............................................': ['thank-you'],
+         'A Very Very Very Very Very Long Category Name': ['thank-you'],
+       },
        // ...
  1. Run the site and check the sidebar.

Expected behavior

The sidebar dropdown arrow is a constant size, at the very least among items at the same indentation level.

Actual Behavior

sidebar

The sidebar arrow sizes can very in size and location even among items on the same indentation level.

Your Environment

  • Docusaurus version used: 2.0.0-alpha.72
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Chrome 89.0.4389.90, Node.js 14.15.0
  • Operating system and version (desktop or mobile):
@duanwilliam duanwilliam added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Apr 3, 2021
@duanwilliam duanwilliam changed the title Sidebar menu dropdown arrow breaks on long width lines Sidebar menu dropdown arrow size varies on long width lines Apr 3, 2021
@lex111 lex111 removed the status: needs triage This issue has not been triaged by maintainers label Apr 10, 2021
@lex111
Copy link
Contributor

lex111 commented Apr 12, 2021

Fixed in facebookincubator/infima#106 and during next Infima upgrading, we will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
2 participants