-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat(location-field): make location group order configurable #771
feat(location-field): make location group order configurable #771
Conversation
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.
Code looks fine, but could you add in one of the stories a control to toggle on/off the new renderOtherFirst
prop? Also, please update the snapshots.
const OtherFeaturesHeader = () => ( | ||
<S.MenuGroupHeader as={headingType} bgColor="#333" key="other-header"> | ||
<FormattedMessage | ||
description="Text for header above the 'other'" |
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.
Description looks unfinished, could you fix please?
…/otp-ui into reorder-other-to-first
Blocked by #774 |
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.
Can you please use Storybook controls to illustrate renderOtherFirst
?
const [otherControl, setOtherControl] = useState(false); | ||
return ( | ||
<> | ||
<label htmlFor="other-input"> |
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 you make Storybook create the controls using argTypes
instead? (Storybook will add that to its "Controls" tab - I should have mentioned that in my previous review but somehow thought you knew) Do that for this story only. Refer to e.g.
FlexRoute.argTypes = { |
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.
Thank you!!
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.
Please try avoiding creating a new component type on each render.
@amy-corson-ibigroup Also please update the props in the PR description... |
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.
Few minor style tweaks, but good to go after you fix them.
Thanks @binh-dam-ibigroup and @miles-grant-ibigroup !! |
Allows configuration of the order of the returned location group results. Users can now pass a array of feature types using
geocoderResultsOrder
to specify the order in which geocoder results are returned.