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

fix(theme-classic): fixed wrong cursor on dropdown menu in navbar, when window is small #9398

Merged
merged 4 commits into from
Nov 15, 2023

Conversation

Shreesh09
Copy link
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Fixed the issue where wrong cursor was displaying when hovering over any dropdown menu present in the navbar, when the screen size is small

Test Plan

Incorrect cursor:
without-fix

Correct cursor:
with-fix

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

#8485

@facebook-github-bot
Copy link
Contributor

Hi @Shreesh09!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@netlify
Copy link

netlify bot commented Oct 12, 2023

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit b02d2fd
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/65550f97d459350008740eee
😎 Deploy Preview https://deploy-preview-9398--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 68 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/installation 🟠 68 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/category/getting-started 🟠 76 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog 🟠 74 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 64 🟢 97 🟢 100 🟢 100 🟠 89 Report
/blog/tags/release 🟠 73 🟢 100 🟢 100 🟠 80 🟠 89 Report
/blog/tags 🟠 77 🟢 100 🟢 100 🟢 90 🟠 89 Report

@Josh-Cena
Copy link
Collaborator

Please use CSS instead. This link is not a link, so it should not have an href.

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 12, 2023
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@Shreesh09
Copy link
Contributor Author

Hello @Josh-Cena, I have implemented the changes. Could you please take a moment to review them? Thank you.

@@ -137,7 +138,7 @@ function DropdownNavbarItemMobile({

return (
<li
className={clsx('menu__list-item', {
className={clsx(styles.dropdownNavbarItemMobile, 'menu__list-item', {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called dropdownNavbarItemMobile? It's used on desktop, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, this is only for mobile :)

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would need to format your code. You can copy this file into https://prettier.io/playground/ if you don't have a local clone. Otherwise, this should be good.

@Shreesh09
Copy link
Contributor Author

I believe the code is properly formatted because after copy pasting from prettier and then commiting the code remains unchanged

@Josh-Cena
Copy link
Collaborator

I see. You are right.

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks :)

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, instead of applying this class to the <li>, we should apply it to the inner <NavbarNavLink>, because that's the one that should theoretically be a pointer, should there be an href. Do you want to do this change? I will do it in the upcoming days otherwise.

@Shreesh09
Copy link
Contributor Author

Sure, I will make the changes.

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the timely responses!

@Josh-Cena Josh-Cena merged commit 6f70b27 into facebook:main Nov 15, 2023
3 checks passed
@slorber slorber added the to backport This PR is planned to be backported to a stable version of Docusaurus label Nov 30, 2023
slorber pushed a commit that referenced this pull request Nov 30, 2023
Copy link

argos-ci bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 🧿 Changes detected (Review) 1 change Nov 30, 2023, 6:56 PM

slorber added a commit that referenced this pull request Nov 30, 2023
Co-authored-by: Joshua Chen <[email protected]>
Co-authored-by: Joey Clover <[email protected]>
Co-authored-by: reece-white <[email protected]>
Co-authored-by: Shreesh Nautiyal <[email protected]>
Co-authored-by: Nick Gerleman <[email protected]>
Co-authored-by: Chongyi Zheng <[email protected]>
Co-authored-by: MCR Studio <[email protected]>
fix(create-docusaurus): fix readme docusaurus 2 ref (#9487)
fix(theme): fix firefox CSS :has() support bug (#9530)
fix(theme): docs html sidebar items should always be visible (#9531)
fix: v3 admonitions should support v2 title syntax for nested admonitions (#9535)
fix(theme-classic): fixed wrong cursor on dropdown menu in navbar, when window is small (#9398)
fix(theme): upgrade prism-react-renderer, fix html script and style tag highlighting (#9567)
fix: add v2 retrocompatible support for quoted admonitions (#9570)
@slorber slorber added backported This PR has been backported to a stable version of Docusaurus and removed to backport This PR is planned to be backported to a stable version of Docusaurus labels Nov 30, 2023
slorber added a commit that referenced this pull request Jan 26, 2024
Co-authored-by: Joshua Chen <[email protected]>
Co-authored-by: Joey Clover <[email protected]>
Co-authored-by: reece-white <[email protected]>
Co-authored-by: Shreesh Nautiyal <[email protected]>
Co-authored-by: Nick Gerleman <[email protected]>
Co-authored-by: Chongyi Zheng <[email protected]>
Co-authored-by: MCR Studio <[email protected]>
Co-authored-by: sebastienlorber <[email protected]>
Co-authored-by: Sébastien Lorber <[email protected]>
Co-authored-by: Ivan Mar (sOkam!) <[email protected]>
Co-authored-by: c0h1b4 <[email protected]>
Co-authored-by: Janessa Garrow <[email protected]>
Co-authored-by: ozaki <[email protected]>
Co-authored-by: axmmisaka <[email protected]>
Co-authored-by: Tatsunori Uchino <[email protected]>
Co-authored-by: Simen Bekkhus <[email protected]>
Co-authored-by: Sanjaiyan Parthipan <[email protected]>
Co-authored-by: Jack Robson <[email protected]>
Co-authored-by: dawei-wang <[email protected]>
Co-authored-by: eitsupi <[email protected]>
fix(create-docusaurus): fix readme docusaurus 2 ref (#9487)
fix(theme): fix firefox CSS :has() support bug (#9530)
fix(theme): docs html sidebar items should always be visible (#9531)
fix: v3 admonitions should support v2 title syntax for nested admonitions (#9535)
fix(theme-classic): fixed wrong cursor on dropdown menu in navbar, when window is small (#9398)
fix(theme): upgrade prism-react-renderer, fix html script and style tag highlighting (#9567)
fix: add v2 retrocompatible support for quoted admonitions (#9570)
fix(i18n): complete translations for theme-common.json Brazilian Portuguese (pt-BR) (#9477)
fix(content-blog): add baseUrl for author.image_url (#9581)
fix(type-aliases): add `title` prop for imported inline SVG React components (#9612)
fix(utils): Markdown link replacement with <> but no spaces (#9617)
fix(live-codeblock): stabilize react-live transformCode callback, fix editor/preview desync (#9631)
fix(cli): output help when no conventional config + no subcommand (#9648)
fix CI job (#9604)
fix Lint Autofix workflow (#9632)
fix(pwa-plugin): upgrade workbox (#9668)
fix(create-docusaurus): fix init template code blocks, and little improvements (#9696)
fix(theme): allow empty code blocks and live playgrounds (#9704)
fix(core): various broken anchor link fixes (#9732)
fix: remove old useless mdx typedefs (#9733)
fix(theme-common): fix missing code block MagicComments style in Visual Basic (.NET) 16 (#9727)
fix(core): conditionally include `hostname` parameter when using… (#9407)
fix(create-docusaurus): fix typo in init template sample docs (#9783)
fix(mdx-loader): allow spaces before `mdx-code-block` info string (#9776)
fix(core): links with target "_blank" should no be checked by the broken link checker (#9788)
fix(core): broken links optimization behaves differently than non-optimized logic (#9791)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR has been backported to a stable version of Docusaurus CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants