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

Moved the Date Field to the Dropdown Div, and Restyled It #2517

Merged
merged 1 commit into from
May 30, 2019

Conversation

BeksOmega
Copy link
Collaborator

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

N/A

Proposed Changes

  1. Moves the date picker from the widget div to the dropdown div.
  2. Removes the automatic closing of the picker upon selection (this comes with some tradeoffs).
  3. Makes the picker look butiful (maybe?)
    Date_New

Note: The darker colour denotes "Today" and the lighter colour denotes the selected day. It is based on how G-cal's mini-calendar looks:
Date_GCal

Reason for Changes

  1. The date field was sad because it wasn't in the dropdown div club.
  2. Makes it so the dropdown div works consistently.
  3. Sticking with the old UI meant one of two options had to be picked:
    Date_BorderDefault
    Date_BorderlessDefault
    Both of which look ugly (imo).

Test Coverage

The closure date picker is missing some functionality that we need, which is the ability to undo a date selection. Because there's no perfect way to do this, the date field has some quirky behavior when dealing with null validators. But as no one uses date fields, and especially no one validates them, I think this is ok.

Closing and Reopening:
Date_CloseReopen

Today Button:
Date_TodayButton

Correctly Updating When Month Changes 1:
Date_HidingMonthChanges

Correctly Updating when Month Changes 2:
Date_ChangingDayMonthChanges

Not Updating for Nulls:
Date_NullsNotReacting

Validated Values Updating:
Date_DifUpdating

And here's the bit of odd behavior I mentioned. If you are looking at a different month than the one containing the currently selected date, and you select a new date that validates to null, it will bump you back to the old month:
Date_NullsChangesMonth

There's no reasonable way to get around this with closure's current DatePicker API.

Tested on:

  • Desktop Chrome

Additional Information

N/A

@alschmiedt
Copy link
Contributor

Looks so much better than the previous date picker : )

@alschmiedt alschmiedt merged commit ea3c483 into google:develop May 30, 2019
@BeksOmega
Copy link
Collaborator Author

BeksOmega commented May 30, 2019

Looks so much better than the previous date picker : )

Hehe thank you so much! Normally I hate doing the css stuff, but being able to copy off the google callendar made it bearable lol

@BeksOmega BeksOmega deleted the feature/DateDropdownDiv branch May 30, 2019 21:44
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.

None yet

2 participants