Skip to content

fix(ui): wire up ER diagram help button to open docs (#1695)#1892

Open
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/1695-er-diagram-help
Open

fix(ui): wire up ER diagram help button to open docs (#1695)#1892
HandSonic wants to merge 1 commit into
OtterMind:mainfrom
HandSonic:fix/1695-er-diagram-help

Conversation

@HandSonic

Copy link
Copy Markdown
Contributor

Problem

ER 图工具栏的帮助按钮 onClick={() => {}} 是空函数,点击无反应。

Fix

将帮助按钮的 onClick 改为调用 openWebPage() 打开 Chat2DB 文档页面,与项目中其他帮助入口行为一致。

Related

Fixes #1695

@HandSonic
HandSonic force-pushed the fix/1695-er-diagram-help branch from 6cd8809 to 47fcf03 Compare July 21, 2026 08:15
@openai0229

Copy link
Copy Markdown
Contributor

The button wiring is directionally correct, but please avoid hardcoding https://docs.chat2db-ai.com/.... Chat2DB already has the region- and edition-aware appUrlConfig.DOCS_URL, which selects the appropriate chat2db.ai or chat2db-ai.com host and the current /resources route. Hardcoding this URL bypasses that selection and points to an outdated or currently unavailable route. Please read DOCS_URL from the global app configuration and pass it to openWebPage(). If an ER diagram-specific help page is available, that would be preferable to the generic getting-started page.

The help button in the ER diagram toolbar had an empty onClick handler.
Now it opens the Chat2DB documentation page.
@HandSonic
HandSonic force-pushed the fix/1695-er-diagram-help branch from 47fcf03 to 2a0ed9a Compare July 21, 2026 12:28
@HandSonic

Copy link
Copy Markdown
Contributor Author

Fixed. Removed the hardcoded URL and now reads appUrlConfig.DOCS_URL from the global store via useGlobalStore, which automatically selects the correct domain (chat2db.ai or chat2db-ai.com) based on region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: 当查看ER图的时候,右上角的使用帮助点了没有反应

2 participants