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

chore: upgrade Infima to alpha.34 #5666

Merged
merged 1 commit into from
Oct 14, 2021
Merged

chore: upgrade Infima to alpha.34 #5666

merged 1 commit into from
Oct 14, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Oct 8, 2021

Motivation

Of the important changes, navbar logo is wrapped in separate div.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Preview

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

@lex111 lex111 added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Oct 8, 2021
@lex111 lex111 requested a review from slorber as a code owner October 8, 2021 14:46
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

Size Change: +56 B (0%)

Total Size: 837 kB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/globalData.json 38.3 kB 0 B
website/build/assets/css/styles.********.css 93.9 kB +20 B (0%)
website/build/assets/js/main.********.js 421 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 67 kB +6 B (0%)
website/build/blog/index.html 38.1 kB +6 B (0%)
website/build/docs/index.html 45 kB +3 B (0%)
website/build/docs/installation/index.html 53.4 kB +3 B (0%)
website/build/index.html 30.8 kB +6 B (0%)
website/build/tests/docs/index.html 26.2 kB +6 B (0%)
website/build/tests/docs/standalone/index.html 22.9 kB +6 B (0%)

compressed-size-action

@netlify
Copy link

netlify bot commented Oct 8, 2021

✔️ [V2]

🔨 Explore the source changes: 9586fa7

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61605af0fd8eb20008217db8

😎 Browse the preview: https://deploy-preview-5666--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Oct 8, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 96
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5666--docusaurus-2.netlify.app/

(imageClassName ? (
<div className={imageClassName}>{themedImage}</div>
) : (
<>{themedImage}</>
Copy link
Collaborator

@slorber slorber Oct 13, 2021

Choose a reason for hiding this comment

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

do we really need to handle this case? we don't have it in our codebase

I think this component is quite messy and it's only used twice, for mobile/desktop sidebars with exact same props:

          <Logo
            className="navbar__brand"
            imageClassName="navbar__logo"
            titleClassName="navbar__title"
          />

What about replacing this with <NavbarLogo> and apply classes inside of it?

I don't think this component is meant to be used in any other place so I'd rather make the coupling to navbar more explicit

(this is technically a theme breaking but I think we should do it. Can be in another PR though)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this component has another use case:

{hideOnScroll && <Logo tabIndex={-1} className={styles.sidebarLogo} />}

Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks, didn't see it

still, not a fan at all of adding/removing the extra div when adding/removing the imageClassName => this is not explicit and not an expected side-effect of using this prop: it should just apply a className or not

Also, the 3 places where this comp is used look exactly the same. I don't really understand why this DocSidebar thing can't use the same classes as the navbar.

Going to merge now but I think there's some additional cleanup we could do on this comp

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

LGTM, didn't see any issue apart some useless code in Logo, but cleanup can be done in a separate PR

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 13, 2021
@slorber slorber merged commit 54015de into main Oct 14, 2021
@slorber slorber deleted the lex111/infima-34 branch October 14, 2021 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants