Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 15, 2024

Bumps @shopify/app-bridge-react from 3.7.10 to 4.1.3.

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Apr 15, 2024
@paulomarg paulomarg self-assigned this May 3, 2024
Bumps [@shopify/app-bridge-react](https://github.com/Shopify/shopify-app-bridge) from 3.7.10 to 4.1.3.
- [Release notes](https://github.com/Shopify/shopify-app-bridge/releases)
- [Commits](https://github.com/Shopify/shopify-app-bridge/commits)

---
updated-dependencies:
- dependency-name: "@shopify/app-bridge-react"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@paulomarg paulomarg force-pushed the dependabot/npm_and_yarn/shopify/app-bridge-react-4.1.3 branch from 94b7f4e to 980f2e0 Compare May 6, 2024 14:17
@paulomarg paulomarg requested a review from a team May 6, 2024 14:44
@paulomarg
Copy link
Collaborator

Since there are quite a few breaking changes, I made a few updates to this PR.

</AppBridgeProvider>
<QueryProvider>
<NavMenu>
<a href="/pagename">{t("NavigationMenu.pageName")}</a>
Copy link
Member

Choose a reason for hiding this comment

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

Please also add home page if the app root is not / <a href="/app" rel="home">Home</a>

const handleClick = useCallback(() => {
navigate(url);
}, [url]);
const handleClick = useCallback(() => window.open(url), [url]);
Copy link
Member

@henrytao-me henrytao-me May 6, 2024

Choose a reason for hiding this comment

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

Considering we are fixing the template in this PR, can we wait til the back stack fix is out. I would like to bring shopify.navigation.onNavigate to the template to fix back stack as a green path. https://github.com/Shopify/app-bridge-next/pull/345/files#diff-930d0931e69b8c66af5536e0b6fa87053b0e051c7ab29c6cee9abe1f37fb5aa8R25

=> The back stack PRs should be merged this week.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can wait. Will we need to change anything here though?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we do. There are two options. I think option 1 is the best for most cases.

  • Option 1: still call navigate(url); like before but need to call extra method like so
  const handleClick = useCallback(async () => {
    await shopify.saveBar.leaveConfirmation();
    navigate(url);
  }, [url]);
  • Option 2: subscribe to shopify.navigation.onNavigate like so
shopify.navigate.onNavigate(() => {
    const {url, intercept} = event;
    // call intercept if the url is a SPA
    intercept({
      async handler() {
        navigate(url);
      },
    });
});
...
const handleClick = useCallback(() => window.open(url), [url]);

@paulomarg paulomarg force-pushed the dependabot/npm_and_yarn/shopify/app-bridge-react-4.1.3 branch from 980f2e0 to 9bec4a8 Compare May 6, 2024 15:44
@paulomarg paulomarg force-pushed the dependabot/npm_and_yarn/shopify/app-bridge-react-4.1.3 branch from 9bec4a8 to 37ce380 Compare May 6, 2024 16:11
@Shopify Shopify deleted a comment from translation-platform bot May 6, 2024
Copy link
Member

@henrytao-me henrytao-me left a comment

Choose a reason for hiding this comment

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

There is no longer a blocker from ABN. Just ship this PR when it's ready.

@paulomarg paulomarg merged commit 04f9e16 into main Jul 15, 2024
@paulomarg paulomarg deleted the dependabot/npm_and_yarn/shopify/app-bridge-react-4.1.3 branch July 15, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants