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

Table: Footer-Bereich mit Abstand zum Body #6159

Closed
3 tasks
laske185 opened this issue Mar 5, 2024 · 1 comment · Fixed by #6860
Closed
3 tasks

Table: Footer-Bereich mit Abstand zum Body #6159

laske185 opened this issue Mar 5, 2024 · 1 comment · Fixed by #6860
Assignees

Comments

@laske185
Copy link
Contributor

laske185 commented Mar 5, 2024

Beschreibung

Um den Abstand zwischen dem Body und dem Footer der Table-Komponente zu ermöglichen, wird das HTML der Komponente angepasst. Im Default-Theme soll dann exemplarisch ein Abstand von rem(1.5) definiert werden.

Lösungsvorschlag

Eine leere Zeile wird im Footer-Bereich hinzugefügt, die durch eine spezifische CSS-Klasse den Abstand definiert. Diese Lösung wird exemplarisch im Default-Theme umgesetzt und kann leicht auf andere Themes übertragen werden.

  • HTML-Anpassung in der Komponente:

    • In der Table-Komponente wird im Footer-Bereich eine leere Zeile eingefügt:
      <tr class="foot-spacer" aria-hidden="true"></tr>
    • Die Row ist mit aria-hidden="true" versehen, damit sie von Screen-Readern ignoriert wird.
  • CSS-Anpassung im Default-Theme:

    • Im Default-Theme wird die CSS-Klasse .foot-spacer definiert, um den Abstand zum Table-Body zu steuern:
      .foot-spacer {
          height: 1.5rem; /* Beispielwert, der den Abstand festlegt */
      }
    • Dieser Abstand kann je nach Designanforderungen angepasst werden.

Erwartetes Verhalten

Im Default-Theme wird durch die eingefügte leere Zeile und die zugehörige CSS-Klasse ein standardisierter Abstand zwischen dem Body und dem Footer der Tabelle hergestellt. Andere Themes können diese Implementierung übernehmen und bei Bedarf eigene Abstände definieren. Es muss sichergestellt werden, dass die leere Zeile vom Screen-Reader ignoriert wird.

Umsetzung

  1. Komponenten-Änderung:

    • In der Table-Komponente wird das HTML-Template um eine leere Zeile im Footer-Bereich ergänzt.
    • <tr class="foot-spacer" aria-hidden="true"></tr>
  2. CSS-Anpassung im Default-Theme:

    • Definition und Styling der .foot-spacer-Klasse im Default-Theme, um den Abstand festzulegen.

Akzeptanzkriterien

  • Das zugehörige Sample, die das Default-Theme der Table-Komponente verwendet, stellt den Footer mit korrektem Abstand zur restlichen Tabelle dar.
  • Der Abstand zwischen dem letzten Eintrag im Table-Body und dem Footer ist durch die leere Zeile korrekt umgesetzt.
  • Der Screen-Reader, ignoriert die leere Zeile.

Zusätzliche Informationen

Diese Anpassung stellt sicher, dass der Footer-Abstand in der KoliBri-Table-Komponente an die Designrichtlinien der verschiedenen Styleguides angepasst werden kann.

Verworfener Lösungsansatz

Abbilden über Footer. Mit border-spacing versuchen die Abstände zwischen body und footer zu ermöglichen.

Beispiel

Image

Skizze

<table border="1">
  <thead>
    <tr>
      <th>Header 1</th>
      <th>Header 2</th>
    </tr>
    <tr aria-hidden="true" class="head-spacer">
      <td colspan="2"></td> <!-- Leere Zeile als Abstandshalter -->
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Data 1</td>
      <td>Data 2</td>
    </tr>
    <tr>
      <td>Data 3</td>
      <td>Data 4</td>
    </tr>
  </tbody>
  <tfoot>
    <tr aria-hidden="true" class="foot-spacer">
      <td colspan="2"></td> <!-- Leere Zeile als Abstandshalter -->
    </tr>
    <tr>
      <td>Footer 1</td>
      <td>Footer 2</td>
    </tr>
  </tfoot>
