dbeaver/pro#5821 Style fixes - #3479
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
bytesToSizecall and added asecondaryvariant to the load button inImageValuePresentation. - 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; | ||
|
|
There was a problem hiding this comment.
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; | |
| } |
sergeyteleshev
previously approved these changes
May 27, 2025
Wroud
previously approved these changes
May 27, 2025
Comment on lines
+20
to
+21
| cursor: pointer; | ||
|
|
sergeyteleshev
approved these changes
May 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change button in Image ValuePanel
add default styles for IconButton and Spinner components