-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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): only set classname on ul elements if they have an existing class #9099
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slorber
changed the title
fix: only set classname on ul elements if they have an existing class. closes #9098
fix(theme): only set classname on ul elements if they have an existing class
Jun 23, 2023
7 tasks
slorber
reviewed
Jun 23, 2023
packages/docusaurus-theme-classic/src/theme/MDXComponents/Ul/index.tsx
Outdated
Show resolved
Hide resolved
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
slorber
approved these changes
Jun 30, 2023
function transformUlClassName(className?: string): string { | ||
function transformUlClassName(className?: string): string | undefined { | ||
// Fix https://github.com/facebook/docusaurus/issues/9098 | ||
if (typeof className === 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using typeof because if props.className is '' we probably still want to have class=''
in the final html, although it's a weird edge-case
3 tasks
slorber
added
the
to backport
This PR is planned to be backported to a stable version of Docusaurus
label
Jun 30, 2023
slorber
added a commit
that referenced
this pull request
Sep 20, 2023
…g class (#9099) Co-authored-by: Sébastien Lorber <[email protected]> Co-authored-by: sebastienlorber <[email protected]>
slorber
added a commit
that referenced
this pull request
Sep 20, 2023
…lease (#9324) Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: sebastienlorber <[email protected]> Co-authored-by: Sébastien Lorber <[email protected]> Co-authored-by: Ori Shalom <[email protected]> Co-authored-by: Mikey O'Toole <[email protected]> Co-authored-by: TheCatLady <[email protected]> fix flaky screenshots, add html data-has-hydrated attribute (#9256) fix(theme-common): ThemedComponent should display something when JS is disabled (#9243) fix(theme): canonical url should be not change after hydration if url accessed with/without trailing slash (#9130) fix(theme): only set classname on ul elements if they have an existing class (#9099) fix(content-docs): sidebar generator should return customProps for doc items (#9107)
slorber
added
backported
This PR has been backported to a stable version of Docusaurus
and removed
pr: bug fix
This PR fixes a bug in a past release.
labels
Sep 21, 2023
slorber
removed
the
to backport
This PR is planned to be backported to a stable version of Docusaurus
label
Nov 10, 2023
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pre-flight checklist
Motivation
Fix #9098
Test Plan
Test links
Deploy preview: https://deploy-preview-9099--docusaurus-2.netlify.app/
Related issues/PRs