Skip to content

Commit 39d97a0

Browse files
authored
fix(web): make plugin detail page scrollable (#7070)
1 parent f1d6c5c commit 39d97a0

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

apps/web/src/styles/home/plugin-marketplace-demo.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,14 @@
888888
}
889889

890890
.plugin-suite-detail {
891-
padding-top: 18px;
891+
height: 100%;
892+
min-height: 0;
893+
overflow-x: hidden;
894+
overflow-y: auto;
895+
overscroll-behavior: contain;
896+
scrollbar-gutter: stable;
897+
scrollbar-width: thin;
898+
padding: 18px 0 72px;
892899
}
893900

894901
.plugin-suite-detail__topbar {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import postcss, { type Declaration, type Rule } from 'postcss';
2+
import { describe, expect, it } from 'vitest';
3+
import { readExpandedIndexCss } from '../helpers/read-expanded-css';
4+
5+
describe('plugin detail page scrolling', () => {
6+
it('owns vertical overflow inside the fixed-height workspace shell', () => {
7+
const root = postcss.parse(readExpandedIndexCss(), { from: 'src/index.css' });
8+
const rule = root.nodes.find(
9+
(node): node is Rule => node.type === 'rule' && node.selector === '.plugin-suite-detail',
10+
);
11+
const declarations = new Map(
12+
rule?.nodes
13+
.filter((node): node is Declaration => node.type === 'decl')
14+
.map((declaration) => [declaration.prop, declaration.value]),
15+
);
16+
17+
expect(declarations.get('height')).toBe('100%');
18+
expect(declarations.get('min-height')).toBe('0');
19+
expect(declarations.get('overflow-x')).toBe('hidden');
20+
expect(declarations.get('overflow-y')).toBe('auto');
21+
expect(declarations.get('scrollbar-gutter')).toBe('stable');
22+
});
23+
});

0 commit comments

Comments
 (0)