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

Fix: sort icons on Table overlapped next columns #3940

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

kikuomax
Copy link
Collaborator

Fixes

Proposed Changes

  • Place the sort icons inside the columns instead of at the right side of the column label texts
    • The sort icons are placed on the left if is-numeric is true, otherwise on the right.
  • In the sort-multiple mode, group the sort icon, number, and delete button as multi-sort-icons so that they won't split
    • The delete buttons used to be placed at the right side of the column label texts, but they are placed in the same flow with the column label texts now
    • The multi-sort-icons groups are placed on the left if is-numeric is true, otherwise on the right.

- 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
Copy link

netlify bot commented Dec 19, 2023

Deploy Preview for buefy-org ready!

Name Link
🔨 Latest commit 29a707d
🔍 Latest deploy log https://app.netlify.com/sites/buefy-org/deploys/6580fd3087798400087280f5
😎 Deploy Preview https://deploy-preview-3940--buefy-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kikuomax kikuomax changed the title fix(lib): sort icons on Table overlapped next columns Fix: sort icons on Table overlapped next columns Dec 19, 2023
@wesdevpro wesdevpro merged commit 03ead09 into buefy:dev Dec 21, 2023
5 checks passed
@kikuomax kikuomax deleted the fix-table-sort-icons branch December 21, 2023 03:48
kikuomax added a commit to kikuomax/buefy that referenced this pull request 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 pull request 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 pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tables: column sort icon overlaps into next column Table with sticky-header and sortable clips sort icon
2 participants