Merge solidus_starter_frontend into the monorepo#6468
Draft
jarednorman wants to merge 1295 commits into
Draft
Conversation
…heckout_on_ci Fix checkout step on CircleCI
We now have features that are only compatible with the last version of Rails and we are assuming the project will be only installed on the latest. This change let the installer exit if a previous version is detected, printing a message that asks to retry with latest Rails.
…-7-plus Abort installation when Rails < 7
We were storing the Slack secrets on a CircleCI context [1]. Although we were also passing them to forks [2], it resulted on unauthorized builds for external contributions. We could work around the issue in two ways: - Having the secrets outside of any context, but that would compromise the security of the associated Slack channel for: - Send messages as @circleci notifications - Send messages to channels @circleci notifications isn't a member of - Upload, edit, and delete files as CircleCI notifications - Using CircleCI logic statements [3] to conditionally run jobs when `CIRCLECI_USERNAME` or `CIRCLE_PR_USERNAME` env vars [4] are in a list of allowed users. However, that would be something difficult to maintain, and there's no other way to check the user's role. Given that we don't find those trade-offs to be acceptable, we remove the integration for now. [1] - https://circleci.com/docs/contexts/ [2] - https://circleci.com/docs/oss/#pass-secrets-to-builds-from-forked-pull-requests [3] - https://circleci.com/docs/configuration-reference/#logic-statements [4] - https://circleci.com/docs/variables/
…e_slack_not Remove Slack notifications for CI failures
Fixes solidusio#313 By clicking on one of the results item, the focusout event is triggered and it acts before the click event is triggered, removing the list. To solve this, we listen to all click events and do nothing if the click is internal to the autcomplete, otherwise it resets it.
…e-mouse-click Fix clicking on autocomplete results
By adding a wait_for_autocomplete helper method.
In order to use the main one in our organization's .github repository.
…template Remove custom PR template
…ch-specs Polish search autocomplete specs
In the order details page shown for the confirmation step and the order complete page the billing address should be more visually related to the payment.
Also show the payment state, near the payment.
Code readability and (basic) UX improvements
Probably a legacy of an older layout.
For parity with the new card / payment method partials in which the radio buttons are external to the partials provided by the payment methods.
In a real world scenario this would probably hold instructions on where to send the check. This work both as a placeholder and to visually balance the check with other payment methods.
Only useful to remember how the numbers are distributed while testing.
The triple level of radio buttons that was previously used was very confusing and broken. Instead of trying to fix it seems better to present the customer a single list of options for making the payment. The list gives precedence to wallet payments as they require less clicks. If no wallet payments are available the first payment method is selected. Whenever a radio is selected elements from the other list are deselected, giving the illusion of having a single list. Each existing and new payment method have clear and distinct areas for the input label and for the details. This gives more symmetry between existing and new payments partial implementations and a cleaner visual layout.
…anup Payment step cleanup
enable localizing shopping cart review page
feat: localizing cart review page
Otherwise, payment iframes will still be clickable Co-authored-by: Elia Schito <elia@schito.me> Co-authored-by: Francesco Aiello <francesco.aiello@hey.com>
…ointer-events-none-to-disabled-fields Block clicks on disabled form elements
- Only render the currency microdata when the price is present - Keep the cache block in the products grid - Add specs for rendering with/without a taxon Co-Authored-By: Safa <aballaghsafa@gmail.com>
Now that solidus_starter_frontend lives under starter_frontend/ in this monorepo, rewire the installer to fetch the template from solidusio/solidus instead of the standalone solidusio/solidus_starter_frontend repo. Update the release-time ref-bumping script accordingly.
The Solidus installer workflow already exercises the --frontend=starter install path. Extend it to also run the starter frontend's own rspec suite against the freshly-installed host app, so SSF's tests are covered in the monorepo's CI without needing a separate workflow.
The SSF CI workflow delegated to solidusio/test-solidus-extension, which clones a released solidus_core from RubyGems rather than using the in-tree version. Now that solidus_installer.yml runs the SSF spec suite against the in-tree Solidus (see previous commit), this standalone workflow is redundant. Remove starter_frontend/.github/ entirely.
feac194 to
95c571f
Compare
jarednorman
commented
May 27, 2026
| const firstVariant = document.querySelector("[data-option-index]"); | ||
| if (firstVariant) { | ||
| setTimeout(() => { firstVariant.click(); }, 1); | ||
| function selectFirstVariant() { |
Member
Author
There was a problem hiding this comment.
Without actually looking at the problem here, this doesn't feel like it should work.
Contributor
There was a problem hiding this comment.
We dropped this commit and think this refactor should be done after we've merged this PR. For now we're excluding this file from eslint.
a62a2a3 to
17eb094
Compare
Previously, the installer fetched the SSF template from a URL with a hardcoded ref that had to be bumped at release time by a dedicated script. Derive the ref from Spree.solidus_version instead: released versions resolve to their matching patch branch (e.g. v4.8), prereleases and missing versions fall back to main. CI can override via SOLIDUS_STARTER_FRONTEND_TEMPLATE to test against the in-tree template, which the installer workflow now does. This removes the need for bin/release/bump-starter-frontend-version and the corresponding steps in prepare_release.yml / prepare_post_release.yml.
Two changes to starter_frontend/template.rb:
1. Skip git clone when the template is applied from a local path. In the
standalone-repo layout, file://#{File.dirname(__FILE__)} happened to
be a git repo, so `git clone` worked. In the monorepo,
starter_frontend/ is a plain subdirectory and the clone fails. Set
source_paths directly from File.dirname(__FILE__)/templates when
running locally.
2. Replace the legacy URL parser
(/<owner>/solidus_starter_frontend/raw/<ref>/template.rb) with the
monorepo parser (/<owner>/<repo>/raw/<ref>/starter_frontend/template.rb).
When parsing succeeds, clone the referenced repo at the referenced
ref and use starter_frontend/templates/ as the source directory.
Unrecognized URL shapes now abort with a clear message.
Legacy support lives at solidusio/solidus_starter_frontend, which
continues to serve its old main branch for older solidus_core releases
that still have the legacy URL hardcoded.
The solidus CI runs standardrb on the commits and the starter frontend gem we are pulling into the mono repo needs to conform to this. Co-authored-by: Alistair Norman <alistair@super.gd>
This fixes one more standardrb violation. Co-authored-by: Alistair Norman <alistair@super.gd>
This fixes the remaining violations that couldn't be fixed automatically. We also needed to update the exclusion for the sandbox app to also handle the one in the starter_frontend folder. Co-authored-by: Alistair Norman <alistair@super.gd>
We don't need to render when using `fresh_when`, as it will either render the partial or return a not modified status code. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Alistair Norman <alistair@super.gd> Co-authored-by: Jared Norman <jared@super.gd> Co-authored-by: Noah Silvera <noah@super.gd> Co-authored-by: Senem Soy <senem@super.gd> Co-authored-by: Sofia Besenski <sofia@super.gd>
In solidus we are using eslint v10 which uses a new "flat" configuration format. This change copies the config found in the admin gem and adapts it to the starter_frontend. Co-authored-by: Alistair Norman <alistair@super.gd>
This just runs the following command ``` npx -y eslint $(git ls-files -co --exclude-standard | grep -E "\.js$" | grep -vE "/(vendor|config|spec)/") --fix ``` Co-authored-by: Alistair Norman <alistair@super.gd>
This is defined in a `.js.erb` file so eslint is not picking up the definition. This is consistent with how we handle `Spree` in the global eslint config. Co-authored-by: Alistair Norman <alistair@super.gd>
This change adds some constant declarations infront of variables we were implicitly declaring in order to fix eslint errors. Co-authored-by: Alistair Norman <alistair@super.gd>
The previous configuration here didn't pass the eslint and failed with a parse error. Switching to the latest ECMA version seems to resolve this. This feature wasn't introduced until ES2022. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Sofia Besenski <sofia@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
This component doesn't conform to the "module" ES source type we have configured in eslint, so the use of the functions is not correctly detected. There are indeed some unused functions here, but that's out of scope for this change and should be refactored in a separate PR. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Sofia Besenski <sofia@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
df5f5e2 to
e3278cd
Compare
- Rename starter_frontend/ directory to storefront/ - Replace all solidus_starter_frontend identifiers with solidus_storefront - Replace all SolidusStarterFrontend module references with SolidusStorefront - Rename asset files (manifest.js, .js, .css) to solidus_storefront_* - Rename spec helper and support directory to solidus_storefront_* - Update SOLIDUS_STARTER_FRONTEND_TEMPLATE env var to SOLIDUS_STOREFRONT_TEMPLATE - Update all path references from starter_frontend/ to storefront/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e3278cd to
3cc9a59
Compare
Contributor
|
I fixed an error with the code coverage, renamed starter_frontend to storefront, and fixed another small error that I encountered when running the sandbox script. |
This attempts to setup code coverage through simplecov when running the storefront specs. Co-authored-by: Adam Mueller <adam@super.gd> Co-authored-by: Sofia Besenski <sofia@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
3cc9a59 to
b446913
Compare
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.
Summary
As the Starter Frontend has replace solidus_frontend as the primary frontend of Solidus, we want to bring it into monorepo. This helps centralize the maintenance of the project and surface compatibility issues as early as possible.
I have chosen to preserve the whole history of the project, so the PR looks a little scary. In reality, only the merge commit that merges the other history in and subsequent commits need to be reviewed.