You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by zh...@apache.org on 2026/09/08 01:02:48 UTC
(maka) branch main updated: fix(desktop): restore right workbar scrolling (#5000)
This is an automated email from the ASF dual-hosted git repository.
me2seeks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maka.git
The following commit(s) were added to refs/heads/main by this push:
new 1d897105cb fix(desktop): restore right workbar scrolling (#5000)
1d897105cb is described below
commit 1d897105cb8895f4d82ea89d4cd066965c5a2e51
Author: Xiao Liu <li...@qq.com>
AuthorDate: Tue Sep 8 09:02:42 2026 +0800
fix(desktop): restore right workbar scrolling (#5000)
Constrain the right overlay grid row so tall faces stay within the viewport and their local scroll containers retain overflow. Add a Storybook regression covering paginated Changes content and scrollTop movement.
Fixes #4999
Generated-by: Codex
---
apps/desktop/src/renderer/styles/workbar/shell.css | 6 ++++--
apps/desktop/stories/session-workbar.stories.tsx | 19 +++++++++++++++++--
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/apps/desktop/src/renderer/styles/workbar/shell.css b/apps/desktop/src/renderer/styles/workbar/shell.css
index f3764da702..36fc0cd910 100644
--- a/apps/desktop/src/renderer/styles/workbar/shell.css
+++ b/apps/desktop/src/renderer/styles/workbar/shell.css
@@ -142,9 +142,11 @@
}
.maka-session-workbar-panel[data-overlay][data-placement="right"] {
- /* One stretched track, like the frame: the face fills the height and the
- column can be aligned as a whole. */
+ /* One minmax track keeps the active face inside the overlay's available
+ height. An implicit auto track grows to the face's full content height,
+ leaving its own overflow scroller with nothing to scroll. */
display: grid;
+ grid-template-rows: minmax(0, 1fr);
padding-top: var(--maka-plate-titlebar-clearance);
}
diff --git a/apps/desktop/stories/session-workbar.stories.tsx b/apps/desktop/stories/session-workbar.stories.tsx
index b228c31896..645e408027 100644
--- a/apps/desktop/stories/session-workbar.stories.tsx
+++ b/apps/desktop/stories/session-workbar.stories.tsx
@@ -301,7 +301,7 @@ const fileLineCapGitReviewSnapshot: GitReviewSnapshot = {
// Source-level truncation: a large changeset whose file list the source capped,
// so `truncated` is set and the panel shows its 变化过多 banner. Each file is
// ordinary — no single file trips the per-file cap here.
-const sourceTruncatedFiles: GitReviewSnapshot['files'] = Array.from({ length: 24 }, (_, index) => {
+const sourceTruncatedFiles: GitReviewSnapshot['files'] = Array.from({ length: 40 }, (_, index) => {
const path = `src/feature-${String(index).padStart(2, '0')}.ts`;
return {
path,
@@ -1162,7 +1162,22 @@ export const ChangesTruncated: Story = {
decorators: [bridge({ review: { ok: true, snapshot: sourceTruncatedGitReviewSnapshot } })],
render: () => <Workbar tab="review" />,
play: async ({ canvasElement }) => {
- await within(canvasElement).findByText('变化过多,仅显示前一部分文件');
+ const canvas = within(canvasElement);
+ await canvas.findByText('变化过多,仅显示前一部分文件');
+ await userEvent.click(await canvas.findByRole('button', { name: '再显示 20 个文件' }));
+
+ const panel = canvasElement.querySelector<HTMLElement>('.maka-session-review-panel');
+ if (!panel) throw new Error('the changes panel is missing');
+ await waitFor(() => {
+ expect(
+ canvasElement.querySelectorAll('.maka-session-review-file').length,
+ ).toBe(40);
+ expect(panel.scrollHeight).toBeGreaterThan(panel.clientHeight);
+ });
+
+ panel.scrollTop = panel.scrollHeight;
+ await waitFor(() => expect(panel.scrollTop).toBeGreaterThan(0));
+ panel.scrollTop = 0;
},
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org