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

Tables: column sort icon overlaps into next column #3034

Closed
eleanorcox opened this issue Nov 12, 2020 · 2 comments · Fixed by #3940
Closed

Tables: column sort icon overlaps into next column #3034

eleanorcox opened this issue Nov 12, 2020 · 2 comments · Fixed by #3940
Assignees
Labels

Comments

@eleanorcox
Copy link

Overview of the problem

Buefy version: [0.9.4]
Vuejs version: [2.6.12]
OS/Browser: Ubuntu/Chrome

Description

buefy_issue_sort_arrow
For tables with sortable columns, sometimes the sort arrow overlaps into the next column label. This is because the column width doesn't take into account the width of the sort icon. This happens with tables with lots of columns, and is worse on screen sizes up to desktop (particularly between mobile and desktop sizes). This only affects columns where the label is the same width or wider than the data itself (i.e. not columns where the data takes up significantly more space than the label, as here the icon displays within the width of the column).

Steps to reproduce

  1. Create a table with lots of sortable columns (~10) and populate with data
  2. Resize screen and observe. As columns get thinner, the arrow icon overlaps with the next column

Expected behaviour

The width of the column you are sorting by should also include the width of the sort icon.

Actual behaviour

The column width is calculated from the label and data alone, meaning the sort icon overlaps into the next column.

@jtommy jtommy added the bug label Nov 12, 2020
@jtommy
Copy link
Member

jtommy commented Nov 12, 2020

I want to refactor table header classes, there is something weird

@kikuomax
Copy link
Collaborator

kikuomax commented Dec 8, 2023

This seems to be related to:

@kikuomax kikuomax self-assigned this Dec 18, 2023
kikuomax added a commit to kikuomax/buefy that referenced this issue Dec 19, 2023
- Fixes the issue that sort icons on Table overlapped or were clipped by
  next columns.

  Since sort icons were absolutely positioned and placed at the right
  side of the column label texts, the icons overlapped or were clipped
  by the right columns when columns were packed. This commit changes the
  anchor element for sort icons to `<div class="th-wrap">` elements that
  wrap the column label texts and absolutely places sort icons ON the
  right end of the `<div class="th-wrap">` elements instead. If the
  column `is-numeric`, the sort icon is placed on the left end of the
  `<div class="th-wrap">` element, otherwise the sort icon overlaps the
  column label text.

  Similar problems occurred when the `sort-multiple` option was turned
  on. Applying the above solution to the delete buttons of sort
  indicators did not work well. The delete buttons were torn apart from
  the sort icons since the sort icons aligned with the normal flow of
  the column label texts. I decided to group the sort icon, number, and
  delete button as `multi-sort-icons` so that they do not split.
  `multi-sort-icons` is placed in the normal flow of the column label
  texts and moves to the next line if the column is packed.

issues
- buefy#2886
- buefy#3034
wesdevpro pushed a commit that referenced this issue Dec 21, 2023
- Fixes the issue that sort icons on Table overlapped or were clipped by
  next columns.

  Since sort icons were absolutely positioned and placed at the right
  side of the column label texts, the icons overlapped or were clipped
  by the right columns when columns were packed. This commit changes the
  anchor element for sort icons to `<div class="th-wrap">` elements that
  wrap the column label texts and absolutely places sort icons ON the
  right end of the `<div class="th-wrap">` elements instead. If the
  column `is-numeric`, the sort icon is placed on the left end of the
  `<div class="th-wrap">` element, otherwise the sort icon overlaps the
  column label text.

  Similar problems occurred when the `sort-multiple` option was turned
  on. Applying the above solution to the delete buttons of sort
  indicators did not work well. The delete buttons were torn apart from
  the sort icons since the sort icons aligned with the normal flow of
  the column label texts. I decided to group the sort icon, number, and
  delete button as `multi-sort-icons` so that they do not split.
  `multi-sort-icons` is placed in the normal flow of the column label
  texts and moves to the next line if the column is packed.

issues
- #2886
- #3034
kikuomax added a commit to kikuomax/buefy that referenced this issue Jan 10, 2024
- Fixes the issue that sort icons on Table overlapped or were clipped by
  next columns.

  Since sort icons were absolutely positioned and placed at the right
  side of the column label texts, the icons overlapped or were clipped
  by the right columns when columns were packed. This commit changes the
  anchor element for sort icons to `<div class="th-wrap">` elements that
  wrap the column label texts and absolutely places sort icons ON the
  right end of the `<div class="th-wrap">` elements instead. If the
  column `is-numeric`, the sort icon is placed on the left end of the
  `<div class="th-wrap">` element, otherwise the sort icon overlaps the
  column label text.

  Similar problems occurred when the `sort-multiple` option was turned
  on. Applying the above solution to the delete buttons of sort
  indicators did not work well. The delete buttons were torn apart from
  the sort icons since the sort icons aligned with the normal flow of
  the column label texts. I decided to group the sort icon, number, and
  delete button as `multi-sort-icons` so that they do not split.
  `multi-sort-icons` is placed in the normal flow of the column label
  texts and moves to the next line if the column is packed.

issues
- buefy#2886
- buefy#3034
kikuomax added a commit to kikuomax/buefy that referenced this issue Feb 11, 2024
- Fixes the issue that sort icons on Table overlapped or were clipped by
  next columns.

  Since sort icons were absolutely positioned and placed at the right
  side of the column label texts, the icons overlapped or were clipped
  by the right columns when columns were packed. This commit changes the
  anchor element for sort icons to `<div class="th-wrap">` elements that
  wrap the column label texts and absolutely places sort icons ON the
  right end of the `<div class="th-wrap">` elements instead. If the
  column `is-numeric`, the sort icon is placed on the left end of the
  `<div class="th-wrap">` element, otherwise the sort icon overlaps the
  column label text.

  Similar problems occurred when the `sort-multiple` option was turned
  on. Applying the above solution to the delete buttons of sort
  indicators did not work well. The delete buttons were torn apart from
  the sort icons since the sort icons aligned with the normal flow of
  the column label texts. I decided to group the sort icon, number, and
  delete button as `multi-sort-icons` so that they do not split.
  `multi-sort-icons` is placed in the normal flow of the column label
  texts and moves to the next line if the column is packed.

issues
- buefy#2886
- buefy#3034
kikuomax added a commit to ntohq/buefy-next that referenced this issue Feb 12, 2024
- Fixes the issue that sort icons on Table overlapped or were clipped by
  next columns.

  Since sort icons were absolutely positioned and placed at the right
  side of the column label texts, the icons overlapped or were clipped
  by the right columns when columns were packed. This commit changes the
  anchor element for sort icons to `<div class="th-wrap">` elements that
  wrap the column label texts and absolutely places sort icons ON the
  right end of the `<div class="th-wrap">` elements instead. If the
  column `is-numeric`, the sort icon is placed on the left end of the
  `<div class="th-wrap">` element, otherwise the sort icon overlaps the
  column label text.

  Similar problems occurred when the `sort-multiple` option was turned
  on. Applying the above solution to the delete buttons of sort
  indicators did not work well. The delete buttons were torn apart from
  the sort icons since the sort icons aligned with the normal flow of
  the column label texts. I decided to group the sort icon, number, and
  delete button as `multi-sort-icons` so that they do not split.
  `multi-sort-icons` is placed in the normal flow of the column label
  texts and moves to the next line if the column is packed.

issues
- buefy#2886
- buefy#3034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed ✅
Development

Successfully merging a pull request may close this issue.

3 participants