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

[pull] main from solidusio:main #402

Merged
merged 18 commits into from
Mar 12, 2024
Merged

[pull] main from solidusio:main #402

merged 18 commits into from
Mar 12, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 11, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

spaghetticode and others added 13 commits March 7, 2024 10:37
We need to whitelist the ransackable attributes used on the new admin
tax categories page, or filtering won't work.
The former ones were not correct, probably just a leftover from
a cut and paste.
The component now behaves like a standard dialog:

  * closes on the current page, rather than redirecting elsewhere;
  * the close button is a standard dialog closing form;
  * the `open` attribute is removed, thus allowing ESC keypress
    to close the modal, and creating a focus trap when open. The
    previous behavior (i.e. have the modal open by default) is
    achieved via the new Stimulus controller, which on connect
    opens the dialog via JS.
This way we can inject arbitrary turbo frames into pages rendered
via this component.
The correct method name is `page_actions`, for this reason it was
previously not showing. Also, href is changed to a new route from
the new admin.
The new version adds cool new features such as page morphing and
refreshes. Specifically, we're going to use turbo stream refreshes
in a later commit.
The `new` action will render a modal dialog above a list of tax
categories, like the `index` action. For this reason, the common
controller code is extracted to a private method.
The component renders:

1) a list of tax categories in the background;
2) a dialog modal with the form for creating a new resource.

The modal is wrapped into a turbo frame tag, so it can be enclosed
in other pages (i.e. the tax categories index) asynchronously.
The `#create` controller action allows the creation of a new tax
category. Failed creation re-renders the form with errors within
the turbo frame tag, while successful creation is handled via a
turbo stream refresh tag that reloads the page.

Scroll position is preserved thanks to the custom Turbo meta tag
that enables the feature globally on the new admin.

Integration specs are added to test the complete feature.
The API gem needs to know which attributes are available by default, and
that is dependent on the promotion system that is being utilized.
When the legacy promotion system is extracted into its own gem, we won't
have the luxury of factories any longer and will need to stub the API of
a promotion handler ourselves.
…ibutes

Make API independent of promotion configuration
mamhoff and others added 5 commits March 12, 2024 10:06
We need to move some specs from solidus_legacy_promotions into
solidus_legacy_promotions. These specs use routes from the gem. Let's
add api as a dependency.
We're keeping the non-promotion-related parts of this spec in core, but
the promotion part has to go. For this spec, I don't think it makes
sense to stub out all the things.
This spec is not feasible with the promotion system extracted within
core. Moving.
This spec was previously already fixed to not refer to any
promotion-system-related things, but I forgot this one line in #5686.
SolidusLegacyPromotion extraction: Move and fix remaining API specs
@pull pull bot merged commit 0870e75 into nebulab:main Mar 12, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants