-
Notifications
You must be signed in to change notification settings - Fork 0
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(space-next): support App Bridge #83
feat(space-next): support App Bridge #83
Conversation
export default function Home(props: HomeProps) { | ||
const toolContext = useToolContext(); | ||
export default function Home() { | ||
const { completed } = useAppBridge({ type: 'space-plugin', oauth: true }); |
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 am wondering if it is possible to create config file for this too? where the use can enable and disable app bridge
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 didn't consider the configurability in this implementation, as there's still the legacy nextjs project that doesn't use App Bridge. In case of Nuxt starter, we were already using nuxt-base in other projects, so we had to introduce the config to keep the backward compatibility. Now that App Bridge will be kind of the new default and it won't be visible and very quick to run, I think we can keep it as-is.
todo for me: think about implementing this using middleware of next.js |
I've tried, and the implementation indeed looked better, but it doesn't work 🥲 Next.js' middleware runs on the Edge runtime, and |
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 for the effort and trying it out @eunjae-lee. lets get this done then :) 🚀
* feat(space-next): add next.js starter for Space plugin * feat(space-next): support App Bridge (#83) * feat(space-next): support App Bridge * add more examples * update README * fix: incomplete implemention using Next.js middleware * Revert "fix: incomplete implemention using Next.js middleware" This reverts commit 6a113a6. * update .env.example
What?
This PR implements App Bridge for Next.js Space Plugin starter.
The same implementation will be applied to
tool-plugins/nextjs-starter
in a separate PR (once this is approved merged)Why?
JIRA: SHAPE-7006
How to test? (optional)