-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix: stop tooltip from overflowing out of view in preview and deployed mode. #39159
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
Conversation
WalkthroughThe tooltip component now uses an updated configuration within its Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
…ttps://github.com/appsmithorg/appsmith into fix/tooltip-position-fix-draft-pr
…o fix/tooltip-position-fix-draft-pr
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts (2)
107-107: LGTM! Consider adding a comment.The assertion correctly validates the tooltip's overflow property. Consider adding a comment explaining why overflow needs to be hidden for the tooltip icon.
+ // Ensure tooltip icon's content is properly contained agHelper.AssertCSS(locators._tooltipIcon, "overflow", "hidden");
30-31: Refactor selector string concatenations into locator variables.String concatenation for selectors is error-prone and harder to maintain. Consider moving these selectors into the locators object.
Example refactor:
// In locators.ts + _inputV2Input: `${this._widgetInDeployed(draggableWidgets.INPUT_V2)} input`, + _inputV2Textarea: `${this._widgetInDeployed(draggableWidgets.INPUT_V2)} textarea`, // In test file - agHelper.TypeText(locators._widgetInDeployed(draggableWidgets.INPUT_V2) + " input", "test") + agHelper.TypeText(locators._inputV2Input, "test")Also applies to: 34-35, 50-51, 67-68, 86-87, 109-110, 133-134, 141-142, 152-153, 158-159
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`app/client/cypress/**/**.*`: Review the following e2e test ...
app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:
- Follow best practices for Cypress code and e2e automation.
- Avoid using cy.wait in code.
- Avoid using cy.pause in code.
- Avoid using agHelper.sleep().
- Use locator variables for locators and do not use plain strings.
- Use data-* attributes for selectors.
- Avoid Xpaths, Attributes and CSS path.
- Avoid selectors like .btn.submit or button[type=submit].
- Perform logins via API with LoginFromAPI.
- Perform logout via API with LogOutviaAPI.
- Perform signup via API with SignupFromAPI.
- Avoid using it.only.
- Avoid using after and aftereach in test cases.
- Use multiple assertions for expect statements.
- Avoid using strings for assertions.
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input3_Spec.ts
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: perform-test / rts-build / build
- GitHub Check: perform-test / client-build / client-build
- GitHub Check: perform-test / server-build / server-unit-tests
- GitHub Check: client-lint / client-lint
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-build / client-build
- GitHub Check: client-prettier / prettier-check
- GitHub Check: chromatic-deployment
- GitHub Check: storybook-tests
- GitHub Check: chromatic-deployment
…d mode. (appsmithorg#39159) ### Problem Tooltips in the application were overflowing out of the viewport, causing them to be partially or completely hidden. ### Why This is Happening The preventOverflow modifier was disabled, and the flip modifier was not enabled in the Tooltip component, leading to improper positioning of tooltips. ### Solution - Enabled the preventOverflow modifier and set its boundary to the viewport. - Enabled the flip modifier to ensure better positioning of tooltips. - Added a CSS assertion in the Input widget tests to verify that the tooltip icon has an overflow property set to "hidden". ### Why This is the Best Solution Enabling these modifiers ensures that tooltips adjust dynamically to remain fully on-screen, improving the user experience by making tooltips consistently visible. The additional test assertion helps maintain the integrity of the tooltip icon's CSS properties. Fixes appsmithorg#34445 ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/13305105052> > Commit: 1f20716 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13305105052&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Thu, 13 Feb 2025 11:33:13 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Enhanced tooltip behavior improves positioning and visibility by ensuring tooltips adjust dynamically to remain fully on-screen. - **Tests** - Added assertions to validate tooltip appearance and behavior in the InputV2 widget tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Problem
Tooltips in the application were overflowing out of the viewport, causing them to be partially or completely hidden.
Why This is Happening
The preventOverflow modifier was disabled, and the flip modifier was not enabled in the Tooltip component, leading to improper positioning of tooltips.
Solution
Why This is the Best Solution
Enabling these modifiers ensures that tooltips adjust dynamically to remain fully on-screen, improving the user experience by making tooltips consistently visible. The additional test assertion helps maintain the integrity of the tooltip icon's CSS properties.
Fixes #34445
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13305105052
Commit: 1f20716
Cypress dashboard.
Tags:
@tag.AllSpec:
Thu, 13 Feb 2025 11:33:13 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Tests