-
Notifications
You must be signed in to change notification settings - Fork 248
fix: wrap long query for sql input in search page #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2
Are you sure you want to change the base?
Conversation
- add width limit to sql query input Ref: hdx-1655
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses the issue of overly long SQL query inputs on the search page by wrapping the SQL query input component in a Box component with a fixed width.
- Wraps SQL query input in a Box with a width set to 75%
- Aims to improve UI consistency and readability for query inputs
packages/app/src/DBSearchPage.tsx
Outdated
queryHistoryType={QUERY_LOCAL_STORAGE.SEARCH_SQL} | ||
enableHotkey | ||
/> | ||
<Box style={{ width: '75%' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only fixes it for the search page, but the issue is also present on the sessions page. Is there a way to fix this on the component level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, and I agree with this! However after some attempts, codemirror just too hard to configure, I can only limit the size with parent element.
I will use current approach to fix session page too, and create backlog ticket for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses display issues by wrapping long SQL query inputs in both the search and session pages, ensuring that the input fields remain readable.
- Replace Group with Flex in SessionsPage.tsx for improved layout control
- Wrap SQLInlineEditorControlled in a Box with set width in both SessionsPage.tsx and DBSearchPage.tsx
- Apply width limitations to prevent overflow of long SQL queries
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/app/src/SessionsPage.tsx | Updated layout by replacing Group with Flex and wrapping SQLInlineEditorControlled in a Box with fixed width to manage long queries |
packages/app/src/DBSearchPage.tsx | Wrapped SQLInlineEditorControlled in a Box with a 75% width to restrict input width for long queries |
wrap.mov
Ref: hdx-1655