Skip to content

fix(editor): slim the horizontal scrollbar to match the vertical one - #8956

Closed
dienaso wants to merge 3 commits into
t8y2:mainfrom
dienaso:fix/editor-horizontal-scrollbar-height
Closed

dienaso wants to merge 3 commits into
t8y2:mainfrom
dienaso:fix/editor-horizontal-scrollbar-height

Conversation

@dienaso

@dienaso dienaso commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #8920

问题 / Problem

查询编辑器对 .cm-scroller 自定义了 WebKit 滚动条样式,但只设置了 width: 5px(纵向),漏掉了横向的 height。后果:

  • 横向滚动条保持浏览器默认厚度(issue 截图中红色框标注的粗条);
  • 因为自定义了 ::-webkit-scrollbar,WebKit 不再对该滚动容器使用 macOS overlay 自动隐藏,粗滚动条还会永久占据编辑器底部空间
  • border-radius: 999px 的灰色 thumb 样式两轴共用,粗横向条在视觉上格外突兀。

修复 / Fix

::-webkit-scrollbar 规则补充 height: 5px,横向滚动条与纵向保持一致的 5px 细条(scrollbar-width: thin 的 Firefox 回退路径本就两轴生效,无需改动)。

测试 / Tests

纯 CSS 修复:与 issue 截图对照,在纵向滚动条已有 5px 样式的编辑器中,横向滚动条随之变细并停止占用额外空间。现有 vitest / vue-tsc 不受影响。

SELECT aliases used inside HAVING were reported as "Unknown column"
and were not offered by completion, even though MySQL allows alias
references in HAVING just like in ORDER BY/GROUP BY. The shared
alias-visibility context only recognized ORDER BY/GROUP BY and excluded
any segment containing HAVING, so a query such as
SELECT COUNT(*) AS cnt, g FROM t GROUP BY g HAVING cnt > 1 flagged cnt.

Include HAVING in the alias-visible context so diagnostics stay aligned
with executable MySQL semantics and alias completion appears there.

Fixes t8y2#8713
SQL Server cloned a table with SELECT TOP 0 * INTO, which copies columns
and the IDENTITY property but drops every constraint. A cloned table
therefore silently lost its primary key while keeping the identity
marker, which made the loss easy to miss and broke data copies that
expect the key (t8y2#8931).

Load the source primary key before cloning and let the DDL builder
append ALTER TABLE ... ADD CONSTRAINT ... PRIMARY KEY after the
SELECT INTO, executed as a script. Clones without a primary key keep
the previous single-statement path.

Fixes t8y2#8931
The custom WebKit scrollbar styling on the query editor scroller only
set width, so the horizontal scrollbar kept the default thickness while
the rounded thumb styling made it stand out. It also reserves editor
space permanently. Set height to the same 5px so both axes match.

Fixes t8y2#8920
@github-actions github-actions Bot added area/core Shared DBX core runtime area/desktop Desktop application or Tauri shell bug Something isn't working ui-change Changes user-visible interface, text, or visual assets labels Sep 12, 2026
@t8y2

t8y2 commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Hi @dienaso, thanks for the report and the patch!

Unfortunately this particular fix has already landed: PR #8941 added the same height: 5px to the .cm-scroller::-webkit-scrollbar rule and was merged as 80d314b, which also resolved the identical issue #8940 (your #8920 covers the same thick horizontal scrollbar). Since both changes touch the same line, this PR now shows a conflict and would only add a comment on top of what's already in main — so we'll close it as superseded.

To be clear, nothing of yours is lost: your HAVING alias fix was already merged via #8953, and the SQL Server clone primary-key fix is under review in #8954. Feel free to rebase that branch if needed, and thanks again for contributing!

@t8y2 t8y2 closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Shared DBX core runtime area/desktop Desktop application or Tauri shell bug Something isn't working ui-change Changes user-visible interface, text, or visual assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] X轴滚动条太粗了,应该算bug吧,影响使用了

2 participants