Skip to content

Merge solidus_starter_frontend into the monorepo#6468

Draft
jarednorman wants to merge 1293 commits into
solidusio:mainfrom
SuperGoodSoft:all-together-now
Draft

Merge solidus_starter_frontend into the monorepo#6468
jarednorman wants to merge 1293 commits into
solidusio:mainfrom
SuperGoodSoft:all-together-now

Conversation

@jarednorman
Copy link
Copy Markdown
Member

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.

kennyadsl and others added 30 commits February 8, 2023 09:36
…e-search

Autocomplete main search with products and taxons
We're bumping the browser-tools-orb version to fetch the fix
implemented at CircleCI-Public/browser-tools-orb#63.

The issue was due to chromedriver adding a file within the project
directory, making it impossible to checkout our code there in a
following step.

To be on the safe side for future possible regressions, we're moving our
checkout step to the top of the stack to ensure it finds a pristine
directory.

Closes solidusio#315
…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.
…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.
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>
AlistairNorman and others added 3 commits April 30, 2026 11:51
This fails sometimes because there was nothing preventing a race
condition here.
After we click the checkout button, we need to make sure the page is
loaded before we visit another page.

Co-authored-by: Alistair <alistair@super.gd>
Co-authored-by: Chris <chris@super.gd>
We need to make sure the page is loaded before navigating to the next
checkout step.

Co-authored-by: Alistair <alistair@super.gd>
Co-authored-by: Chris <chris@super.gd>
@jarednorman
Copy link
Copy Markdown
Member Author

jarednorman commented May 20, 2026

@forkata We need to redo the subtree merge once the test suite fixes are in and then rebase our changes on that, right?

@forkata
Copy link
Copy Markdown
Contributor

forkata commented May 20, 2026

@forkata We need to redo the subtree merge once the test suite fixes are in and then rebase our changes on that, right?

I am not sure, but once we merge that branch we can try doing that 🤔 For now we wanted to pull in the spec fixes, so we just cherry-picked those commits. We tried to rebase on main but that caused some issues, so we backed out of that.

tvdeyen and others added 10 commits May 21, 2026 07:36
Improve CI reliability and get builds passing
…61a0a129'

git-subtree-dir: starter_frontend
git-subtree-mainline: 5ab22cd
git-subtree-split: 4053965
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.
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>
@forkata forkata force-pushed the all-together-now branch 3 times, most recently from f0d6d1f to feac194 Compare May 21, 2026 18:50
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>
@forkata forkata force-pushed the all-together-now branch from feac194 to 95c571f Compare May 21, 2026 21:47
const firstVariant = document.querySelector("[data-option-index]");
if (firstVariant) {
setTimeout(() => { firstVariant.click(); }, 1);
function selectFirstVariant() {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Without actually looking at the problem here, this doesn't feel like it should work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@forkata forkata force-pushed the all-together-now branch from 6c464a7 to a62a2a3 Compare May 28, 2026 18:15
forkata and others added 6 commits May 28, 2026 11:18
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>
@forkata forkata force-pushed the all-together-now branch from a62a2a3 to 17eb094 Compare May 28, 2026 18:18
This attempts to setup code coverage through simplecov when running the
starter_frontend 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_core Changes to the solidus_core gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.