-
Notifications
You must be signed in to change notification settings - Fork 3
feat(theme): Add dark mode color palette #1769
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
Open
DanCoria
wants to merge
12
commits into
develop
Choose a base branch
from
add/dark-mode-colors
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
09e26fc
Initial plan
Copilot a18a395
Add dark mode support with Seed Company brand colors
Copilot 195425a
Fix React imports and add JSDoc documentation for brand colors
Copilot b3a6bbe
- Refactored theme creation to use a two-pass approach: first generat…
DanCoria 3c12e9f
Improve type safety and remove redundant styles
DanCoria c301dc7
- Remove duplicate unthemed CssBaseline from Root.tsx
DanCoria 34290ff
Refactor sidebar theme to use brand colors and export brandColors for…
DanCoria 0ff6d59
Refactor brandColors documentation to improve clarity and consistency
DanCoria 8ed95e2
Refactor imports in palette.ts for consistency and clarity
DanCoria 9c87016
Enhance documentation in palette.ts for roleLuminance adjustments in …
DanCoria 34bdc62
Fixed the Dashboard h1 color and updated the paper color to match wha…
DanCoria 5685d73
- Cleaned up App.tsx by moving Dark Mode logic to it's own component.
DanCoria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,41 @@ | ||
| import { Box } from '@mui/material'; | ||
| import { ErrorBoundary } from 'react-error-boundary'; | ||
| import { Outlet } from 'react-router-dom'; | ||
| import { makeStyles } from 'tss-react/mui'; | ||
| import { CommentsBar } from '~/components/Comments/CommentsBar'; | ||
| import { Error } from '../../components/Error'; | ||
| import { useAuthRequired } from '../Authentication'; | ||
| import { CreateDialogProviders } from './Creates'; | ||
| import { Header } from './Header'; | ||
| import { Sidebar } from './Sidebar'; | ||
|
|
||
| const useStyles = makeStyles()(() => ({ | ||
| root: { | ||
| flex: 1, | ||
| display: 'flex', | ||
| height: '100vh', | ||
| }, | ||
| main: { | ||
| flex: 1, | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| }, | ||
| })); | ||
|
|
||
| export const MainLayout = () => { | ||
| useAuthRequired(); | ||
|
|
||
| const { classes } = useStyles(); | ||
| return ( | ||
| <div className={classes.root}> | ||
| <Box | ||
| sx={{ | ||
| flex: 1, | ||
| display: 'flex', | ||
| height: '100vh', | ||
| bgcolor: 'background.default', | ||
| }} | ||
| > | ||
| <CreateDialogProviders> | ||
| <Sidebar /> | ||
| </CreateDialogProviders> | ||
| <div className={classes.main}> | ||
| <Box | ||
| sx={{ | ||
| flex: 1, | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| }} | ||
| > | ||
| <Header /> | ||
| <ErrorBoundary fallback={<Error show page />}> | ||
| <Outlet /> | ||
| </ErrorBoundary> | ||
| </div> | ||
| </Box> | ||
| <CommentsBar /> | ||
| </div> | ||
| </Box> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { CssBaseline, useMediaQuery } from '@mui/material'; | ||
| import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles'; | ||
| import { ReactNode, useMemo } from 'react'; | ||
| import { createTheme } from './createTheme'; | ||
|
|
||
| export const ThemeProvider = ({ children }: { children?: ReactNode }) => { | ||
| const isDark = useMediaQuery('(prefers-color-scheme: dark)'); | ||
|
|
||
| const theme = useMemo(() => createTheme({ dark: isDark }), [isDark]); | ||
|
|
||
| return ( | ||
| <MuiThemeProvider theme={theme}> | ||
| <CssBaseline enableColorScheme /> | ||
| {children} | ||
| </MuiThemeProvider> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.