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

Fixed many usability issues with the CalendarDay field #2930

Merged
merged 3 commits into from
May 11, 2020

Conversation

Vultraz
Copy link
Contributor

@Vultraz Vultraz commented May 9, 2020

Went down a rabbit hole with this one 😬 I think I probably caused most of these with #2424.

  • Fixed field not functioning as a proper controlled component in the Create popout.
  • Fixed field initially displaying "Invalid Date" before defaulting to 1970-01-01.
  • Filter input no longer defaults to the current date. This was bugged; submitting the form with no changes would match nothing.
  • Filter input now falls back to no value when given an invalid date. Previously, it was falling back to 1970-01-01.
  • Fixed filter input not initially displaying the current value when in edit mode (it was displaying the current date).
  • Fixed filter input not being initially focused.
  • Fixed filter input not being submitted properly if focus wasn't lost first.

I also dropped the initial and on-invalid-input current-day default for the filter. Most filters don't match the default, and it's not really likely someone would want to use the current date anyway. It just meant having to clear the field first. As for falling back to the current day on an invalid value (which was bugged anyway!), that also felt completely arbitrary. Now it falls back to empty input ("").

@changeset-bot
Copy link

changeset-bot bot commented May 9, 2020

🦋 Changeset is good to go

Latest commit: be800f7

We got this.

This PR includes changesets to release 2 packages
Name Type
@arch-ui/day-picker Patch
@keystonejs/fields Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Vultraz
Copy link
Contributor Author

Vultraz commented May 9, 2020

Includes a chrono-node version update.

Copy link
Contributor

@timleslie timleslie left a comment

Choose a reason for hiding this comment

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

Had a play with this and it's all much nicer 👍

@timleslie timleslie merged commit 59ed631 into keystonejs:master May 11, 2020
@Vultraz Vultraz deleted the cday-minor-fix branch May 11, 2020 01:59
This was referenced May 11, 2020
ayush-goyal pushed a commit to HackGT/keystone that referenced this pull request May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants