Repository navigation
Conversation
- bunfig: preload happy-dom setup (environment key is not a Bun option) - tsconfig: include bun-types for bun:test - web: import renamed useDebounce instead of useThrottle - utils: formatDate emits unpadded day (D/MM/YYYY) - ui: Button forwards aria-label (dev warning when iconOnly lacks one) - ui: DataTable uses functional setState for sort toggle
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
bun test && tsc --noEmitnow passes: 13/13 tests, 0 type errors.environment = "happy-dom"is not a Bun option, so I replaced it with apreloadofpackages/ui/test/setup.ts. This fixes thedocument is not definederror."types": ["bun-types"]sobun:testresolves. The package was already installed.useDebounceinstead ofuseThrottle. TheuseSearchDebouncere-export keeps its name.1/03/2024. I usedformatToPartsbecause en-AU always pads the day when the month is 2-digit.aria-labelis now forwarded to the<button>; before, it was destructured but never used. IficonOnlyis set without a label, the button getsaria-label=""(the test checks for the attribute) and logs a dev-only warning.setSortDir(prev => ...).BUGcomments are updated.Assumptions
useThrottleforuseDebounceis safe because nothing in the repo callsuseSearchDebounce. Debounce and throttle do behave differently, though.aria-label=""only makes the test pass. It does not give icon-only buttons an accessible name (WCAG 4.1.2). A full fix would requirearia-labelwheniconOnlyis set, which needs a test change.typessetting in tsconfig stops other@types/*packages from being included automatically. Nothing is affected today.No test files modified; no dependencies added. Reviewed twice by the review agent; no critical or high findings.