-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
feat: add overflowTooltip
to editableLabel
#720
base: main
Are you sure you want to change the base?
feat: add overflowTooltip
to editableLabel
#720
Conversation
Signed-off-by: Mathieu Anderson <[email protected]>
Will look at this failing test locally 🤔 |
A little bit confused because calling |
Thanks for opening the PR @mathieu-anderson. The code in I'm fairly certain column names are the only UI component in Grist that use it, so it should suffice to add an end-to-end test that changes a column name to be long enough to overflow, moves the mouse over the name, and checks that a tooltip appears with the full column name inside. Our end-to-end tests are stored in it('should show a tooltip for overly long column names', async function() {
const columnName = 'AReallyReallyReallyLongColumnName';
await gu.addColumn(columnName);
await getColumnHeader({col: columnName}).mouseMove();
await driver.wait(() => driver.findWait('.test-tooltip', 500).isDisplayed(), 3000);
assert.equal(await driver.find('.test-tooltip').getText(), columnName);
}); |
Thank you, will update the PR later today! |
Signed-off-by: Mathieu Anderson <[email protected]>
Signed-off-by: Mathieu Anderson <[email protected]>
The test added did pass on CI though: https://github.com/gristlabs/grist-core/actions/runs/6841340038/job/18601578573?pr=720#step:17:427 However, this one is failing, will look at it: https://github.com/gristlabs/grist-core/actions/runs/6841340038/job/18601578573?pr=720#step:17:494 |
I'll have some time later this week to look into the failure. Seems like maybe something isn't getting cleaned up in |
Resolves: #543
Description
The objective was to add a tooltip to column names when their content overflows. This PR adds
overflowTooltip({placement: 'top'})
toeditableLabel
inkoForm
, which achieves this results:Screen.Recording.2023-11-03.at.10.32.47.mov
Questions
I opened this as draft because of testing.
I noticed there was no test case for
editableLabel
, I added one following what was present for the otherkoForm
entities. However, i am not sure how to test the rendering of a tooltip.I assume that I need to trigger a
mouseenter
event and then select the test classname'info-tooltip-popup'
from the DOM, but I'm not sure how to do this.I'm also unsure if we want to unit test this, or if it should be tested in the end-to-end tests.