Skip to content

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

Open
wants to merge 3 commits into
base: v2
Choose a base branch
from

Conversation

LYHuang
Copy link

@LYHuang LYHuang commented Apr 23, 2025

  • add width limit to sql query input
  • fix in search page and session page
wrap.mov
image

Ref: hdx-1655

- add width limit to sql query input

Ref: hdx-1655
Copy link

changeset-bot bot commented Apr 23, 2025

⚠️ No Changeset found

Latest commit: a5efce1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Apr 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyperdx-v2-oss-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 7:37pm

Copy link

@Copilot Copilot AI left a 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

@LYHuang LYHuang marked this pull request as ready for review April 23, 2025 22:30
@LYHuang LYHuang changed the title fix: wrap long query for sql input in seach page fix: wrap long query for sql input in search page Apr 23, 2025
queryHistoryType={QUERY_LOCAL_STORAGE.SEARCH_SQL}
enableHotkey
/>
<Box style={{ width: '75%' }}>
Copy link

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?

Copy link
Author

@LYHuang LYHuang Apr 24, 2025

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.

Copy link

@Copilot Copilot AI left a 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

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.

2 participants