-
Notifications
You must be signed in to change notification settings - Fork 5
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
Uhf 6666 search filters rebased #378
Uhf 6666 search filters rebased #378
Conversation
…nt flashes and continuous refetching
…nt flashes and continuous refetching
Sivuhuomiona tuo Feature-branch on väärin nimetty. https://helsinkisolutionoffice.atlassian.net/browse/UHF-3128 on jotain ihan muuta. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
This seems real nice for the most part. There are a lot of weird formatting issues that should be solved on the project level. Probably need to revisit the linter/prettier setup and enforce some basic stuff.
@@ -1,21 +1,22 @@ | |||
{ | |||
"name": "helfi-etusivu-news-search", | |||
"version": "0.1.0", | |||
"version": "0.1.1", |
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.
Definitely more than a patch version increase needed.
}, | ||
"scripts": { | ||
"start": "BROWSER=none react-app-rewired start", | ||
"build": "react-app-rewired build", | ||
"build": "react-app-rewired build && mv build/static/js/main.*.js ../assets/js/filter-events.js", | ||
"":"", |
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.
?
|
||
import useOutsideClick from '../hooks/useOutsideClick'; | ||
|
||
type Props = { |
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.
CollapsibleProps maybe?
import Collapsible from '../components/Collapsible'; | ||
import { DateInput } from 'hds-react'; | ||
import { QueryBuilder } from '../utils/QueryBuilder' | ||
import CheckboxFilter from '../components/CheckboxFilter'; | ||
import type DateSelectDateTimes from '../types/DateSelectDateTimes'; | ||
import HDS_DATE_FORMAT from '../utils/HDS_DATE_FORMAT'; |
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.
These seem to be in a random order. The linter should probably complain if there is no empty lines between imports and definitions.
const dateHelperText = Drupal.t('Use format D.M.YYYY') | ||
const dateLabel = Drupal.t('Choose a date') | ||
|
||
const DateSelect = ({ endDate, endDisabled, disableEnd, queryBuilder, setEndDate, setStartDate, startDate, invalidStartDate = false, invalidEndDate = false }: DateSelectProps) => { |
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.
Could be prettiered automatically.
|
||
|
||
const dateHelperText = Drupal.t('Use format D.M.YYYY') | ||
const dateLabel = Drupal.t('Choose a date') |
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.
This should not be the same for start and end. Bad UX.
<DateInput | ||
className='hdbt-search__filter hdbt-search__date-input' | ||
helperText={dateHelperText} | ||
id='start-date' |
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.
Are these ids unique'd in the component?
<h3>{Drupal.t('This event list is empty.')}</h3> | ||
<p className='events-list__empty-subtext'>{Drupal.t('No worries though, this city does not run out of things to do.')}</p> |
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.
We might want to extract these content strings into one place at some point.
UHF-6666: Search filters
Added filters to LinkedEvents React-version
What was done
How to install
composer require drupal/helfi_platform_config:dev-UHF-6666-search-filters
composer require drupal/hdbt:dev-UHF-3128-sote-linkedevents-filtering
make drush-updb
make drush-cr
How to test
Events
paragraph. Fill fields.https://tapahtumat.hel.fi/fi/events?text=jooga
Other PRs