-
Notifications
You must be signed in to change notification settings - Fork 0
Remove Next.js variation #22
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
Conversation
👋 @marcospassos
☝️ Lastly, the title for the commit will come from the pull request title. So please provide a descriptive title that summarizes the changes in 50 characters or less using the imperative mood. |
🔥 Here is the preview of the pull request: |
commit: |
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.
Pull Request Overview
This pull request refactors the iframe style isolation logic by removing the Next.js variation and associated code. Key changes include eliminating Next.js–specific imports and files, renaming the iframe-related prop from "src" to "frame" across components and stories, and updating the CSS rules for iframe rendering.
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
vite.config.ts | Removed Next.js–specific entry from the library entry list. |
src/web/TemplateCanvas/stories.module.css | Added CSS for consistent styling of example content. |
src/web/TemplateCanvas/index.tsx | Renamed "src" prop to "frame" for iframe rendering. |
src/react/TemplateCanvas/styles.module.css | Moved and defined the .iframe rule externally for clarity. |
src/react/TemplateCanvas/index.tsx | Refactored the template to render an iframe conditionally using react-frame-component. |
src/react/TemplateCanvas/TemplateCanvas.stories.tsx | Updated the story to use the new "frame" prop with a play function for iframe verification. |
src/next/* | Removed all Next.js–specific files and references. |
package.json and .storybook/* folders | Cleaned up Next.js configurations and dependencies. |
.github/workflows/* | Updated deployment workflows to no longer reference Next.js–specific builds. |
Comments suppressed due to low confidence (2)
src/web/TemplateCanvas/TemplateCanvas.stories.ts:84
- The 'Iframe' control currently has an empty description. Please add a brief description to clarify its purpose for users.
frame: { name: 'Iframe', description: '', control: { type: 'text', }, },
src/react/TemplateCanvas/index.tsx:106
- Renaming the prop from 'src' to 'frame' is a breaking change. Ensure that the documentation and tests have been updated accordingly to reflect this update.
frame = false,
Summary
This PR refactors the logic for isolating styles in an iframe, eliminating the need for a Next.js-specific implementation. Previously, the approach involved reloading the current page inside an iframe using the actual URL, with query string parameters indicating whether to render the canvas and whether to display only the children (when embedded within the canvas).
That method had several drawbacks:
The new approach renders content directly into a
docsrc
iframe, and styles are programmatically copied over, avoiding reliance on URL parameters and framework-specific behavior.Checklist