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

docs: inject dark mode #1100

Merged
merged 7 commits into from
Aug 8, 2023
Merged

docs: inject dark mode #1100

merged 7 commits into from
Aug 8, 2023

Conversation

hrittikhere
Copy link
Member

@hrittikhere hrittikhere commented Jun 26, 2023

What issue type does this pull request address? (keep at least one, remove the others)

/kind documentation

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
resolves #

Adds the dark mode to the documentation. The provided code snippet describes a color mode configuration with three properties. The defaultMode is set to 'light', indicating that the default color mode is set to a light theme. The disableSwitch property is set to false, allowing users to switch between different color modes. The respectPrefersColorScheme property is set to true, which means the color mode will respect the user's preference specified in their operating system or browser settings. Overall, this configuration ensures that the default color mode is light, users can switch between color modes, and the color mode will adapt to the user's preferred color scheme if specified.

image

Signed-off-by: Hrittik Roy <[email protected]>
@hrittikhere
Copy link
Member Author

@richburroughs felt this is important. What do you think?

@hrittikhere hrittikhere changed the title Add dark mode to docs docs: inject dark mode Jun 26, 2023
@richburroughs
Copy link
Contributor

Hey yes I think it's great to honor people's local settings for dark/light mode :)

@richburroughs
Copy link
Contributor

Oh, @hrittikhere, I forgot to ask, were you able to test this? Or does that still need to get done?

@hrittikhere
Copy link
Member Author

Hey @richburroughs
It works mostly fine: https://0fa2-20-10-129-115.ngrok-free.app/docs/what-are-virtual-clusters

However, in this page and few in the Full Guide section there's a white gap: https://0fa2-20-10-129-115.ngrok-free.app/docs/getting-started/deployment

image

@hrittikhere
Copy link
Member Author

Pulling down the server. I reccomend you test it locally once :)

@ishankhare07
Copy link
Contributor

Hey @hrittikhere , thanks for this PR. We can consider merging this if you can fix the existing "white gap" issue that you pointed above.

@hrittikhere
Copy link
Member Author

@ishankhare07 I was away on a vaccination, so I didn't get time to look into it. Thanks for the suggestion, and I have added the change, and it looks good. LMK what you think:

CC: @richburroughs

image

@hrittikhere
Copy link
Member Author

Hey @ishankhare07, I'm just wondering about the merge pipeline. Can you also let me know about the deployment process after the merge is complete?

Copy link
Member

@ThomasK33 ThomasK33 left a comment

Choose a reason for hiding this comment

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

Hey @hrittikhere 👋 ,

I just tested your changes in Safari on macOS Venture 13.5, and the scroll bar is white + the "Join us on Slack" and GitHub buttons in the top bar do not adjust to the color scheme and are hard to see, as marked in the screenshot.

Screenshot 2023-08-08 at 13 52 17

Regarding the scroll bar, you might have to look into either ::-webkit-scrollbar or color-scheme: light dark (source: ionic-team/ionic-framework#20921 (comment) + https://dev.to/okikio/psa-add-dark-mode-to-your-sites-or-at-least-let-the-browsers-do-it-for-you-18hi)


If those two changes are in, this PR should be ready.

@ThomasK33
Copy link
Member

Can you also let me know about the deployment process after the merge is complete?

Once the docs get merged onto the main branch, a GitHub action is triggered, which builds the docs and then deploys the build output to Netlify, as that's where the docs are hosted.

@hrittikhere
Copy link
Member Author

hrittikhere commented Aug 8, 2023

Thanks for the suggestion @ThomasK33 :) I have gone through them, and now they look good on my end. Do you mind testing and letting me know how do they look on your side?

While hovering:
image

While not hovering over scroll bar:
image

Copy link
Member

@ThomasK33 ThomasK33 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 for the quick fixes

@ThomasK33 ThomasK33 merged commit 7ae36f4 into loft-sh:main Aug 8, 2023
1 check passed
@hrittikhere
Copy link
Member Author

Welcome and thanks for the help 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants