-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/day picker/update test #37
Merged
Merged
Conversation
This file contains 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
Changed color variables across multiple components and styles to use a consistent naming convention with the "color-" prefix. This improves readability and maintainability of the code, ensuring consistent usage of color variables throughout the project. The update affects chart components, sidebar components, and Tailwind configuration.
The test script in both the day-picker and hooks packages has been updated to use `vitest run` instead of `vitest --watch=false`. This ensures that tests are executed properly without watch mode, aligning with standard usage and improving script reliability.
Ensure consistent test outcomes by establishing a fixed date for the test environment. Implemented date changes in `single-required` and `modifiers-selected` test cases to prevent flaky tests due to varying system dates.
Add startMonth and endMonth props to restrict date pickers to specific months. The `useGetModifiers` function now handles these new props, ensuring days outside the specified range are considered hidden. Included tests verify the correct behavior for days before the start or after the end of the specified months.
Replace variable-based day cell dimensions with fixed values to ensure consistent sizing. This update resolves layout issues when variables are not defined.
Introduce a focus-visible outline to the day-picker dropdown for improved accessibility. This change helps users navigate more easily by providing a clear visual indicator when the dropdown is focused. Adjusted related components to ensure consistent styling across the application.
Implement support for the broadcast calendar in the day-picker component, allowing weeks to align with broadcast calendar standards. Introduce the `broadcastCalendar` prop to toggle this functionality, with corresponding logic to compute week start and end dates. This update includes new utility functions, tests, and enhanced styling to accommodate broadcast calendar specifics.
Consolidate month and year change handlers into reusable functions. This reduces code duplication and enhances maintainability by creating a single implementation for handling both actions outside the rendering loop.
Refactor the code to consistently use the 'gridcell' role instead of 'cell' for querying date elements across all test files and components. This change aligns with ARIA practices and ensures accurate role usage within the DayPicker components. Additionally, enhance accessibility by adding 'aria-label' and 'role' properties to the container elements, and prevent rendering issues by checking the 'hidden' modifier for non-interactive days.
Reformat the CSS variable declarations in the day-picker component for improved readability and consistency. Comments explaining each variable have been reformatted for clarity, ensuring easier maintenance and understanding of the code. This change does not affect any functionality.
Change test file import paths to use absolute paths for consistency and maintainability. This approach enhances code readability and avoids potential path resolution issues. The configuration files were updated to support the use of these absolute paths.
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.
No description provided.