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(v2): properly set dark mode logo on build-time prerendering #2324

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Feb 26, 2020

Motivation

Resolve #2308.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

The same as for #2261 but in addition to build the website and see that the logos are displayed correctly.

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: bug fix This PR fixes a bug in a past release. label Feb 26, 2020
@lex111 lex111 requested a review from yangshun February 26, 2020 00:43
@lex111 lex111 requested a review from wgao19 as a code owner February 26, 2020 00:43
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Feb 26, 2020
@lex111 lex111 changed the title fix(v2) set dark logo on SSR properly fix(v2): set dark logo on SSR properly Feb 26, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit ec182a5

https://deploy-preview-2324--docusaurus-2.netlify.com

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

This triggers a remounting of the component right? I think it's fine but I'm wondering if we should create dark-mode aware Image components, possibly building on top of IdealImage. That would be useful for logo and other places as well (index page, documentation).

I envision it to work like:

<AwesomeImage src="..." darkModeSrc="..." />

and we switch the image path depending on the current mode.

@yangshun yangshun changed the title fix(v2): set dark logo on SSR properly fix(v2): properly set dark mode logo on build-time prerendering Feb 26, 2020
@lex111
Copy link
Contributor Author

lex111 commented Feb 26, 2020

Probably yes, we need to think in this direction.

@yangshun yangshun merged commit 6670c53 into master Feb 27, 2020
@yangshun yangshun deleted the fix-dark-mode-logo branch February 27, 2020 02:16
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: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v2] Bug with dark mode logo
4 participants