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

8980 - Datagrid Contextual Toolbar Hover #8989

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

## v4.99.0 Fixes

- `[ContextualToolbar]` Fixed datagrid hover color for contextual toolbar when a row is selected. ([#8980](https://github.com/infor-design/enterprise-/issues/8980))
- `[Datagrid]` Fixed a bug in compact mode where datagrid filters doesn't extend all throughout the parents width. ([#8900](https://github.com/infor-design/enterprise-/issues/8900))
- `[Datagrid]` Fixed data return by select event on datagrid when having filter on. ([#8905](https://github.com/infor-design/enterprise/issues/8905))
- `[Datagrid]` Optimize the initial loading of datagrids with filterable setting. ([#8935](https://github.com/infor-design/enterprise/issues/8935))
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ a.btn-close {
overflow: hidden;

&:hover:not([disabled]):not(.btn-primary):not(.btn-secondary) {
background-color: $button-color-tertiary-hover-background-new !important;
background-color: $button-color-tertiary-hover-background-new;
color: $button-color-tertiary-hover-text;

.icon {
Expand Down
2 changes: 1 addition & 1 deletion src/components/toolbar/_toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ $toolbar-buttonset-height: 40px;
}

&:hover {
color: $contextual-toolbar-button-hover-color;
color: $contextual-toolbar-button-hover-color !important;
background-color: rgba(0, 0, 0, .3) !important;

.icon {
Expand Down
26 changes: 26 additions & 0 deletions tests/datagrid/datagrid.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,30 @@ test.describe('Datagrid tests', () => {
});
});
});

test.describe('datagrid toolbar button tests', () => {
const url = '/components/datagrid/example-mixed-selection.html';

test.beforeEach(async ({ page }) => {
await page.goto(url);
});

test.describe('button hover tests', () => {
test('value should have a proper color', async ({ page }) => {
await page.evaluate('document.getElementsByClassName("datagrid-selection-checkbox")[0].click()');

await expect(page.locator('.contextual-toolbar > .buttonset > .btn')).toBeVisible();

const button = page.locator('.contextual-toolbar > .buttonset > .btn');
await button.hover();

// eslint-disable-next-line arrow-body-style
const color = await button.evaluate((el) => {
return window.getComputedStyle(el).getPropertyValue('background-color');
});

await expect(color).toBe('rgba(0, 0, 0, 0.3)');
});
});
});
});
Loading