-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
Feat/date value datepicker #1190
Merged
SutuSebastian
merged 39 commits into
themesberg:main
from
ddiasfront:feat/dateValue-datepicker
Sep 30, 2024
Merged
Changes from 38 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
6b779a5
feat(datepicker): accepts dateValue as value
ddiasfront c114f6e
chore(lint/prettier): cleaning code
ddiasfront 9812a4c
removed unecessary debug
ddiasfront ef8d49a
test(fixing tests): finding why tests are not running
ddiasfront f33d2c6
chore: fixed testing for the use case scenario
ddiasfront 1e84357
fix: removing commments
ddiasfront c48f026
chore(reducing complexity for datevalue): assertive state/context ma…
ddiasfront 2f8c02c
chore: linting
ddiasfront e043936
feat: added necessary documentation
ddiasfront 02cd518
Update Datepicker.spec.tsx
ddiasfront 25478f0
chore: pipeline build fixes
ddiasfront df5968b
fix(clear button): fixed datepicker clear button to not displaying an…
ddiasfront f25bb18
Update Datepicker.spec.tsx
ddiasfront a0b94ba
test(datepicker): clear
ddiasfront 3dd087b
docs(datepicker): it should have right type for the new empty date ca…
ddiasfront d8f572c
chore: removing unecessary console
ddiasfront 7a3a85d
docs(datepicker): label naming
ddiasfront 6c06037
feat(datepicker): datevalue expects null to clear date
ddiasfront ceb4ccf
feat(datepicker): datepicker should expect value and defaultValue
ddiasfront 82d5f6a
feat(datepicker): datepicker default value and sideeffects
ddiasfront 8f62e4c
feat: adding datevalue property
ddiasfront a1e915b
feat: handling date value with propper test cases
ddiasfront f66442d
feat: handling date value with propper test cases
ddiasfront 799f456
feat: removed default value and renamed onchange prop
3583b13
feat: solved comments | updated tests and parameters
ac1d098
feat: ts compiling
6f7f6c6
feat: added null as a type reference for selectedDate
628dc14
feat: prettier
1e5a610
feat: added value as a modifier
92a826a
feat: updated storybook to reflect controlled and uncontrolled model
c9fb6c1
feat: removed debugger and renamed defaultDate to defaultValue
4459adf
feat: removed debugger and renamed defaultDate to defaultValue
6e477a5
feat: format check
3a62843
feat: addressing hook dependencies
10f0f56
feat: controlled component setup | clearn functionality
7ca4295
feat: remove debugger statement
4548a0c
feat: defaultDate empty and side-effects addressed
dfef19d
feat: added changeset
f082ca7
feat - changset to patch
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
"@flowbite/react": major | ||
--- | ||
|
||
### Datepicker Component Updates | ||
|
||
The Datepicker has been enhanced with several improvements: | ||
|
||
1. **Controlled Inputs**: Supports controlled inputs via `value` and `defaultValue` props, enabling programmatic date updates without manual clicks. | ||
2. **State Management**: Optimized internal state management using `useMemo` and `useEffect`. | ||
3. **Documentation**: Added sections in documentation for controlled usage and handling `null` values. | ||
4. **Test Cases**: Comprehensive unit tests added for date handling. | ||
5. **Storybook**: Improved stories, showcasing different states (controlled/uncontrolled). | ||
|
||
### Files Updated: | ||
|
||
- `apps/web/content/docs/components/datepicker.mdx`: Added controlled usage section. | ||
- `Datepicker.spec.tsx`: Added unit tests. | ||
- `Datepicker.stories.tsx`: Enhanced story variants. | ||
- `Datepicker.tsx`: Expanded `DatepickerProps`. | ||
- `DatepickerContext.tsx`: Adjusted `selectedDate` type. | ||
- `Decades.tsx`, `Months.tsx`, `Years.tsx`: Updated logic to check for `selectedDate`. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to re-do the changeset, it is not a major, u can leave it as
patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SutuSebastian, @rluders updated changeset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, can u also put some more info in regards of the breaking changes and what users have to modify when they update to this next version of the
datepicker
?U can do this in the same changeset markdown file