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(tool-next): support App Bridge #85

Conversation

eunjae-lee
Copy link
Contributor

@eunjae-lee eunjae-lee commented Sep 19, 2024

What?

This PR adds App Bridge support to the Next.js Tool Starter. It's mostly copy & paste from space-plugins/nextjs-starter.

Why?

JIRA: SHAPE-7069

How to test? (optional)

@eunjae-lee eunjae-lee marked this pull request as ready for review September 20, 2024 07:32
Copy link
Contributor

@demetriusfeijoo demetriusfeijoo left a comment

Choose a reason for hiding this comment

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

Hey @eunjae-lee
Sorry for the delay on this one 🙏

The changes look solid 💯 but I left some nit comments and questions just to be sure once this context is still complex to me.

I was also questioning about moving the pages/api/_app_bridge.ts and pages/api/_oauth.ts files to a subfolder, like pages/api/_auth/. Wdyt?

By the way, missed a lot we don't have the Layers and Middlewares and in Nuxt here. 🤣 🤣

tool-plugins/nextjs-starter/src/utils/const.ts Outdated Show resolved Hide resolved
tool-plugins/nextjs-starter/src/hooks/useAppBridge.ts Outdated Show resolved Hide resolved
tool-plugins/nextjs-starter/README.md Outdated Show resolved Hide resolved
tool-plugins/nextjs-starter/src/components/Example.tsx Outdated Show resolved Hide resolved
@eunjae-lee
Copy link
Contributor Author

Hey @eunjae-lee Sorry for the delay on this one 🙏

The changes look solid 💯 but I left some nit comments and questions just to be sure once this context is still complex to me.

I was also questioning about moving the pages/api/_app_bridge.ts and pages/api/_oauth.ts files to a subfolder, like pages/api/_auth/. Wdyt?

By the way, missed a lot we don't have the Layers and Middlewares and in Nuxt here. 🤣 🤣

Yeah indeed we don't have Layers and Middlewares, and I don't like the outcome compared to our nuxt base 😭 Anyway, we could change the endpoints, but we should do it for all the other projects for consistency. Maybe we could do it in a separate PR if we want. I will exclude it for now here.

eunjae-lee and others added 7 commits September 27, 2024 16:25
…s-starter-tool-plugin' of github.com:storyblok/space-tool-plugins into SHAPE-7069-implement-app-bridge-functionality-for-nextjs-starter-tool-plugin
…s-starter-tool-plugin' of github.com:storyblok/space-tool-plugins into SHAPE-7069-implement-app-bridge-functionality-for-nextjs-starter-tool-plugin
@demetriusfeijoo
Copy link
Contributor

Hey @eunjae-lee

Maybe we could do it in a separate PR if we want. I will exclude it for now here.

Yeah, I totally agree. Let's do it in another PR and it's also not that relevant too. 🙌

Copy link
Contributor

@demetriusfeijoo demetriusfeijoo left a comment

Choose a reason for hiding this comment

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

Let's gooo 🚀 🚀
Massive job, @eunjae-lee 💪

@eunjae-lee eunjae-lee merged commit 9a17eb0 into main Sep 27, 2024
1 check passed
@eunjae-lee eunjae-lee deleted the SHAPE-7069-implement-app-bridge-functionality-for-nextjs-starter-tool-plugin branch September 27, 2024 15:26
@@ -0,0 +1,9 @@
export const KEY_PREFIX = 'sb_ab';
Copy link
Contributor

Choose a reason for hiding this comment

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

One question @eunjae-lee @demetriusfeijoo is this supposed to be sb_app or sb_ab? Is okay? What is ab in this context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

app.. bridge... 😂

{completed && (
<div>
<UserInfo />
<Test />
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this supposed to be <Example /> instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's true. I missed it! Let me make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants