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

Fix back stack for embedded apps #814

Closed

Conversation

henrytao-me
Copy link
Member

@henrytao-me henrytao-me commented Apr 23, 2024

WHY are these changes introduced?

Resolves part of Shopify/shopify-app-bridge#313

WHAT is this pull request doing?

This PR fixes Link Component to work with back stack in embedded apps.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used yarn changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@henrytao-me henrytao-me requested a review from a team as a code owner April 23, 2024 18:58
Copy link
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

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

Just some nits, but holding off on approving until we figure out whether tests make sense for this :)

.changeset/curvy-apes-beam.md Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Could / should we have some tests for these changes? We could create a folder around this or add them to the existing AppProvider tests (which is the only place that will use this).

);
}) as LinkLikeComponent;

function parseUrl(url: string | undefined | null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Total nit, but does undefined vs null matter here? It seems like we could just use undefined all around?

@henrytao-me henrytao-me force-pushed the shopify-app-bridge/issues/313/csb-back-stack branch 2 times, most recently from e58a70d to 9f2bda1 Compare April 30, 2024 14:24
henrytao-me and others added 4 commits April 30, 2024 10:35
Co-authored-by: Paulo Margarido <64600052+paulomarg@users.noreply.github.com>
@henrytao-me henrytao-me force-pushed the shopify-app-bridge/issues/313/csb-back-stack branch from 9f2bda1 to a2073de Compare April 30, 2024 14:36
@@ -3,7 +3,8 @@
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist/ts",
"rootDir": "src"
"rootDir": "src",
"types": ["@cloudflare/workers-types", "node", "jest", "jsdom"]
Copy link
Contributor

@paulomarg paulomarg Apr 30, 2024

Choose a reason for hiding this comment

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

I wonder if it's worth creating a separate test config that extends this one and adds the jsdom types so we don't affect production builds with them. WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

Production build uses tsconfig.build.json, doesn't it?

Copy link
Contributor

Choose a reason for hiding this comment

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

But it extends that one. We could also override the build config to set all types but jsdom, that would work :)

Copy link

@MitchLillie MitchLillie left a comment

Choose a reason for hiding this comment

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

🎩 via https://github.com/Shopify/app-bridge-next/pull/345

Agree on adding unit tests :)

@henrytao-me
Copy link
Member Author

Close as we are working on a solution that doesn't involve update in the template

@henrytao-me henrytao-me deleted the shopify-app-bridge/issues/313/csb-back-stack branch May 30, 2024 00:26
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.

None yet

4 participants