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

feat: support navigating to artist artworks grid - mounir #9403

Merged

Conversation

MounirDhahri
Copy link
Member

@MounirDhahri MounirDhahri commented Oct 11, 2023

This PR sets the foundation for the work on ONYX-421 ONYX-422 ONYX-423

Description

This PR adds support of URLs query params injection to navigate to the artworks grid.

Screen.Recording.2023-10-11.at.15.39.45.mov

Remaining work:

  • Inject param in activity items [done]
Screen.Recording.2023-10-11.at.16.05.59.mov

Blocked. by: artsy/palette-mobile#159

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • support navigating to artist artworks grid using URL query injections - mounir

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.

@ArtsyOpenSource
Copy link
Contributor

ArtsyOpenSource commented Oct 11, 2023

This PR contains the following changes:

  • Cross-platform user-facing changes (support navigating to artist artworks grid using URL query injections - mounir)

Generated by 🚫 dangerJS against 0db8691

searchCriteriaID: parsed.search_criteria_id,
}

if ((matchRoute(targetHref) as any).module === "Artist") {
Copy link
Member Author

Choose a reason for hiding this comment

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

matchRoute return type depends on the module type. I could have typecasted this in a different way probably. let me know if you have better suggestions

@@ -92,7 +92,7 @@ describe(AutosuggestSearchResult, () => {
tree.root.findByType(Touchable).props.onPress()
await new Promise((r) => setTimeout(r, 50))
expect(inputBlurMock).toHaveBeenCalled()
expect(navigate).toHaveBeenCalledWith(result.href, { passProps: { initialTab: "Artworks" } })
expect(navigate).toHaveBeenCalledWith(result.href, { passProps: undefined })
Copy link
Member Author

Choose a reason for hiding this comment

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

no need to inject any props if you didn't press on "Artworks" or "AuctionResults"

@MounirDhahri MounirDhahri requested a review from dblandin October 11, 2023 14:30
@MounirDhahri MounirDhahri marked this pull request as draft October 11, 2023 14:34
@MounirDhahri MounirDhahri force-pushed the feat/scroll-down-to-artworks-on-artist-artworks-press branch from ba31b32 to 3dbe878 Compare October 11, 2023 14:44
dblandin
dblandin previously approved these changes Oct 11, 2023
Copy link
Member

@dblandin dblandin left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

@MounirDhahri MounirDhahri marked this pull request as ready for review October 11, 2023 15:34
gkartalis
gkartalis previously approved these changes Oct 11, 2023
Copy link
Member

@gkartalis gkartalis left a comment

Choose a reason for hiding this comment

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

noice 👏

@MounirDhahri MounirDhahri merged commit cd3c86f into main Oct 12, 2023
@MounirDhahri MounirDhahri deleted the feat/scroll-down-to-artworks-on-artist-artworks-press branch October 12, 2023 09:03
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.

5 participants