-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Implemented the Dark/Light-Mode feature #1852
Implemented the Dark/Light-Mode feature #1852
Conversation
Welcome @Vedant-Manjrekar! Thank you so much for your first pull request! |
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.
It's great having you contribute to this project
Welcome to the community 🤓If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.
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.
Can the navbar not be dark? Also I don't think if adding so many dependencies for a dark mode is a good idea
@Vedant-Manjrekar Maybe we can use theme like one of Youtube |
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 try to do this with the libraries already installed
package.json
Outdated
@@ -4,6 +4,11 @@ | |||
"private": false, | |||
"homepage": "https://linkfree.eddiehub.org", | |||
"dependencies": { | |||
"@emotion/react": "^11.10.4", |
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 are using prime react for the current version of linkfree. Please try to look at their implementation of dark mode instead of installing lots of new packages
package.json
Outdated
"@emotion/styled": "^11.10.4", | ||
"@mui/icons-material": "^5.10.6", | ||
"@mui/material": "^5.10.7", | ||
"@reduxjs/toolkit": "^1.8.5", |
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 think redux is too much just for handling dark mode. If we need any global state then context should be considered first if it can’t be done with just prime react components
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.
But to add the theme changes across multiple pages simultaneously a global state is required, hence i think there is a need to use redux.
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.
Or context or just local storage. I believe Redux is too much when we’re not handling any other global state.
6ae8e7b
to
b8e4c63
Compare
New commit includes:
|
@Vedant-Manjrekar looks great ✨ |
@anirudhp26 Thanks man 😃 |
@EmmaDawsonDev @schmelto I have submitted a PR regarding the dark/light theme issue can you take a look at it ? |
src/Components/Search/Users.js
Outdated
|
||
const theme = { | ||
backgroundColor: `${darkTheme ? '#333333' : '#dee2e6'}`, | ||
// border: `${darkTheme ? 'none' : '1px solid black'}`, |
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.
Is this commented out code required?
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.
Sorry my bad.
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.
Looks great 👍
@Vedant-Manjrekar Can you please solve the merge conflicts |
Done 👍🏽 |
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.
LGTM
Fixes Issue #1032
resolve #1032
Changes proposed
Check List (Check all the applicable boxes)
Screenshots
My code passed all the test
SS of the feature Implemented
4 PM.png…]()