Skip to content

Feat/queryui#607

Merged
sunchanglong merged 2 commits intomainfrom
feat/queryui
Mar 6, 2026
Merged

Feat/queryui#607
sunchanglong merged 2 commits intomainfrom
feat/queryui

Conversation

@sunchanglong
Copy link
Copy Markdown
Collaborator

image

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on refining the user interface and experience of the query editor within the dashboard. It includes adjustments to component spacing, improved layout for the CodeMirror editor instances, and minor styling updates to ensure a more polished and consistent visual presentation across the query interface.

Highlights

  • Query Editor Layout Refinement: Adjusted padding and spacing within the query editor card and its header to improve visual presentation.
  • CodeMirror Editor Integration: Enhanced the CodeMirror editor's display by wrapping it in a dedicated container and ensuring it fills its parent's dimensions, improving its responsiveness and layout.
  • Styling Consistency: Standardized border-radius for the CodeMirror editor and updated button group border styles for a more cohesive look.
  • Redundant Style Removal: Eliminated a duplicate height definition for the CodeMirror component, streamlining the styling logic.
Changelog
  • src/views/dashboard/query/editor.vue
    • Adjusted padding for the editor card and its header
    • Removed the 'Ctrl + Enter' tooltip from the run query button
    • Added a specific class and inline height style to the a-resize-box component
    • Wrapped CodeMirror instances in a new div and set their styles to fill 100% width and height
    • Removed a redundant style constant that defined CodeMirror height
    • Removed a global .arco-resizebox height definition
    • Added a specific padding-bottom style for the .editor-resize-box class
    • Updated the border-right style for primary buttons in a group
  • src/views/dashboard/query/index.vue
    • Removed top padding from the .editor-space container
    • Modified the border-radius for the CodeMirror editor within the editor card to be uniform
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sunchanglong sunchanglong merged commit 2131aba into main Mar 6, 2026
1 check passed
@sunchanglong sunchanglong deleted the feat/queryui branch March 6, 2026 07:09
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the query UI, moving some styling from CSS classes and objects to inline styles, and cleaning up some related code. While the refactoring seems to improve the layout, there are a few areas that could be improved for better maintainability and user experience. Specifically, I've pointed out the use of inline styles and !important, which are generally discouraged, and the removal of a helpful user tooltip.

Comment on lines +2 to +3
a-card.editor-card(style="padding-bottom: 10px" :bordered="false")
a-space.space-between(style="padding: 10px 0")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using inline styles for layout properties like padding can make the component harder to maintain and theme. It's generally better to use CSS classes. You've replaced the pb-15 utility class with an inline style. Consider defining these styles in a class within the <style> block instead.

Comment on lines +11 to +16
a-popover(position="bl" content-class="code-tooltip" :content="currentStatement")
a-space(:size="4")
icon-loading(v-if="secondaryCodeRunning" spin)
icon-play-arrow(v-else)
div {{ $t('dashboard.runQuery') + (queryType === 'sql' && currentQueryNumber ? ' #' + currentQueryNumber : '') }}
icon-close-circle-fill.icon-16(v-if="secondaryCodeRunning")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The tooltip displaying the Ctrl + Enter shortcut for running a query was removed. This shortcut is a great usability feature, and the tooltip was important for its discoverability. Please consider re-adding it to improve user experience.

        a-tooltip(position="left" content="Ctrl + Enter")
          a-popover(position="bl" content-class="code-tooltip" :content="currentStatement")
            a-space(:size="4")
              icon-loading(v-if="secondaryCodeRunning" spin)
              icon-play-arrow(v-else)
              div {{ $t('dashboard.runQuery') + (queryType === 'sql' && currentQueryNumber ? ' #' + currentQueryNumber : '') }}
              icon-close-circle-fill.icon-16(v-if="secondaryCodeRunning") 

span.ml-2 {{ $t('dashboard.examples') }}
a-typography-text(v-for="item of durationExamples" :key="item" code) {{ item }}
a-resize-box(:directions="['bottom']")
a-resize-box.editor-resize-box(:directions="['bottom']" :style="{ height: '254px' }")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A hardcoded height is being set with an inline style. It's better to define this in a CSS class for consistency and maintainability. You've already added the editor-resize-box class, so you could add the height property to its definition in the <style> block and remove the inline style.

  a-resize-box.editor-resize-box(:directions="['bottom']")

}

.editor-resize-box {
padding-bottom: 12px !important;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of !important should be avoided as it can lead to CSS that is difficult to maintain and debug, because it breaks the natural cascading of stylesheets. Please try to increase the specificity of the selector or refactor the CSS to avoid needing !important.

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.

1 participant