Skip to content

Commit

Permalink
fix: Overlay between bottom toolbar and tab (#2313)
Browse files Browse the repository at this point in the history
  • Loading branch information
xcv58 authored Feb 15, 2023
1 parent 1e58c72 commit 4990499
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ references:
echo 'export PATH="$PNPM_HOME:$PATH"' >> ${BASH_ENV}
source ${BASH_ENV}
pnpm install
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
pnpm dlx playwright install --with-deps chromium
jobs:
build-test:
docker:
- image: circleci/node:lts-browsers
- image: circleci/node:17-browsers
steps:
- checkout
- *restore_cache
Expand Down
9 changes: 3 additions & 6 deletions packages/extension/src/js/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'
import { StoreContext, store, useStore } from './hooks/useStore'
import { ThemeContext } from './hooks/useTheme'
import { browser, isProduction } from 'libs'
import { browser } from 'libs'
import { BrowserRouter } from 'react-router-dom'
import Main from './Main'
import { ReduceMotionProvider } from 'libs/useReduceMotion'
Expand All @@ -32,15 +32,12 @@ export default observer(() => {
availWidth,
})
}, [systemTheme])
// The key for DndProvider is a workaround: https://github.com/react-dnd/react-dnd/issues/186#issuecomment-573567724
return (
<StrictMode>
<StoreContext.Provider value={store}>
<ThemeProvider theme={theme}>
<DndProvider
key={isProduction() ? 'dnd-provider' : Date.now()}
backend={HTML5Backend}
>
{/* The context for DndProvider is a workaround: https://github.com/react-dnd/react-dnd/issues/3257#issuecomment-1239254032 */}
<DndProvider context={window} backend={HTML5Backend}>
<ThemeContext.Provider value={isDarkTheme}>
<ReduceMotionProvider>
<BrowserRouter>
Expand Down
3 changes: 2 additions & 1 deletion packages/extension/src/js/components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const useQuery = () => new URLSearchParams(useLocation().search)
export default observer(() => {
const query = useQuery()
const isPopup = !query.has(NOT_POPUP)
const { windowStore, shortcutStore } = useStore()
const { windowStore, shortcutStore, userStore } = useStore()
useEffect(() => {
windowStore.didMount()
shortcutStore.didMount()
Expand All @@ -28,6 +28,7 @@ export default observer(() => {
<main
className={classNames(
'flex flex-col h-screen overflow-hidden',
{ 'pb-12': !userStore.toolbarAutoHide },
useTextClasses()
)}
>
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/src/js/components/WinList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default observer(() => {
useEffect(() => {
setContainerRef(scrollbarRef)
onResize()
})
}, [])

const resizeDetector = (
<ReactResizeDetector
Expand All @@ -47,7 +47,7 @@ export default observer(() => {
return (
<div
ref={scrollbarRef}
className="flex flex-col flex-wrap content-start flex-auto mb-0 mr-0 overflow-scroll"
className="flex flex-col flex-wrap content-start flex-auto mb-0 mr-0 overflow-scroll border-red-700"
>
{list}
{resizeDetector}
Expand Down

1 comment on commit 4990499

@vercel
Copy link

@vercel vercel bot commented on 4990499 Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.