Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Widget size
|
There was a problem hiding this comment.
🟡 Changes recommended
The staging Docker build fails because Bash is unavailable, while production can expose unreleased widget assets and the preview labels unreleased installation snippets as the latest released version.
2 open issues
What changed in this PR
Adds an unreleased next widget build so staging can test widget changes before the release-PR process publishes a version.
Changes:
- Builds
nextfor non-production Docker deployments and adds a local generation command. - Defaults the widget demo to
nextwhen available, with links to switch to the latest release. - Excludes
nextfrom release metadata and version control, and adds a cache override for its assets.
| File | Description |
|---|---|
src/widget/vite.config.js |
Supports overriding the widget version and output directory. |
src/pages/widget/index.tsx |
Selects the demo version and adds release-switching links. |
src/page-modules/widget/widget.module.css |
Styles the version information banner. |
src/page-modules/widget/server/index.ts |
Exposes unreleased widget metadata when available. |
src/page-modules/widget/index.ts |
Exports the unreleased widget type. |
scripts/release-widgets.sh |
Excludes non-release directories from version comparisons. |
scripts/generate-widget-stat.js |
Limits manifest entries to released versions. |
scripts/build-widget-next.sh |
Builds and processes unreleased widget assets. |
scripts/build-docker.sh |
Invokes the widget build for non-production environments. |
README.md |
Documents staging previews and local unreleased builds. |
package.json |
Adds generate-widget-next. |
next.config.js |
Detects unreleased assets and sets their cache policy. |
.gitignore |
Excludes generated next assets. |
Review effort: Balanced
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Ref
Well... this is awkward...
Description
So my ci: Improve widget release process has a claring issue that I did not take into account. Staging...
If a person wanted to do the widget release via the automatic way it would be impossible to tests widget on staging before release.
Also doesn't help that the widget is kinda screwed up in in vercel in the release pr. (Different problem and a different solution in the making)
So this is the solution to that problem... this still will all be solved with our new repo that is specifically for the widget. But no eta on that one yet.
Back to the solution. We make staging always build the widget and store it under version "next". version "next" is walways build from main and is only deployed to staging. Production wont have it. Staging will have a way switch between a released version and a "next" version.
So testing on staging is possible again... yay. Staging will always have the latest version 😄
I am aware that the amount of scripts is building up. Will most likely soon refactor those scripts I feel they can be one script with arguments instead of multiple scripts.
Am also considering if we should name this "canary" or something else? Don't like next so much but its used. Would use latest but feel like that could lead to confusion when somebody talks about the "latest version" 🤷
Modified Diagram based on previous diagram
flowchart TD M[PR merged to main] --> N[Staging deployment builds<br/>unreleased widget 'next'] N --> O[unreleased widget available <br/> on staging for testing] M --> A[Release PR opened or updated] A --> B[Build widget for all orgs] B --> C{Changed since<br/>last version?} C -->|Yes| E[Commit widget to release PR] C -->|No| D{force-widget-release<br/>label?} D -->|Yes| E D -->|No| F[Discard build] E --> G[Merge release PR] F --> G O -.-> G G --> H[Released to prod<br/>without next]Demo
widgetPage - Without next version

WidgetPage - with next version