Skip to content
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

Date field revamp #2562

Merged
merged 25 commits into from
Apr 4, 2024
Merged

Date field revamp #2562

merged 25 commits into from
Apr 4, 2024

Conversation

jomarmontuya
Copy link
Contributor

@jomarmontuya jomarmontuya commented Feb 21, 2024

closes #2414

  • Check with andres if timestamp is needed
  • Better approach on getting the zesty-orange background
  • Deployment to stage for early VQA and bugs ask @theofficialnar

@jomarmontuya jomarmontuya marked this pull request as draft February 21, 2024 08:22
@jomarmontuya
Copy link
Contributor Author

image

@jomarmontuya
Copy link
Contributor Author

jomarmontuya commented Feb 22, 2024

Screen.Recording.2024-02-22.at.3.40.12.PM.mov

@zcolah This is the initial draft preview of this component. I think it would be better if we can ask @theofficialnar to deploy it for you to see it yourself.

I've got deploy access to dev this morning, but was asked to let @theofficialnar do the deployments to avoid conflcits

@jomarmontuya jomarmontuya self-assigned this Feb 22, 2024
@jomarmontuya jomarmontuya added the enhancement Improvement to an existing feature label Feb 22, 2024
@jomarmontuya jomarmontuya marked this pull request as ready for review February 28, 2024 07:04
@zcolah
Copy link

zcolah commented Feb 28, 2024

A few functionalities are not present as discussed on our huddle:

  • 1. The Date Selection Pop Up should appear and update when typing
  • 2. If the field is clear with no date prior to this, then open the date picker with the current date (aka today’s date) selected
  • 3. The experience of typing in a date is not fluid as per the expectations set. Please see requests and Google Calendar as a behavior reference.
  • 4. Check the padding of the icon button

@jomarmontuya
Copy link
Contributor Author

@agalin920 @theofficialnar

Hello both, Seeking your help, on how we can possibly achieve this experience, in our calendar, I have been researching on how to make it possible using core mui-x and can't seem to find a way to copy the same experience.

I would assume we have to write custom logic and override mui-x datepicker functionality to make it work, but I wanted to hear your thoughts, maybe you've encounter the same issues in the past.

I was able to make it work but only partials not as fluid as the video below, and the core mui-x only supports custom inputs but only specifics to defined format.

Screen.Recording.2024-02-29.at.6.43.05.PM.mov

@agalin920
Copy link
Contributor

@jomarmontuya I would focus on exact requirements and not this kind of large general ask. What exact requirement are you unable to solve for? What is the effort to solve this requirement? Communicate with Product (@zcolah) to identify if the cost-benefit of the missing requirements

@jomarmontuya jomarmontuya marked this pull request as draft February 29, 2024 18:09
@jomarmontuya
Copy link
Contributor Author

jomarmontuya commented Mar 1, 2024

@agalin920 Thanks, I will complete first the other requirements and get back to you on this one.

@jomarmontuya
Copy link
Contributor Author

@agalin920

 1. The Date Selection Pop Up should appear and update when typing

I was able to make the popup appear and set back the focus back to textfield when the TextField is click, however this component needs to have state if we need realtime updates to the calendar picker. Because currently the picker date only updates after I complete typing the date in MMM DD, YYYY format.

2. If the field is clear with no date prior to this, then open the date picker with the current date (aka today’s date) selected

@zcolah can you confirm this, as this is already implemented during our previous review. or I'm missing something?

Screen.Recording.2024-03-04.at.11.49.35.PM.mov
3. The experience of typing in a date is not fluid as per the expectations set. Please see requests and Google Calendar as a behavior reference.

This relates to the issue number one, also it looks like based on the requirements, we need to be able to accept different format inputs in the textfield. This is not possible at the moment with mui-x datePicker as we have to pick one format that we can use.

image

 4. Check the padding of the icon button

This will get solved on the inputAdornment theme change is merged.

@jomarmontuya jomarmontuya requested a review from agalin920 March 4, 2024 15:53
@agalin920
Copy link
Contributor

@jomarmontuya is there an ask of me here? Can this PR ready to be reviewed and moved out of draft?

@jomarmontuya jomarmontuya marked this pull request as ready for review March 4, 2024 16:47
required={required}
value={value ? new Date(value) : null}
format="MMM dd, yyyy"
onChange={(date) => onDateChange(date, name, datatype)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this emitting a UTC date or localized date?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Here's the sample date value, it's actually localized on my location since i'm on GMT+8 is this what you're pertaining?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question still stands

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agalin920 It is emitting localize date

@jomarmontuya jomarmontuya marked this pull request as ready for review March 11, 2024 19:43
agalin920
agalin920 previously approved these changes Mar 11, 2024
@jomarmontuya
Copy link
Contributor Author

@shrunyan - >zesty-io/material#93

Please see related PR to move this for VQA

@jomarmontuya
Copy link
Contributor Author

@zcolah This is up on dev you may proceed with VQA

Copy link

@zcolah zcolah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jomarmontuya

See Loom video that describes all of the issues below in more detail: https://www.loom.com/share/83204fcc82724beda555a7e49429f2e5

  1. Reduce the lag in showing the current date when the user opens the modal for the first time
  2. If possible please add a cursor indicator so that the user knows they are typing and knows where they are typing
  3. Add ability to update the entire date when it is highlighted/selected
  4. Once a user has selected a date via the Calendar pop up, the date input can go back to it's default non selected state. It does not need to be in active state and the year does not need to be highlighted.
  5. If there is an invalid date, then please immediately display an error message to a user. See Figma design.

@jomarmontuya
Copy link
Contributor Author

@zcolah with this feedback I've got I think I had to do a completely different approach here instead for the textfield.

Instead of using the mui datepicker field out of the box I might have to use a custom textfield to allow user a full typing experience, because as of now I don't think there's a way to add cursor to the textfield, as it would only allow you to edit the date base on the format we assign which is "MMM DD, YYYY" that's why you can only change it as a whole not individual characters

@agalin920 I was thinking the solution we talked about last time, using a custom textfield with regex to make it work.

@jomarmontuya jomarmontuya marked this pull request as draft March 19, 2024 21:24
@jomarmontuya
Copy link
Contributor Author

@zcolah
Copy link

zcolah commented Mar 21, 2024

Looks good, will test

@jomarmontuya jomarmontuya marked this pull request as ready for review March 21, 2024 16:04
@jomarmontuya jomarmontuya requested a review from agalin920 March 21, 2024 16:04
@shrunyan shrunyan changed the base branch from master to dev March 25, 2024 19:20
@finnar-bin finnar-bin added the ready PR is complete and ready for deployment label Apr 2, 2024
@finnar-bin finnar-bin force-pushed the enhancement/datefield-revamp branch from 943fd40 to c66a5c7 Compare April 2, 2024 01:42
@finnar-bin finnar-bin changed the title Enhancement/datefield revamp Date field revamp Apr 2, 2024
@shrunyan shrunyan enabled auto-merge April 2, 2024 22:18
@shrunyan shrunyan merged commit a876acb into dev Apr 4, 2024
1 check passed
@shrunyan shrunyan deleted the enhancement/datefield-revamp branch April 4, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature ready PR is complete and ready for deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content: Date Field Revamp
5 participants