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

Dark Mode for the status site #251

Closed

Conversation

brandong512
Copy link

@brandong512 brandong512 commented Feb 10, 2022

  • Cookies Implemented
  • Sass theming system built
  • Toggle button at the top (day/night) according to spec

@akshay1502
@rohan09-raj
@whyDontI

dark mode for status site

Not sure why the long chain of commits, but I'm open to learning more about it/correcting it

Copy link
Contributor

@rohan09-raj rohan09-raj left a comment

Choose a reason for hiding this comment

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

@brandong512 Please check why the tests/checks are failing by clicking on the details
image

@@ -114,6 +124,8 @@ const Index: FC = () => {
}, [isLoading, response]);

useEffect(() => {
console.log("in use effect: ", checkThemeHistory(document.cookie, query))
Copy link
Contributor

Choose a reason for hiding this comment

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

Please avoid adding console statements to production

Copy link
Author

Choose a reason for hiding this comment

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

No problem I'll go ahead and remove that

Comment on lines 105 to 108
const themeSetter = () => {
document.cookie = setCookie(!mainDarkMode);
setMainDarkMode(!mainDarkMode);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We can move this function to helper functions, as the same function is used in multiple pages. What do you think?

Copy link
Author

Choose a reason for hiding this comment

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

I was actually struggling to do something like this. The issue here is that document.cookie is a global argument that relies on the component itself loading. If I try to put this argument in a helper function and it's called immediately before the DOM loads, then an error will show saying document doesn't exist.

Any suggestions?

Copy link
Contributor

@shubham-y shubham-y left a comment

Choose a reason for hiding this comment

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

Good work 😃
Requesting some changes

@shubham-y
Copy link
Contributor

shubham-y commented Mar 11, 2022

@brandong512 Please add the dark mode feature changes for Availability panel also which is currently behind a feature flag(dev = true)

Copy link
Contributor

@shubham-y shubham-y left a comment

Choose a reason for hiding this comment

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

The background color of toastify modal does not change after switching from dark mode to light mode. Please look into this issue
image

Copy link
Contributor

@shubham-y shubham-y left a comment

Choose a reason for hiding this comment

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

Suggestion: Add a calendar icon with a white border for dark mode
image

@brandong512
Copy link
Author

Sounds good I'll go ahead and start working on these changes. Sorry for the delay!

@brandong512
Copy link
Author

  • added dark mode to availability panel
  • added dark mode suggestion for calendar icon
  • fixed dark mode for toast

@akshay1502
@rohan09-raj
@whyDontI

@akshay1502 akshay1502 linked an issue Apr 17, 2022 that may be closed by this pull request
@sahsisunny sahsisunny closed this Nov 10, 2023
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.

Dark Mode for Status Site
4 participants