Skip to content

Commit

Permalink
chore: remove emotion, configure panda to load css globally, ditch st…
Browse files Browse the repository at this point in the history
…acks-ui base, #4164
  • Loading branch information
pete-watters committed Sep 11, 2023
1 parent 4884fc5 commit d8655c1
Show file tree
Hide file tree
Showing 22 changed files with 290 additions and 504 deletions.
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@
"dependencies": {
"@bitcoinerlab/secp256k1": "1.0.2",
"@coinbase/cbpay-js": "1.0.2",
"@emotion/core": "11.0.0",
"@emotion/css": "11.11.2",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@fungible-systems/zone-file": "2.0.0",
"@hirosystems/token-metadata-api-client": "1.1.0",
"@ledgerhq/hw-transport-webusb": "6.27.16",
Expand Down Expand Up @@ -246,9 +242,6 @@
"@babel/preset-react": "7.22.5",
"@babel/preset-typescript": "7.22.11",
"@btckit/types": "0.0.19",
"@emotion/babel-plugin": "11.11.0",
"@emotion/babel-preset-css-prop": "11.11.0",
"@emotion/cache": "11.11.0",
"@ls-lint/ls-lint": "2.0.1",
"@pandacss/dev": "0.12.0",
"@playwright/test": "1.37.1",
Expand Down
2 changes: 2 additions & 0 deletions panda.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from '@pandacss/dev';

import { breakpoints } from './theme/breakpoints';
import { globalCss } from './theme/global/global';
import { keyframes } from './theme/keyframes';
import { buttonRecipe } from './theme/recipes/button';
import { semanticTokens } from './theme/semantic-tokens';
Expand Down Expand Up @@ -37,4 +38,5 @@ export default defineConfig({
outdir: 'leather-styles',
outExtension: 'js',
minify: true,
globalCss,
});
6 changes: 3 additions & 3 deletions src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Suspense } from 'react';
import { Provider as ReduxProvider } from 'react-redux';

import { radixBaseCSS } from '@radix-ui/themes/styles.css';
import { ThemeProvider } from '@stacks/ui';
import { QueryClientProvider } from '@tanstack/react-query';
import { PersistGate } from 'redux-persist/integration/react';

import { queryClient } from '@app/common/persistence';
import { theme } from '@app/common/theme';
import { GlobalStyles } from '@app/components/global-styles/global-styles';
import { FullPageLoadingSpinner } from '@app/components/loading-spinner';
import { Devtools } from '@app/features/devtool/devtools';
import { AppErrorBoundary } from '@app/features/errors/app-error-boundary';
Expand All @@ -25,9 +25,9 @@ export function App() {
<ReduxProvider store={store}>
<PersistGate loading={<FullPageLoadingSpinner />} persistor={persistor}>
<HeadProvider />
<ThemeProvider theme={theme}>
{/* TODO - this works but investigate importing radixBaseCSS in panda layer config */}
<ThemeProvider theme={theme} css={radixBaseCSS}>
<ThemeSwitcherProvider>
<GlobalStyles />
<QueryClientProvider client={queryClient}>
<Suspense fallback={<FullPageLoadingSpinner />}>
<AppErrorBoundary>
Expand Down
14 changes: 7 additions & 7 deletions src/app/components/drawer/base-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { noop } from '@shared/utils';
import { useOnClickOutside } from '@app/common/hooks/use-onclickoutside';
import { useThemeSwitcher } from '@app/common/theme-provider';

import { hideScrollbarClassName } from '../global-styles/hide-scrollbar';
import { DrawerHeader } from './components/drawer-header';

function useDrawer(isShowing: boolean, onClose: () => void, pause?: boolean) {
Expand Down Expand Up @@ -104,12 +103,13 @@ export const BaseDrawer = memo((props: BaseDrawerProps) => {
maxHeight={['calc(100vh - 24px)', 'calc(100vh - 96px)']}
>
<Box
className={[
css({
overflowY: 'scroll',
}),
hideScrollbarClassName,
].join(' ')}
css={css({
overflowY: 'scroll',

'&::-webkit-scrollbar': {
display: 'none',
},
})}
>
<DrawerHeader
enableGoBack={enableGoBack}
Expand Down
18 changes: 0 additions & 18 deletions src/app/components/global-styles/full-page-styles.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions src/app/components/global-styles/global-styles.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/app/components/global-styles/hide-scrollbar.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/app/components/global-styles/popup-center-styles.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions src/app/components/global-styles/popup-styles.tsx

This file was deleted.

105 changes: 0 additions & 105 deletions src/app/components/global-styles/radix-styles.tsx

This file was deleted.

77 changes: 0 additions & 77 deletions src/app/components/global-styles/tippy-styles.tsx

This file was deleted.

Loading

0 comments on commit d8655c1

Please sign in to comment.