-
Notifications
You must be signed in to change notification settings - Fork 166
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
Dark Mode for the status site #251
Conversation
…website-status into feat/dark-mode-sass
…website-status into feat/dark-mode-sass
…website-status into feat/dark-mode-sass
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.
@brandong512 Please check why the tests/checks are failing by clicking on the details
src/pages/index.tsx
Outdated
@@ -114,6 +124,8 @@ const Index: FC = () => { | |||
}, [isLoading, response]); | |||
|
|||
useEffect(() => { | |||
console.log("in use effect: ", checkThemeHistory(document.cookie, query)) |
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.
Please avoid adding console statements to production
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.
No problem I'll go ahead and remove that
const themeSetter = () => { | ||
document.cookie = setCookie(!mainDarkMode); | ||
setMainDarkMode(!mainDarkMode); | ||
} |
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.
We can move this function to helper functions, as the same function is used in multiple pages. What do you think?
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.
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?
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.
Good work 😃
Requesting some changes
@brandong512 Please add the dark mode feature changes for Availability panel also which is currently behind a feature flag( |
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.
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.
Sounds good I'll go ahead and start working on these changes. Sorry for the delay! |
…tatus into feat/dark-mode-sass
…website-status into feat/dark-mode-sass
|
@akshay1502
@rohan09-raj
@whyDontI
Not sure why the long chain of commits, but I'm open to learning more about it/correcting it