</table>
.foot-spacer,
.head-spacer {
  height: 20px; /* Die Höhe definiert den Abstand zwischen tbody und tfoot */
}

.spacer-row td {
  border: none; /* Entfernt alle Ränder, damit nur der Abstand sichtbar ist */
  padding: 0; /* Entfernt das Padding für eine präzise Steuerung des Abstands */
}
@laske185 laske185 converted this from a draft issue Mar 5, 2024
@laske185 laske185 moved this to 📄 Ready in KoliBri Board Mar 5, 2024
@laske185 laske185 moved this from 📄 Ready to Backlog in KoliBri Board May 2, 2024
@laske185 laske185 moved this from Backlog to 📄 Ready in KoliBri Board May 2, 2024
@laske185 laske185 moved this from 📄 Ready to Backlog in KoliBri Board May 21, 2024
Copy link
Contributor

This issue has been automatically marked as stale and will be closed in 10 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, please post a comment or remove the Stale label.

@github-actions github-actions bot added the Stale label Aug 23, 2024
@laske185 laske185 removed the Stale label Aug 26, 2024
@laske185 laske185 changed the title Table: Footer-Bereich mit Abstand Table: Footer-Bereich mit Abstand zum Body Sep 3, 2024
@laske185 laske185 moved this from Backlog to 📄 Ready in KoliBri Board Sep 19, 2024
Makko74 added a commit that referenced this issue Sep 20, 2024
@Makko74 Makko74 linked a pull request Sep 20, 2024 that will close this issue
@Makko74 Makko74 self-assigned this Sep 20, 2024
publicuibot bot pushed a commit that referenced this issue Sep 20, 2024
@deleonio deleonio moved this from 🔍 Review to 🏗 In progress in KoliBri Board Sep 24, 2024
Makko74 added a commit that referenced this issue Sep 30, 2024
publicuibot bot pushed a commit that referenced this issue Sep 30, 2024
Makko74 added a commit that referenced this issue Sep 30, 2024
This reverts commit 34d81c4.

Refs: #6159
Makko74 added a commit that referenced this issue Sep 30, 2024
publicuibot bot pushed a commit that referenced this issue Oct 1, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in KoliBri Board Oct 7, 2024
sdvg added a commit that referenced this issue Oct 9, 2024
…-alert

* 'develop' of github.com:public-ui/kolibri: (149 commits)
  chore: release 2.1.9-rc.0
  Remove unecessary array fallback
  Update all snapshots$ $ Refs: #6159
  fix format
  Revert "Update all snapshots$"
  Update all snapshots$ $ Refs: #6159
  table head and foot spacer
  Revert "chore: update deps"
  Fix combobox shows empty list on navigation
  chore: update deps
  Update all snapshots$ $ Refs: #6485
  refactor: rename background to background-color / enable always white bg
  Update all snapshots$ $ Refs: #6485
  Fix delayed display of single-select value
  Add black background test to inputs
  Adjusted base styling for inputs
  Fix lint error
  removed timeout in focusErrorList()
  Added documentation,  described multi-sort functionality, and provided an example in React app.
  lint fix
  ...
sdvg added a commit that referenced this issue Oct 11, 2024
…ix/clean-code-by-arch-pattern

* '6138-auto-alert' of github.com:public-ui/kolibri: (170 commits)
  chore: release 2.1.9-rc.0
  Remove unecessary array fallback
  Update all snapshots$ $ Refs: #6159
  fix format
  Revert "Update all snapshots$"
  Update all snapshots$ $ Refs: #6159
  table head and foot spacer
  Revert "chore: update deps"
  Fix combobox shows empty list on navigation
  chore: update deps
  Update all snapshots$ $ Refs: #6485
  refactor: rename background to background-color / enable always white bg
  Update all snapshots$ $ Refs: #6485
  Fix delayed display of single-select value
  Add black background test to inputs
  Adjusted base styling for inputs
  Fix lint error
  removed timeout in focusErrorList()
  Added documentation,  described multi-sort functionality, and provided an example in React app.
  lint fix
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants