-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: date time value initialising to start of day in case of typing #4585
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
WalkthroughThe recent update introduces a new parameter, Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
1 similar comment
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- frontend/src/components/CustomTimePicker/CustomTimePickerPopoverContent.tsx (3 hunks)
- frontend/src/container/TopNav/DateTimeSelectionV2/config.ts (1 hunks)
- frontend/src/container/TopNav/DateTimeSelectionV2/index.tsx (2 hunks)
Additional comments: 4
frontend/src/components/CustomTimePicker/CustomTimePickerPopoverContent.tsx (2)
- 24-26: The addition of the
lexicalContext
parameter to theonCustomDateHandler
function is a significant improvement. It allows for more nuanced handling of date inputs based on the user's interaction method. This change aligns well with the PR's objectives and enhances the application's usability by providing context-sensitive processing of date and time selections.- 70-70: The usage of
LexicalContext.CUSTOM_DATE_PICKER
in theonModalOkHandler
function is correct and demonstrates the intended differentiation between manual typing and calendar selection. This ensures that the application can initialize date and time values appropriately based on the input method, improving the overall user experience.frontend/src/container/TopNav/DateTimeSelectionV2/config.ts (1)
- 152-154: The introduction of the
LexicalContext
enumeration is a well-thought-out addition. It provides clear, semantic values (CUSTOM_DATE_PICKER
andCUSTOM_DATE_TIME_INPUT
) that facilitate the differentiation of user input methods. This enumeration will be instrumental in implementing context-aware logic throughout the application.frontend/src/container/TopNav/DateTimeSelectionV2/index.tsx (1)
- 322-345: The implementation of
LexicalContext
handling in theonCustomDateHandler
function is well-executed. By adjustingstartTime
andendTime
based on the context (CUSTOM_DATE_PICKER
), the application can now handle date and time values more accurately. This logic ensures that when a date is selected via the custom date picker, the time is set to the start or end of the day, which aligns with the PR's objectives to improve user experience through context-sensitive processing. Great job on this enhancement!
Summary
lexical context
inside the custom date time handler to handle typing and calendar select dates separatelyRelated Issues / PR's
Screenshots
Screen.Recording.2024-02-22.at.2.46.38.PM.mov
Affected Areas and Manually Tested Areas
Summary by CodeRabbit