Skip to content

fix(Table): add ability to redefine max height for menu popup#2612

Merged
leushin merged 2 commits intomainfrom
disable-scroll-row-table-actions
Mar 17, 2026
Merged

fix(Table): add ability to redefine max height for menu popup#2612
leushin merged 2 commits intomainfrom
disable-scroll-row-table-actions

Conversation

@leushin
Copy link
Copy Markdown
Contributor

@leushin leushin commented Mar 12, 2026

No description provided.

@leushin leushin requested a review from Raubzeug as a code owner March 12, 2026 17:19
@gravity-ui
Copy link
Copy Markdown
Contributor

gravity-ui Bot commented Mar 12, 2026

🎭 Component Tests Report is ready.

@leushin leushin force-pushed the disable-scroll-row-table-actions branch from 7ced288 to 88f9747 Compare March 12, 2026 17:22
@gravity-ui
Copy link
Copy Markdown
Contributor

gravity-ui Bot commented Mar 12, 2026

Preview is ready.

@Raubzeug
Copy link
Copy Markdown
Contributor

@leushin Hi! Could you please explain what issue is being addressed in this pull request?

@leushin
Copy link
Copy Markdown
Contributor Author

leushin commented Mar 13, 2026

@leushin Hi! Could you please explain what issue is being addressed in this pull request?

We have a case where important menu items are hidden behind a scroll, making it unclear to users that there is anything else there.

These changes allow you to disable the maximum height for the entire menu and set the required minimum height.

This way, you can customize the display of the table's menu actions: show everything without hiding it behind a scroll, or stretch it to the desired number of menu items.

@Raubzeug
Copy link
Copy Markdown
Contributor

@leushin Adding two new props here makes the component API a bit heavier, and it looks like these are purely styling concerns rather than behavior.
Could we consider using a CSS custom property instead? That would keep the component API clean and still allow consumers to override the styling when needed (including theming), without introducing extra props.

@leushin
Copy link
Copy Markdown
Contributor Author

leushin commented Mar 16, 2026

@leushin Adding two new props here makes the component API a bit heavier, and it looks like these are purely styling concerns rather than behavior. Could we consider using a CSS custom property instead? That would keep the component API clean and still allow consumers to override the styling when needed (including theming), without introducing extra props.

I don't want to redefine the component's CSS class by its generated name, as it may change and cause issues in the final service. Moreover, the element itself is located in a portal, so the redefinition will need to be done globally.

CSS API is not used in the component, but it could be a solution (put 200px in a variable and override it at the service level)

Therefore, you can try to switch to the CSS API at least in this place, although I don't see it being used anywhere. Alternatively, I will ask you to expand the API to at least one method.

@Raubzeug
Copy link
Copy Markdown
Contributor

@leushin When I say “CSS API”, I mean exposing styling controls via documented CSS custom properties (CSS variables) that the component itself reads, rather than overriding generated class names.

Yes, Table doesn’t have this kind of API yet, but other UIKit components (e.g. Button) already do. That’s why I’m suggesting we follow the same approach here: keep the React props API focused on behavior, and use CSS variables as the styling contract that can be overridden at the service level (including for portal cases).

@leushin leushin force-pushed the disable-scroll-row-table-actions branch from 88f9747 to b937b0e Compare March 16, 2026 15:29
@leushin leushin changed the title feat(Table): add ability to hide scroll in row table actions fix(Table): add ability to redefine max height for menu popup Mar 16, 2026
@leushin
Copy link
Copy Markdown
Contributor Author

leushin commented Mar 16, 2026

@leushin When I say “CSS API”, I mean exposing styling controls via documented CSS custom properties (CSS variables) that the component itself reads, rather than overriding generated class names.

Yes, Table doesn’t have this kind of API yet, but other UIKit components (e.g. Button) already do. That’s why I’m suggesting we follow the same approach here: keep the React props API focused on behavior, and use CSS variables as the styling contract that can be overridden at the service level (including for portal cases).

Updated the PR, please take a look

@leushin leushin merged commit 35a98cb into main Mar 17, 2026
5 checks passed
@leushin leushin deleted the disable-scroll-row-table-actions branch March 17, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants