Skip to content
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

CB-5052 [2562 FR] Highlight the row where any field is currently selected #2952

Conversation

sergeyteleshev
Copy link
Contributor

No description provided.

@sergeyteleshev sergeyteleshev self-assigned this Sep 30, 2024
Comment on lines 241 to 243
function hasSelectedInRow(rowIdx: number) {
return props.selectionAction.getFocusedElement()?.row.index === rowIdx;
}
Copy link
Member

Choose a reason for hiding this comment

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

please rename selected to focused, also seems like it's better to expose computed like focused element and in cell / header renderers use this information to detect if current cell / header is focused.
Also please note, that selectionAction.getFocusedElement()'s column / row is not the same as column.idx / rowIdx index in data grid you need to use cell (https://github.com/dbeaver/cloudbeaver/pull/2952/files#diff-064428d02a72e78faffcf66fbd166bc59e9692a8fb55ccf92565cc00ef13a62cR43)

Comment on lines 15 to 16
const dark = (await import('./dark.module.scss')).default;
const light = (await import('./light.module.scss')).default;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

had preloaded all styles at one time, cause the theme did not apply until <TableGrid> component was fully rerendered (reload page or tab)


@import '@cloudbeaver/core-theming/src/styles/theme-dark';

:global .#{$theme-class} {
Copy link
Member

@devnaumov devnaumov Oct 2, 2024

Choose a reason for hiding this comment

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

We deleted these files on purpose, we dont want to use them anymore. We should define all styles in DataGridTable.module.css. Probably we want to add light-dark() postcss mixin or something like this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I rolled back changes, so we don't have a themed data grid. It is not required for now

background-color: #2a7cb4;
background-color: var(--theme-primary);
Copy link
Member

Choose a reason for hiding this comment

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

theme may be unavailable in this component, please keep inlined styles

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@sergeyteleshev sergeyteleshev requested a review from Wroud October 3, 2024 08:52
@Wroud Wroud dismissed devnaumov’s stale review October 8, 2024 09:51

seems everything fine right now

@Wroud Wroud merged commit 2a1adc1 into devel Oct 8, 2024
5 of 6 checks passed
@Wroud Wroud deleted the CB-5052-2562-fr-highlight-the-row-where-any-field-is-currently-selected branch October 8, 2024 09:56
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.

4 participants