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 filter #949

Merged
merged 20 commits into from
Jan 29, 2019
Merged

Date filter #949

merged 20 commits into from
Jan 29, 2019

Conversation

OtterleyW
Copy link
Contributor

@OtterleyW OtterleyW commented Nov 12, 2018

Note:
This PR adds date filter and refactors other filters to be more consistent: there are now plain and popup versions of select-single and select-multiple filters too.


bookingdaterangefilterplain
BookingDateRangeFilter on mobile version

  • Automatically apply selected dates
  • Clear selection when "Clear" is clicked

bookingdaterangefilterpopup
BookingDateRangeFilter on desktop version

  • Open in popup
  • Select dates when "Apply" is clicked
  • Cancel resets selection back to previous selected dates

@OtterleyW OtterleyW force-pushed the date-filter branch 5 times, most recently from 23edb2e to 2823fe8 Compare November 15, 2018 10:51
@OtterleyW OtterleyW temporarily deployed to sharetribe-starter-app November 19, 2018 14:20 Inactive
@OtterleyW OtterleyW temporarily deployed to sharetribe-starter-app November 20, 2018 08:48 Inactive
@OtterleyW OtterleyW force-pushed the date-filter branch 2 times, most recently from 6c5be04 to 7213299 Compare November 20, 2018 09:26
weekDayFormat: 'dd',
phrases: {
closeDatePicker: null, // Handled inside component
clearDate: null, // Handled inside component
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe these phrases could be left out.

phrases: {}, // Add overwrites to default phrases used by react-dates

https://github.com/airbnb/react-dates/blob/a04dfd1ad15939e1436a2181e0304899b539801a/src/defaultPhrases.js

@Gnito
Copy link
Contributor

Gnito commented Nov 20, 2018

Reorder commits so that "Add help functions for ISO8601 date format" is included before "Add DateRangeFilter to desktop and mobile versions". (i.e. functions are included before they are used)

@Gnito Gnito temporarily deployed to sharetribe-starter-app November 20, 2018 14:34 Inactive
Copy link
Contributor

@lyyder lyyder left a comment

Choose a reason for hiding this comment

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

Not much to comment, looks good. How do the FilterPlain and FilterPopup play out with the current filter components we have: SelectSingleFilter, SelectMultipleFilter, SelectSingleFilterPlain and SelectMultipleFilterPlain?

@@ -140,3 +140,11 @@ export const formatDate = (intl, todayString, d) => {

return `${formattedDate}, ${formattedTime}`;
};

Copy link
Contributor

Choose a reason for hiding this comment

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

A comment for these ISO8601 functions would be nice. Like the ones on other helper functions in this file.

@OtterleyW OtterleyW temporarily deployed to sharetribe-starter-app November 23, 2018 11:16 Inactive
@OtterleyW OtterleyW force-pushed the date-filter branch 4 times, most recently from e907969 to ac7346d Compare December 3, 2018 13:33
@OtterleyW OtterleyW force-pushed the date-filter branch 2 times, most recently from 4bb186a to 5b37885 Compare December 10, 2018 12:31
@Gnito Gnito merged commit 47cda11 into master Jan 29, 2019
@Gnito Gnito deleted the date-filter branch January 29, 2019 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants