-
Notifications
You must be signed in to change notification settings - Fork 572
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: Inline price control create alert #8835
feat: Inline price control create alert #8835
Conversation
src/app/Scenes/SavedSearchAlert/screens/CreateSavedSearchAlertPriceRangeScreen.tsx
Outdated
Show resolved
Hide resolved
src/app/Scenes/SavedSearchAlert/screens/CreateSavedSearchAlertPriceRangeScreen.tsx
Outdated
Show resolved
Hide resolved
src/app/Scenes/SavedSearchAlert/screens/CreateSavedSearchAlertPriceRangeScreen.tsx
Outdated
Show resolved
Hide resolved
src/app/Scenes/SavedSearchAlert/screens/CreateSavedSearchAlertPriceRangeScreen.tsx
Outdated
Show resolved
Hide resolved
//@ts-ignore | ||
state.attributes[payload.key] = payload.value |
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.
I find it hard to fix this type error. Any help is appreciated.
src/app/Scenes/SavedSearchAlert/screens/CreateAlertPriceRangeScreen.tsx
Outdated
Show resolved
Hide resolved
2e5c201
to
56592d6
Compare
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.
Looking nice! Just one question from me about an unimplemented feature (maybe more of a PM/design question).
<Flex m={2} p={2} alignItems="center" backgroundColor="black5"> | ||
<Text variant="sm-display" color="black60"> | ||
Your recent price ranges will show here | ||
</Text> | ||
</Flex> |
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.
question: We are not implementing this as part of this PR, correct?
If that's the case I wonder if we can hide this section for now, since it's not really helpful or actionable yet.
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.
Good point. Let me ask this in this channel.
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.
To clarify: the "Recent price ranges" section should be in scope for this ticket so I would expect this component, which includes this empty state text to be ported over here.
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.
Erin's comment around the value of the empty state is a good one. We can make that change within the RecentPriceRanges
component so that it applies to any screen rendering it.
@rajsam003 a tiny bug I've discovering while testing the feature: Monosnap.screencast.2023-06-13.14-48-49.mp4 |
@rajsam003 "Clear" button is missing in design, but I think we should add it (we discussed it on the refinement session). The button exists on the existing price filter screen: |
// force it to not use react-native-screens, which is broken inside a react-native Modal for some reason | ||
detachInactiveScreens={false} |
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.
tell me more 👀 we might need to be more proactive about this in other surfaces maybe, how did you find out?
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.
@gkartalis maybe you and @rajsam003 can find some time to pair on this? Looks like this argument, and the same comment, exists already in a few different screens.
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.
good point, yes def @rajsam003 feel free to drop some time next week on my cal
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.
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 looked into it with @rajsam003, turns out that there is an issue with react native modals as the comment suggests, not sure how we can resolve it and remove it but we confirmed that removing this line it breaks the flow (the set price screen modal cannot open).
so lets leave it as it is (MOPLAT will further investigate when migrating to react-navigation
.
<Touchable | ||
accessibilityLabel="Set price range" | ||
accessibilityRole="button" | ||
underlayColor="black5" |
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.
I think you can leave this out, no longer needed unless you want a custom color (you can see that removing it has the same behavior while pressing it)
underlayColor="black5" |
Looks great generally. I leave the approval though to the @artsy/fx-devs ⚡️ (btw checked the type issue and wasn't able to fix it quickly but might be worth trying out stuff to make it safe to prevent crashes) |
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.
LGTM
src/app/Scenes/SavedSearchAlert/screens/AlertPriceRangeScreen.tsx
Outdated
Show resolved
Hide resolved
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.
Perhaps too big of a refactor for this particular PR but I'd be interested if we could extract some of the components within the PriceRangeOptionsScreen, particularly this section and share that between the artwork grid and create alert flows.
Happy to pair on this sometime to explore!
initialParams={params} | ||
/> | ||
<Stack.Screen name="EmailPreferences" component={EmailPreferencesScreen} /> | ||
<Stack.Screen name="AlertPriceRangeScreen" component={AlertPriceRangeScreen} /> |
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.
suggestion: Where is name
used here? We should probably be consistent with including or omitting the Screen
suffix in the string value.
I like resuing components. In this case, it was too hectic. I felt the current one is easier and understandable. If anything is messed up in one screen it will not effect the other screen. But yes I can give a try again. 👍🏽 |
It be a follow-up PR if you like. The other screen has a lot of coupling with artwork filters but I think there might be a useful component to extract/define that wraps all of the input components and takes function props to respond to value changes. |
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.
Looking good, also did a quick QA and played around with some cases and nothing seems to be blocking.
Lets 🛳️ it???? 🚀
Non blocking but for the future:
I remember even back when I was in FX we had this bug that I am not sure if we have ticketed somewhere:
as you see on the screenshot the users are able to create a price range with min price > max price. Let's follow up and create a ticket about that
// force it to not use react-native-screens, which is broken inside a react-native Modal for some reason | ||
detachInactiveScreens={false} |
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 looked into it with @rajsam003, turns out that there is an issue with react native modals as the comment suggests, not sure how we can resolve it and remove it but we confirmed that removing this line it breaks the flow (the set price screen modal cannot open).
so lets leave it as it is (MOPLAT will further investigate when migrating to react-navigation
.
This PR resolves FX-4806
This PR adds Inline price control for Create Alert modal flow
Here is the figma spec
Screen.Recording.2023-06-12.at.15.49.03.mov
PR Checklist
To the reviewers 👀
Changelog updates
Changelog updates
Cross-platform user-facing changes
iOS user-facing changes
Android user-facing changes
Dev changes
Need help with something? Have a look at our docs, or get in touch with us.