Skip to content

Commit 31d7df3

Browse files
committed
🐛(frontend) fix ui issues
- Fix floating bar z-index to ensure it appears under the editor toolbar and suggestion menu - Add text center to toolip content
1 parent a43883c commit 31d7df3

3 files changed

Lines changed: 35 additions & 44 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- 🐛(frontend) overlap of block menu dropdown #2406
12+
913
## [v5.2.1] - 2026-06-05
1014

1115
### Changed

‎src/frontend/apps/impress/src/cunningham/cunningham-style.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
*/
9595
.c__tooltip {
9696
padding: var(--c--globals--spacings--t) var(--c--globals--spacings--xxs);
97+
text-align: center;
9798
}
9899

99100
.c__tooltip .react-aria-OverlayArrow svg {

‎src/frontend/apps/impress/src/features/docs/doc-header/components/FloatingBar.tsx‎

Lines changed: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { useMemo } from 'react';
21
import { css } from 'styled-components';
32

43
import { Box, Card } from '@/components';
5-
import { useCunninghamTheme } from '@/cunningham/useCunninghamTheme';
64
import { useDocStore } from '@/docs/doc-management/stores/useDocStore';
75
import { DocShareButton } from '@/features/docs/doc-share/components/DocShareButton';
86
import { LeftPanelCollapseButton } from '@/features/left-panel/components/LeftPanelCollapseButton';
@@ -11,6 +9,36 @@ import { useResponsiveStore } from '@/stores';
119

1210
import { DocToolBox } from './DocToolBox';
1311

12+
const FLOATING_STYLES = css`
13+
position: sticky;
14+
top: 0;
15+
left: 0;
16+
right: 0;
17+
width: 100%;
18+
padding: var(--c--globals--spacings--sm);
19+
padding-bottom: 0;
20+
z-index: 10; // Under editor select box but above other elements (e.g., doc title, suggestion menu)
21+
align-items: flex-start;
22+
isolation: isolate;
23+
24+
&::before {
25+
content: '';
26+
position: absolute;
27+
inset: 0;
28+
z-index: -1;
29+
background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 100%);
30+
backdrop-filter: blur(1px);
31+
-webkit-backdrop-filter: blur(1px);
32+
mask-image: linear-gradient(180deg, black 50%, transparent 100%);
33+
-webkit-mask-image: linear-gradient(180deg, black 50%, transparent 100%);
34+
}
35+
36+
> * {
37+
position: relative;
38+
z-index: 1;
39+
}
40+
`;
41+
1442
/**
1543
* Sticky bar trick (desktop):
1644
* - MainContent has padding `base`; we extend the bar width and apply
@@ -19,52 +47,10 @@ import { DocToolBox } from './DocToolBox';
1947
* Mobile: returns null to avoid header overlap.
2048
*/
2149
export const FloatingBar = () => {
22-
const { spacingsTokens } = useCunninghamTheme();
2350
const { isLargeScreen } = useResponsiveStore();
2451
const { currentDoc } = useDocStore();
2552
const isDeletedDoc = !!currentDoc?.deleted_at;
2653

27-
const FLOATING_STYLES = useMemo(() => {
28-
const sm = spacingsTokens['sm'];
29-
return css`
30-
position: sticky;
31-
top: 0;
32-
left: 0;
33-
right: 0;
34-
width: 100%;
35-
min-height: 64px;
36-
padding: ${sm};
37-
z-index: 21; // Under editor select box but above other elements (e.g., doc title, suggestion menu)
38-
align-items: flex-start;
39-
isolation: isolate;
40-
41-
&::before {
42-
content: '';
43-
position: absolute;
44-
inset: 0;
45-
z-index: -1;
46-
background: linear-gradient(
47-
180deg,
48-
#fff 0%,
49-
rgba(255, 255, 255, 0) 100%
50-
);
51-
backdrop-filter: blur(1px);
52-
-webkit-backdrop-filter: blur(1px);
53-
mask-image: linear-gradient(180deg, black 50%, transparent 100%);
54-
-webkit-mask-image: linear-gradient(
55-
180deg,
56-
black 50%,
57-
transparent 100%
58-
);
59-
}
60-
61-
> * {
62-
position: relative;
63-
z-index: 1;
64-
}
65-
`;
66-
}, [spacingsTokens]);
67-
6854
return (
6955
<Box
7056
className="--docs--floating-bar"

0 commit comments

Comments
 (0)