Skip to content

Commit

Permalink
Dark mode tweaks (#2574)
Browse files Browse the repository at this point in the history
* Automatically check for updates to os theme and uses default theme for tests

* Better check
  • Loading branch information
Isla Koenigsknecht authored Jul 12, 2024
1 parent 131327b commit 1b29224
Show file tree
Hide file tree
Showing 56 changed files with 222 additions and 204 deletions.
4 changes: 2 additions & 2 deletions packages/desktop/src/renderer/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import SentryWarning from './containers/widgets/sentryWarning/sentryWarning'
import SettingsModal from './components/Settings/Settings'
import UpdateModal from './containers/widgets/update/UpdateModal'
import QuitAppDialog from './containers/ui/QuitAppDialog'
import { getTheme } from './theme'
import { useTheme } from './theme'
import CreateCommunity from './components/CreateJoinCommunity/CreateCommunity/CreateCommunity'
import JoinCommunity from './components/CreateJoinCommunity/JoinCommunity/JoinCommunity'
import CreateChannel from './components/Channel/CreateChannel/CreateChannel'
Expand Down Expand Up @@ -43,7 +43,7 @@ export const persistor = persistStore(store)
export default () => {
return (
<StyledEngineProvider injectFirst>
<ThemeProvider theme={getTheme()}>
<ThemeProvider theme={useTheme()}>
<DndProvider backend={HTML5Backend}>
<HashRouter>
<Provider store={store}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('LeaveCommunity', () => {
aria-hidden="true"
/>
<div
class="MuiModal-root css-16f7e5u-MuiModal-root"
class="MuiModal-root css-1mbrbs1-MuiModal-root"
role="presentation"
>
<div
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('LeaveCommunity', () => {
data-testid="ModalActions"
>
<button
class="MuiButtonBase-root MuiIconButton-root IconButtonroot MuiIconButton-sizeMedium css-c8hoqc-MuiButtonBase-root-MuiIconButton-root"
class="MuiButtonBase-root MuiIconButton-root IconButtonroot MuiIconButton-sizeMedium css-1hpikoh-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
type="button"
>
Expand Down Expand Up @@ -121,7 +121,7 @@ describe('LeaveCommunity', () => {
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-auto DeleteChannelbuttonContainer css-1wrgmsj-MuiGrid-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth DeleteChannelbutton css-1x25m9x-MuiButtonBase-root-MuiButton-root"
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth DeleteChannelbutton css-sdx6r0-MuiButtonBase-root-MuiButton-root"
data-testid="deleteChannelButton"
tabindex="0"
type="button"
Expand All @@ -136,7 +136,7 @@ describe('LeaveCommunity', () => {
class="MuiGrid-root MuiGrid-container MuiGrid-item MuiGrid-grid-xs-12 DeleteChannelsecondaryButtonContainer css-s2k0j8-MuiGrid-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth DeleteChannelsecondaryButton css-1x25m9x-MuiButtonBase-root-MuiButton-root"
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth DeleteChannelsecondaryButton css-sdx6r0-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('FileComponent', () => {
<body>
<div>
<div
class="css-4fpo3t"
class="css-7vq9um"
data-testid="QmWUCSApiy76nW9DAk5M9QbH1nkW5XCYwxUHRSULjATyqs-fileComponent"
>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('UploadedFile', () => {
class="css-gd4qex"
>
<div
class="css-1i8wbh6"
class="css-bxyyfp"
data-testid="abcd1234-imagePlaceholder"
>
<p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('UploadedImagePlaceholder', () => {
<body>
<div>
<div
class="css-1i8wbh6"
class="css-bxyyfp"
data-testid="hvb45FGa-imagePlaceholder"
>
<p
Expand Down Expand Up @@ -107,7 +107,7 @@ describe('UploadedImagePlaceholder', () => {
<body>
<div>
<div
class="css-1i8wbh6"
class="css-bxyyfp"
data-testid="hvb45FGa-imagePlaceholder"
>
<p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Create ChannelCreationModalComponent', () => {
aria-hidden="true"
/>
<div
class="MuiModal-root css-16f7e5u-MuiModal-root"
class="MuiModal-root css-1mbrbs1-MuiModal-root"
role="presentation"
>
<div
Expand Down Expand Up @@ -87,7 +87,7 @@ describe('Create ChannelCreationModalComponent', () => {
</svg>
</span>
<span
class="MuiTypography-root MuiTypography-caption MuiTypography-alignCenter SpinnerLoadermessage css-1ws1t6m-MuiTypography-root"
class="MuiTypography-root MuiTypography-caption MuiTypography-alignCenter SpinnerLoadermessage css-x82by-MuiTypography-root"
style="font-size: 0.9090909090909091rem;"
>
Channel recreation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('UsernameCreated', () => {
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-auto UsernameCreatedbuttonContainer css-1wrgmsj-MuiGrid-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth UsernameCreatedbutton css-1x25m9x-MuiButtonBase-root-MuiButton-root"
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth UsernameCreatedbutton css-sdx6r0-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Create JoiningPanelComponent', () => {
aria-hidden="true"
/>
<div
class="MuiModal-root css-16f7e5u-MuiModal-root"
class="MuiModal-root css-1mbrbs1-MuiModal-root"
role="presentation"
>
<div
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('Create JoiningPanelComponent', () => {
style="width: 600px;"
>
<div
class="MuiGrid-root MuiGrid-container JoiningPanelComponentroot css-1vn3v3s-MuiGrid-root"
class="MuiGrid-root MuiGrid-container JoiningPanelComponentroot css-nds1ax-MuiGrid-root"
>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column JoiningPanelComponentcontentWrapper css-t0zib5-MuiGrid-root"
Expand Down Expand Up @@ -158,7 +158,7 @@ describe('Create JoiningPanelComponent', () => {
aria-hidden="true"
/>
<div
class="MuiModal-root css-16f7e5u-MuiModal-root"
class="MuiModal-root css-1mbrbs1-MuiModal-root"
role="presentation"
>
<div
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('Create JoiningPanelComponent', () => {
style="width: 600px;"
>
<div
class="MuiGrid-root MuiGrid-container JoiningPanelComponentroot css-1vn3v3s-MuiGrid-root"
class="MuiGrid-root MuiGrid-container JoiningPanelComponentroot css-nds1ax-MuiGrid-root"
>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column JoiningPanelComponentcontentWrapper css-t0zib5-MuiGrid-root"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Create StartingPanelComponent', () => {
aria-hidden="true"
/>
<div
class="MuiModal-root css-16f7e5u-MuiModal-root"
class="MuiModal-root css-1mbrbs1-MuiModal-root"
role="presentation"
>
<div
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('Create StartingPanelComponent', () => {
style="width: 600px;"
>
<div
class="MuiGrid-root MuiGrid-container StartingPanelComponentroot css-k5046p-MuiGrid-root"
class="MuiGrid-root MuiGrid-container StartingPanelComponentroot css-1y7od3a-MuiGrid-root"
>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column StartingPanelComponentcontentWrapper css-t0zib5-MuiGrid-root"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('MathMessageComponent', () => {
<body>
<div>
<span
class="MuiTypography-root MuiTypography-body1 TextMessagemessage css-1xya0ai-MuiTypography-root"
class="MuiTypography-root MuiTypography-body1 TextMessagemessage css-3qg0or-MuiTypography-root"
data-testid="messagesGroupContent-1-0"
>
It is
Expand Down Expand Up @@ -187,7 +187,7 @@ describe('MathMessageComponent', () => {
</mjx-container>
</span>
<span
class="MuiTypography-root MuiTypography-body1 TextMessagemessage css-1xya0ai-MuiTypography-root"
class="MuiTypography-root MuiTypography-body1 TextMessagemessage css-3qg0or-MuiTypography-root"
data-testid="messagesGroupContent-1-2"
>
and
Expand Down Expand Up @@ -484,7 +484,7 @@ describe('MathMessageComponent', () => {
</mjx-container>
</span>
<span
class="MuiTypography-root MuiTypography-body1 TextMessagemessage css-1xya0ai-MuiTypography-root"
class="MuiTypography-root MuiTypography-body1 TextMessagemessage css-3qg0or-MuiTypography-root"
data-testid="messagesGroupContent-1-1"
>
<ul
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Search Modal', () => {
aria-hidden="true"
/>
<div
class="MuiModal-root css-16f7e5u-MuiModal-root"
class="MuiModal-root css-1mbrbs1-MuiModal-root"
data-testid="searchChannelModal"
role="presentation"
>
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('Search Modal', () => {
data-testid="ModalActions"
>
<button
class="MuiButtonBase-root MuiIconButton-root IconButtonroot MuiIconButton-sizeMedium css-c8hoqc-MuiButtonBase-root-MuiIconButton-root"
class="MuiButtonBase-root MuiIconButton-root IconButtonroot MuiIconButton-sizeMedium css-1hpikoh-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
type="button"
>
Expand Down Expand Up @@ -146,7 +146,7 @@ describe('Search Modal', () => {
class="MuiGrid-root MuiGrid-container MuiGrid-item Modalcontent Modaltransparent css-1f064cs-MuiGrid-root"
>
<div
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column SearchModalComponentroot css-oy8l91-MuiGrid-root"
class="MuiGrid-root MuiGrid-container MuiGrid-direction-xs-column SearchModalComponentroot css-8xkipt-MuiGrid-root"
>
<div
class="MuiGrid-root MuiGrid-container SearchModalComponentoverlay css-1hbmzt3-MuiGrid-root"
Expand All @@ -169,11 +169,11 @@ describe('Search Modal', () => {
data-testid="searchChannelInput"
>
<div
class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-fullWidth Mui-focused MuiInputBase-formControl css-1hw1r9z-MuiInputBase-root-MuiInput-root"
class="MuiInputBase-root MuiInput-root MuiInput-underline MuiInputBase-colorPrimary MuiInputBase-fullWidth Mui-focused MuiInputBase-formControl css-4l3wau-MuiInputBase-root-MuiInput-root"
>
<input
aria-invalid="false"
class="MuiInputBase-input MuiInput-input css-1x51dt5-MuiInputBase-input-MuiInput-input"
class="MuiInputBase-input MuiInput-input css-ume8vi-MuiInputBase-input-MuiInput-input"
id=":r0:"
name="searchChannel"
placeholder="Channel name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('CopyLink', () => {
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
</p>
<button
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall InviteToCommunityeyeIcon css-1pe4mpk-MuiButtonBase-root-MuiIconButton-root"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall InviteToCommunityeyeIcon css-8prnfn-MuiButtonBase-root-MuiIconButton-root"
data-testid="show-invitation-link"
tabindex="0"
type="button"
Expand All @@ -110,7 +110,7 @@ describe('CopyLink', () => {
class="MuiGrid-root css-vj1n65-MuiGrid-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium InviteToCommunitybutton css-18k1y27-MuiButtonBase-root-MuiButton-root"
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium InviteToCommunitybutton css-1rwf87u-MuiButtonBase-root-MuiButton-root"
data-testid="copy-invitation-link"
tabindex="0"
type="button"
Expand Down Expand Up @@ -193,7 +193,7 @@ describe('CopyLink', () => {
https://tryquiet.org/join#QmVTkUad2Gq3MkCa8gf12R1gsWDfk2yiTEqb6YGXDG2iQ3=p3oqdr53dkgg3n5nuezlzyawhxvit5efxzlunvzp7n7lmva6fj3i43ad&k=12345&o=testOwnerOrbitDbIdentity
</p>
<button
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall InviteToCommunityeyeIcon css-1pe4mpk-MuiButtonBase-root-MuiIconButton-root"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall InviteToCommunityeyeIcon css-8prnfn-MuiButtonBase-root-MuiIconButton-root"
data-testid="show-invitation-link"
tabindex="0"
type="button"
Expand All @@ -220,7 +220,7 @@ describe('CopyLink', () => {
class="MuiGrid-root css-vj1n65-MuiGrid-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium InviteToCommunitybutton css-18k1y27-MuiButtonBase-root-MuiButton-root"
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium InviteToCommunitybutton css-1rwf87u-MuiButtonBase-root-MuiButton-root"
data-testid="copy-invitation-link"
tabindex="0"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('LeaveCommunity', () => {
aria-hidden="true"
/>
<div
class="MuiModal-root css-16f7e5u-MuiModal-root"
class="MuiModal-root css-1mbrbs1-MuiModal-root"
role="presentation"
>
<div
Expand Down Expand Up @@ -60,7 +60,7 @@ describe('LeaveCommunity', () => {
data-testid="ModalActions"
>
<button
class="MuiButtonBase-root MuiIconButton-root IconButtonroot MuiIconButton-sizeMedium css-c8hoqc-MuiButtonBase-root-MuiIconButton-root"
class="MuiButtonBase-root MuiIconButton-root IconButtonroot MuiIconButton-sizeMedium css-1hpikoh-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
type="button"
>
Expand Down Expand Up @@ -121,7 +121,7 @@ describe('LeaveCommunity', () => {
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-auto LeaveCommunitybuttonContainer css-1wrgmsj-MuiGrid-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth LeaveCommunitybutton css-1x25m9x-MuiButtonBase-root-MuiButton-root"
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth LeaveCommunitybutton css-sdx6r0-MuiButtonBase-root-MuiButton-root"
data-testid="leave-community-button"
tabindex="0"
type="button"
Expand All @@ -136,7 +136,7 @@ describe('LeaveCommunity', () => {
class="MuiGrid-root MuiGrid-container MuiGrid-item MuiGrid-grid-xs-12 LeaveCommunitysecondaryButtonContainer css-s2k0j8-MuiGrid-root"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth LeaveCommunitysecondaryButton css-1x25m9x-MuiButtonBase-root-MuiButton-root"
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-fullWidth LeaveCommunitysecondaryButton css-sdx6r0-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
>
Expand Down
Loading

0 comments on commit 1b29224

Please sign in to comment.