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

Fix Notebook entry hover problem #7106

Merged
merged 13 commits into from
Dec 14, 2023
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
29 changes: 29 additions & 0 deletions e2e/tests/visual/notebook.visual.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,33 @@ test.describe('Visual - Notebook', () => {
// Take snapshot of the notebook with the AutoComplete field hidden and with the "Add Tag" button visible
await percySnapshot(page, `Notebook Annotation de-select blur (theme: '${theme}')`);
});
test('Visual check of entry hover and selection', async ({ page, theme }) => {
// Make two entries so we can test an unselected entry
await enterTextEntry(page, 'Entry 0');
await enterTextEntry(page, 'Entry 1');

// Hover the first entry
await page.getByText('Entry 0').hover();

// Take a snapshot
await percySnapshot(page, `Notebook Non-selected Entry Hover (theme: '${theme}')`);

// Click the first entry
await page.getByText('Entry 0').click();

// Take a snapshot
await percySnapshot(page, `Notebook Selected Entry Hover (theme: '${theme}')`);

// Hover the text entry area
await page.getByText('Entry 0').hover();

// Take a snapshot
await percySnapshot(page, `Notebook Selected Entry Text Area Hover (theme: '${theme}')`);

// Click the text entry area
await page.getByText('Entry 0').click();

// Take a snapshot
await percySnapshot(page, `Notebook Selected Entry Text Area Active (theme: '${theme}')`);
});
});
1 change: 1 addition & 0 deletions src/styles/_constants-espresso.scss
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ $colorFormLines: rgba(#000, 0.2);
$colorFormSectionHeaderBg: rgba(#000, 0.1);
$colorFormSectionHeaderFg: rgba($colorBodyFg, 0.8);
$colorInputBg: rgba(black, 0.2);
$colorInputBgHov: rgba(black, 0.1);
$colorInputFg: $colorBodyFg;
$colorFormText: pushBack($colorBodyFg, 10%);
$colorInputIcon: pushBack($colorBodyFg, 25%);
Expand Down
1 change: 1 addition & 0 deletions src/styles/_constants-maelstrom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ $colorFormLines: rgba(#000, 0.1);
$colorFormSectionHeaderBg: rgba(#000, 0.1);
$colorFormSectionHeaderFg: rgba($colorBodyFg, 0.8);
$colorInputBg: rgba(black, 0.2);
$colorInputBgHov: rgba(black, 0.1);
$colorInputFg: $colorBodyFg;
$colorFormText: pushBack($colorBodyFg, 10%);
$colorInputIcon: pushBack($colorBodyFg, 25%);
Expand Down
1 change: 1 addition & 0 deletions src/styles/_constants-snow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ $colorFormLines: rgba(#000, 0.2);
$colorFormSectionHeaderBg: rgba(#000, 0.05);
$colorFormSectionHeaderFg: rgba($colorBodyFg, 0.5);
$colorInputBg: $colorGenBg;
$colorInputBgHov: rgba($colorGenBg, 0.7);
$colorInputFg: $colorBodyFg;
$colorFormText: pushBack($colorBodyFg, 10%);
$colorInputIcon: pushBack($colorBodyFg, 25%);
Expand Down
4 changes: 2 additions & 2 deletions src/styles/notebook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@
cursor: text;

@include hover() {
&:not(:focus, .locked) {
background: $colorInputBg;
&:not(.locked) {
background: $colorInputBgHov;
}
}

Expand Down
Loading