Skip to content

fix: removed scrollbar, elipsified overflow text supporting tooltip#17078

Merged
charlesBochet merged 2 commits intotwentyhq:mainfrom
carbonFibreCode:fix/visible-scrolls-while-adding-new-field-to-object
Jan 12, 2026
Merged

fix: removed scrollbar, elipsified overflow text supporting tooltip#17078
charlesBochet merged 2 commits intotwentyhq:mainfrom
carbonFibreCode:fix/visible-scrolls-while-adding-new-field-to-object

Conversation

@carbonFibreCode
Copy link
Copy Markdown
Contributor

@carbonFibreCode carbonFibreCode commented Jan 11, 2026

fixes #15152

Added CSS to ellipsify overflowing text with tooltip support, consistent with existing dropdown implementations such as the address dropdown for long country names.
This approach resolves the issue locally without modifying global components, avoiding the limitations of previous attempts.

Screenshot 2026-01-11 at 4 09 45 PM

Before :

Screenshot 2026-01-11 at 4 09 11 PM

After :

Screenshot 2026-01-11 at 4 08 28 PM

Copilot AI review requested due to automatic review settings January 11, 2026 10:26
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve the user experience by removing scrollbars and handling text overflow with ellipsis in the SettingsMorphRelationMultiSelect component dropdown items.

Changes:

  • Added a new styled wrapper component (StyledMenuItemWrapper) with flex layout and ellipsis overflow handling
  • Wrapped MenuItemMultiSelect instances within the new styled component to apply text truncation styling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +77 to +82

> div > div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title mentions "supporting tooltip", but the implementation doesn't actually add tooltip functionality. The MenuItemMultiSelect component uses MenuItemLeftContent internally, which already has OverflowingTextWithTooltip support when text is a string. The wrapper div with ellipsis styles may interfere with the existing tooltip mechanism. Consider verifying that the tooltip still functions correctly, or if tooltip support needs to be explicitly added to this component.

Suggested change
> div > div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +82

> div > div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CSS selector '> div > div' is too generic and fragile. It assumes a specific nested structure that may break if the internal structure of MenuItemMultiSelect changes. Since MenuItemMultiSelect internally uses MenuItemLeftContent which already has OverflowingTextWithTooltip (with built-in ellipsis handling), this styling may be redundant or conflicting. Consider either removing this wrapper entirely or using a more specific class-based selector if custom styling is truly necessary.

Suggested change
> div > div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 11, 2026

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:18106

This environment will automatically shut down when the PR is closed or after 5 hours.

@carbonFibreCode carbonFibreCode changed the title removed scrollbar, elipsified overflow text supporting tooltip fix: removed scrollbar, elipsified overflow text supporting tooltip Jan 11, 2026
gap: ${({ theme }) => theme.spacing(2)};
min-width: 0;

> div > div {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's avoid doing it. Is this the way it's done in other dropdowns?

I feel we should be using Existing TextWithOverflowingTooltip component. If not possible, we should add this style to the container itself and not using > div > div that will break when we change the DOM structure

@charlesBochet
Copy link
Copy Markdown
Member

I have made the fix, ty!

@charlesBochet charlesBochet added this pull request to the merge queue Jan 12, 2026
Merged via the queue into twentyhq:main with commit d5acc24 Jan 12, 2026
63 checks passed
@twenty-eng-sync
Copy link
Copy Markdown

Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

1 similar comment
@twenty-eng-sync
Copy link
Copy Markdown

Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

@carbonFibreCode
Copy link
Copy Markdown
Contributor Author

I have made the fix, ty!

hey, thanks for the fix, i was trying to push changes rn but it's already merged... lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visible scrolls while adding new field to an object

3 participants