feat(structure): support search in DDL view - #7433
Merged
Merged
Conversation
Reuse the existing read-only CodeMirror and EditorSearchPanel flow for the table structure DDL tab, including lifecycle-safe refresh and scroll handling.\n\nValidated with targeted Vitest suites, vue-tsc, and oxfmt.
t8y2
reviewed
Aug 28, 2026
t8y2
left a comment
Owner
There was a problem hiding this comment.
维护者补丁已推送(maintainerCanModify,fast-forward dca0bbda → 5cd936217):
- 搜索面板不再遮挡「复制 DDL」按钮:给共享组件
EditorSearchPanel增加可选的open/closeemits(对 QueryEditor/DdlViewDialog/NacosAdminConsole 等既有使用方是纯增量、零行为变化),TableStructureEditor的 DDL tab 监听后在搜索面板打开期间隐藏同角的复制按钮。未用 CSS:has()方案是考虑到 win7 旧 WebView 的兼容性。 loadEditorTheme补传themePalette(第 4 参,与DdlViewDialog.vue:133的调用形态一致),修复编辑器主题=跟随应用且非默认配色时 DDL tab 与其他编辑器主题不一致的问题。- 验证:vue-tsc 全量通过;聚焦测试 12/12 通过(ddlSearch×2、EditorSearchPanel×2、NacosAdminConsoleDelete)。
t8y2
approved these changes
Aug 28, 2026
Owner
|
Thanks for the contribution! Merged in 6d8e667, will be released in the next version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix #7294: after opening the table structure editor's DDL tab (e.g. via Ctrl/Cmd+click on a table name), the DDL content could not be searched with Ctrl/Cmd+F.
Root Cause
The DDL tab was rendered as a plain
<pre>element and had no search UX. The global keydown handler inTableStructureEditorintercepted Ctrl/Cmd+F (it only focused the column search in the columns tab), so neither the app search UI nor the browser find would appear for the DDL tab.(Note:
DdlViewDialog.vueis a separate path and already uses a read-only CodeMirror withEditorSearchPanel— it was not part of this issue.)Changes
<pre>.EditorSearchPaneland@codemirror/search(match navigation, count display, Enter, Esc, regex / case-sensitive toggles).EditorState.readOnly.of(true).event.defaultPrevented.Validation
TableStructureEditor.ddlSearch.spec.ts+TableStructureEditor.ddlSearchSource.spec.ts(5 tests passed)vue-tsc --noEmitpassedoxfmt --checkpassedgit diff --checkpassedNo Rust / backend / DDL-fetch logic was changed.