feat: enhance table stateless sort button#8078
Merged
Conversation
Contributor
|
Netlify Draft Deployment |
Contributor
Hydration Benchmark Report (vs Baseline)✅ Top 5 Improvements (Best Speedups)
🔻 Flop 5 Regressions (Worst Slowdowns)
📋 Show all results
|
4252bfa to
32f8714
Compare
32f8714 to
512ef5a
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the KolTableStateless component by adding localization support for sorting functionality and implementing proper translation handling. The changes introduce a standardized approach for UI text management across English and German locales.
- Added translation keys for sorting functionality in both English and German locale files
- Implemented translation caching in the table component using the
translate()helper - Updated component to use localized aria descriptions for sort buttons
- Established guidelines for consistent UI text management in components
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/components/src/locales/en.ts | Added English translation key for sort functionality |
| packages/components/src/locales/de.ts | Added German translation key for sort functionality |
| packages/components/src/components/table-stateless/component.tsx | Implemented translation caching and applied localized aria description to sort button |
| packages/components/AGENTS.md | Added comprehensive guidelines for UI text localization and translation handling |
cbraehmig
approved these changes
Jul 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for localized UI texts in the
KolTableStatelesscomponent and updates its functionality to handle sorting interactions. The most significant changes include adding translation support, implementing sorting behavior, and updating tests and snapshots to reflect these changes.Localization Support:
packages/components/AGENTS.md: Added guidelines for storing UI texts in language files (src/locales/en.tsandsrc/locales/de.ts) and using thetranslate()helper for efficient text translation and caching.Sorting Functionality:
packages/components/src/components/table-stateless/component.tsx: Added atranslateSortproperty to cache the translation for the sorting label (kol-sort) and updated the_ariaDescriptionproperty of the sort button to use this translation. [1] [2]packages/components/src/locales/en.tsandpackages/components/src/locales/de.ts: Added thesorttranslation key for English and German locales. [1] [2]Tests and Snapshots:
packages/components/src/components/table-stateless/test/__snapshots__/snapshot.spec.tsx.snap: Updated snapshots to include sorting-related attributes (aria-sort,data-sort) and the translated_ariaDescriptionfor the sort button. [1] [2]packages/components/src/components/table-stateless/test/snapshot.spec.tsx: Modified test cases to include thesortDirectionproperty in header cells to validate sorting functionality.