-
Notifications
You must be signed in to change notification settings - Fork 17
feat(table): introduce recent active markers #3516
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,22 @@ | ||
| @use '../../../style/mixins'; | ||
| @use '../../../style/functions'; | ||
|
|
||
| @use '../../../style/theme-color-variables'; | ||
| @use '../../../style/color-palette-extended'; | ||
|
|
||
| @mixin table-row-selected-indicator($border-color, $z-index) { | ||
| &:before { | ||
| $width-of-selected-row-indicator: 0.2rem; | ||
| content: ''; | ||
| display: inline-block; | ||
| box-sizing: border-box; | ||
| position: sticky; | ||
| z-index: $z-index; | ||
| inset: 0 0 auto 0; | ||
| border: $width-of-selected-row-indicator solid $border-color; | ||
| border-radius: 1rem; | ||
| margin-right: -$width-of-selected-row-indicator * 2; | ||
| } | ||
| } | ||
| .interactive-feedback { | ||
| // This is a div, injected by us into all rows. | ||
| // We use it to visualize interactive feedback. | ||
|
|
@@ -45,19 +61,10 @@ | |
| box-shadow: var(--button-shadow-inset-pressed); | ||
| } | ||
|
|
||
| &:before { | ||
| $width-of-selected-row-indicator: 0.2rem; | ||
| content: ''; | ||
| display: inline-block; | ||
| box-sizing: border-box; | ||
| position: sticky; | ||
| z-index: $table--has-interactive-rows--selectable-row--hover + 1; | ||
| inset: 0 0 auto 0; | ||
| border: $width-of-selected-row-indicator solid | ||
| var(--mdc-theme-primary); | ||
| border-radius: 1rem; | ||
| margin-right: -$width-of-selected-row-indicator * 2; | ||
| } | ||
| @include table-row-selected-indicator( | ||
| var(--mdc-theme-primary), | ||
| $table--has-interactive-rows--selectable-row--hover + 1 | ||
| ); | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -89,6 +96,12 @@ | |
| } | ||
| } | ||
| } | ||
| .recent-active { | ||
| @include table-row-selected-indicator( | ||
| rgb(var(--contrast-700)), | ||
| $table--has-interactive-rows--selectable-row--hover + 1 | ||
| ); | ||
| } | ||
|
Comment on lines
+99
to
+104
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Scope and z-index of
Example diff: @@ :host(.has-interactive-rows) {
- .recent-active {
+ .tabulator-row.selectable.recent-active {
@include table-row-selected-indicator(
rgb(var(--contrast-700)),
- $table--has-interactive-rows--selectable-row--hover + 1
+ $table--has-interactive-rows--selectable-row--hover
);
}🤖 Prompt for AI Agents (early access) |
||
| } | ||
|
|
||
| :host(.has-low-density) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
DRY refactor: extract row indicator pseudo-element into a mixin
Great consolidation of the repeated
:beforepseudo-element styling into@mixin table-row-selected-indicator. As an optional improvement, you could expose the$width-of-selected-row-indicatoras a mixin parameter to make this more flexible for different indicator sizes.🤖 Prompt for AI Agents (early access)