Skip to content

dbeaver/pro#5821 Style fixes - #3479

Merged
sergeyteleshev merged 7 commits into
develfrom
5821-cb-ui-kit-fix---fix-styles
May 27, 2025
Merged

sergeyteleshev merged 7 commits into
develfrom
5821-cb-ui-kit-fix---fix-styles

Conversation

@SychevAndrey

Copy link
Copy Markdown
Member

Change button in Image ValuePanel
add default styles for IconButton and Spinner components

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Updates visual styles for image value controls and core UI components by refining button styling and introducing default styles for spinners and icon buttons.

  • Refactored bytesToSize call and added a secondary variant to the load button in ImageValuePresentation.
  • Added base-layer CSS for spinner stroke color and imported it in the theme service.
  • Enabled a pointer cursor on icon buttons.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx Simplify bytesToSize expression and specify variant="secondary" on the load button
webapp/packages/core-theming/src/styles/UiSpinner.css Define default spinner stroke color under a base layer
webapp/packages/core-theming/src/ThemeService.ts Import the new UiSpinner.css stylesheet
common-react/@dbeaver/ui-kit/src/IconButton/IconButton.css Add cursor: pointer to icon buttons
Comments suppressed due to low confidence (2)

webapp/packages/core-theming/src/styles/UiSpinner.css:3

  • Consider adding visual regression or unit tests to verify that the spinner uses the theme's primary color by default and appears correctly in different themes.
--dbv-kit-spinner-stroke-color: var(--theme-primary);

webapp/packages/plugin-data-viewer/src/ValuePanelPresentation/ImageValue/ImageValuePresentation.tsx:50

  • The parentheses around the ternary expression argument are unnecessary and reduce readability. Consider removing them: bytesToSize(isResultSetContentValue(data.cellValue) ? data.cellValue.contentLength ?? 0 : 0).
const valueSize = bytesToSize(isResultSetContentValue(data.cellValue) ? (data.cellValue.contentLength ?? 0) : 0);

Comment on lines +20 to +21
cursor: pointer;

Copilot AI May 27, 2025

Copy link

Choose a reason for hiding this comment

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

Apply the pointer cursor only when the button is enabled and add a disabled state cursor. E.g.: .dbv-kit-icon-btn:not(:disabled) { cursor: pointer; } .dbv-kit-icon-btn:disabled { cursor: not-allowed; }.

Suggested change
cursor: pointer;
cursor: default;
&:not(:disabled) {
cursor: pointer;
}
&:disabled {
cursor: not-allowed;
}

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make sense

sergeyteleshev
sergeyteleshev previously approved these changes May 27, 2025
Wroud
Wroud previously approved these changes May 27, 2025
Comment on lines +20 to +21
cursor: pointer;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make sense

@SychevAndrey
SychevAndrey dismissed stale reviews from Wroud and sergeyteleshev via aec09a9 May 27, 2025 13:46
@sergeyteleshev
sergeyteleshev merged commit c488612 into devel May 27, 2025
@sergeyteleshev
sergeyteleshev deleted the 5821-cb-ui-kit-fix---fix-styles branch May 27, 2025 15:49
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.

6 participants