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

removing theme legacy #3688

Merged
merged 21 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
27cc1c8
removed legacy `isModernTheme` and `isClassicTheme`
vsubhuman Oct 13, 2024
a9f1066
removed legacy `isRevampTheme`, `isCurrentThemeSet`, `didUserMigrated…
vsubhuman Oct 13, 2024
5ff500e
`currentTheme` usages removed
vsubhuman Oct 13, 2024
88a9ec7
removed legacy prop `selectedLayout`
vsubhuman Oct 13, 2024
a0471ad
removed legacy prop `currentTheme`
vsubhuman Oct 13, 2024
5989f8f
removed legacy prop `isRevampLayout` usages
vsubhuman Oct 13, 2024
b32995d
removed legacy prop `isRevampLayout` usages
vsubhuman Oct 13, 2024
a8c100a
removed legacy prop `isRevampLayout` usages
vsubhuman Oct 13, 2024
5577e9c
removed legacy prop `isRevampLayout`
vsubhuman Oct 13, 2024
2e25fbf
removed legacy prop `renderLayoutComponent` usages
vsubhuman Oct 13, 2024
6e20de2
removed legacy `layout`
vsubhuman Oct 13, 2024
4707fd2
removed legacy sidebar categories
vsubhuman Oct 13, 2024
026cda3
Merge branch 'ruslan/delete-unused' into ruslan/YOEXT-1433/removing-l…
vsubhuman Oct 13, 2024
330c980
deleting unused files
vsubhuman Oct 13, 2024
8d27ea2
removed legacy themes
vsubhuman Oct 13, 2024
1995252
Merge remote-tracking branch 'origin/develop' into ruslan/YOEXT-1433/…
vsubhuman Oct 18, 2024
2d4f0f4
Merge remote-tracking branch 'origin/develop' into ruslan/YOEXT-1433/…
vsubhuman Dec 17, 2024
1eeeb21
post-merge fixes
vsubhuman Dec 17, 2024
bdfaaf5
lint fixes
vsubhuman Dec 17, 2024
3f8754b
Merge remote-tracking branch 'origin/develop' into ruslan/YOEXT-1433/…
vsubhuman Dec 23, 2024
f73415e
post-merge fixes
vsubhuman Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions packages/yoroi-extension/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import { observable, autorun, runInAction } from 'mobx';
import { Routes } from './Routes';
import { locales, translations } from './i18n/translations';
import { Logger } from './utils/logging';
import { LayoutProvider } from './styles/context/layout';
import { ColorModeProvider } from './styles/context/mode';
import { CssBaseline } from '@mui/material';
import { globalStyles } from './styles/globalStyles';
import { changeToplevelTheme, MuiThemes, THEMES } from './styles/themes';
import { changeToplevelTheme, MuiThemes } from './styles/themes';
import ThemeManager from './ThemeManager';
import environment from './environment';
import MaintenancePage from './containers/MaintenancePage';
Expand Down Expand Up @@ -82,27 +81,22 @@ class App extends Component<Props, State> {
'--default-font': !environment.isProduction() ? 'wingdings' : 'Times New Roman',
};

const currentTheme = stores.profile.currentTheme || THEMES.YOROI_BASE;

const currentTheme = stores.profile.currentTheme;
changeToplevelTheme(currentTheme);

const muiTheme = MuiThemes[currentTheme];

Logger.debug(`[yoroi] themes changed`);

return (
<div style={{ height: '100%' }}>
<LayoutProvider layout={currentTheme}>
<ColorModeProvider currentTheme={currentTheme}>
<CssBaseline />
{globalStyles(muiTheme)}
<ThemeManager cssVariables={themeVars} />
{/* Automatically pass a theme prop to all components in this subtree. */}
<IntlProvider {...{ locale, key: locale, messages: mergedMessages }}>
{this.getContent()}
</IntlProvider>
</ColorModeProvider>
</LayoutProvider>
<ColorModeProvider>
<CssBaseline />
{globalStyles(muiTheme)}
<ThemeManager cssVariables={themeVars} />
{/* Automatically pass a theme prop to all components in this subtree. */}
<IntlProvider {...{ locale, key: locale, messages: mergedMessages }}>
{this.getContent()}
</IntlProvider>
</ColorModeProvider>
</div>
);
}
Expand Down
21 changes: 1 addition & 20 deletions packages/yoroi-extension/app/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { ConfigType } from '../config/config-types';
import type { ActionsMap } from './actions/index';
import ConnectedWebsitesPage, { ConnectedWebsitesPagePromise } from './containers/dapp-connector/ConnectedWebsitesContainer';
import Transfer, { WalletTransferPagePromise } from './containers/transfer/Transfer';
import AddWalletPage, { AddAnotherWalletPromise } from './containers/wallet/AddWalletPage';
import AddWalletPage from './containers/wallet/AddWalletPage';
import StakingPage, { StakingPageContentPromise } from './containers/wallet/staking/StakingPage';
import VotingPage, { VotingPageContentPromise } from './containers/wallet/voting/VotingPage';
import { ROUTES } from './routes-config';
Expand Down Expand Up @@ -133,12 +133,6 @@ const NFTsPageRevamp = React.lazy(NFTsPageRevampPromise);
const NFTDetailPageRevampPromise = () => import('./containers/wallet/NFTDetailPageRevamp');
const NFTDetailPageRevamp = React.lazy(NFTDetailPageRevampPromise);

const YoroiPalettePagePromise = () => import('./containers/experimental/YoroiPalette');
const YoroiPalettePage = React.lazy(YoroiPalettePagePromise);

const YoroiThemesPagePromise = () => import('./containers/experimental/yoroiThemes');
const YoroiThemesPage = React.lazy(YoroiThemesPagePromise);

// SWAP
const SwapPagePromise = () => import('./containers/swap/asset-swap/SwapPage');
const SwapPage = React.lazy(SwapPagePromise);
Expand All @@ -149,7 +143,6 @@ const ExchangeEndPagePromise = () => import('./containers/ExchangeEndPage');
const ExchangeEndPage = React.lazy(ExchangeEndPagePromise);

export const LazyLoadPromises: Array<() => any> = [
AddAnotherWalletPromise,
StakingPageContentPromise,
CreateWalletPagePromise,
RestoreWalletPagePromise,
Expand Down Expand Up @@ -183,8 +176,6 @@ export const LazyLoadPromises: Array<() => any> = [
NFTsPageRevampPromise,
NFTDetailPageRevampPromise,
ConnectedWebsitesPagePromise,
YoroiPalettePagePromise,
YoroiThemesPagePromise,
SwapPagePromise,
SwapOrdersPagePromise,
OptForAnalyticsPagePromise,
Expand Down Expand Up @@ -267,16 +258,6 @@ export const Routes = (stores: StoresMap, actions: ActionsMap): Node => {
path={ROUTES.DAPP_CONNECTOR.CONNECTED_WEBSITES}
component={props => <ConnectedWebsitesPage {...props} stores={stores} actions={actions} />}
/>
<Route
exact
path={ROUTES.EXPERIMENTAL.YOROI_PALETTE}
component={props => <YoroiPalettePage {...props} stores={stores} actions={actions} />}
/>
<Route
exact
path={ROUTES.EXPERIMENTAL.THEMES}
component={props => <YoroiThemesPage {...props} stores={stores} actions={actions} />}
/>
<Route
path={ROUTES.WALLETS.ROOT}
component={props => wrapWallet({ ...props, stores, actions }, WalletsSubpages(stores, actions))}
Expand Down
5 changes: 1 addition & 4 deletions packages/yoroi-extension/app/UI/layout/GeneralPageLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import { intlShape } from 'react-intl';
import TopBarLayout from '../../components/layout/TopBarLayout';
import BannerContainer from '../../containers/banners/BannerContainer';
import SidebarContainer from '../../containers/SidebarContainer';
import { withLayout } from '../../styles/context/layout';
import { ModalProvider } from '../components/modals/ModalContext';
import { ModalManager } from '../components/modals/ModalManager';
import { IntlProvider } from '../context/IntlProvider';

@observer
class GeneralPageLayout extends React.Component {
export default class GeneralPageLayout extends React.Component {
static defaultProps = {
children: undefined,
};
Expand All @@ -36,5 +35,3 @@ class GeneralPageLayout extends React.Component {
);
}
}

export default withLayout(GeneralPageLayout);
11 changes: 0 additions & 11 deletions packages/yoroi-extension/app/assets/images/add-label.inline.svg

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions packages/yoroi-extension/app/assets/images/cross-dark.inline.svg

This file was deleted.

This file was deleted.

Loading
Loading