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

Grid resize handle overlaps column sorter #5637

Closed
rolfsmeds opened this issue Mar 2, 2023 · 1 comment · Fixed by #7718
Closed

Grid resize handle overlaps column sorter #5637

rolfsmeds opened this issue Mar 2, 2023 · 1 comment · Fixed by #7718
Assignees

Comments

@rolfsmeds
Copy link
Contributor

rolfsmeds commented Mar 2, 2023

Description

The resize handle overlaps the column sorter, on columns that are both resizable and sortable, leaving only a few pixels of interaction area for the sorter, making it quite difficult to hit.
image

Expected outcome

The resize handle should be just small enough not to overlap the sorter.

A suitable size for the handle would probably be --lumo-size-m, as that is the size of the padding between the sort indicator and the cell edge, and the resize handle extends 50% into the cell on each side.

Minimal reproducible example

Grid<Person> grid = new Grid<>(Person.class);
grid.getColumns().get(0).setResizable(true);
grid.getColumns().get(0).setSortable(true);
grid.setItems(makePeople());
add(grid);

Steps to reproduce

Make the column small enough that there is no extra space to the right of the sort indicator, and then try using the sort indicator.

Environment

Vaadin version(s): V14–V24

Browsers

Issue is not browser related

@rolfsmeds
Copy link
Contributor Author

CSS-based workaround until this is fixed:

vaadin-grid::part(resize-handle)::before {
  width: var(--lumo-size-m);
}

@DiegoCardoso DiegoCardoso self-assigned this Aug 29, 2024
DiegoCardoso added a commit that referenced this issue Aug 29, 2024
Decrease the resize handle area to use `--lumo-size-s` to avoid any
overlapping with the column sorter when the column width is reduced.
Also uses the resize handle width to calculate the amount of translation
in the X axis to make it better center aligned.

Fixes #5637
vaadin-bot pushed a commit that referenced this issue Aug 30, 2024
* fix: make resize handle not overlap with column sorter

Decrease the resize handle area to use `--lumo-size-s` to avoid any
overlapping with the column sorter when the column width is reduced.
Also uses the resize handle width to calculate the amount of translation
in the X axis to make it better center aligned.

Fixes #5637
DiegoCardoso added a commit that referenced this issue Aug 30, 2024
…4.4) (#7720)

* fix: make resize handle not overlap with column sorter

Decrease the resize handle area to use `--lumo-size-s` to avoid any
overlapping with the column sorter when the column width is reduced.
Also uses the resize handle width to calculate the amount of translation
in the X axis to make it better center aligned.

Fixes #5637

Co-authored-by: Diego Cardoso <diego@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants