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

Admin adjustable components #5791

Merged
merged 5 commits into from
Jun 20, 2024

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jun 14, 2024

Summary

This applies the same pattern to adjustment adjustables (line items, order, an shipments) as we have already done to adjustment sources. In order to distinguish the two namespaces, it changes the adjustment namespace to source, and adds an adjustable namespace.

The HTML needed for the pattern is moved to the UI namespace, with a new component, ThumbnailWithCaption.

With this commit, adjustment sources also get icons. I feel this was intended from the get-go but somehow missed. Here's the difference:

Before:
grafik

After:
grafik

@mamhoff mamhoff force-pushed the admin-adjustable-components branch from 7e8a61a to 1a049d4 Compare June 14, 2024 09:40
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.76%. Comparing base (b555db8) to head (ec15751).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5791      +/-   ##
==========================================
+ Coverage   88.68%   88.76%   +0.08%     
==========================================
  Files         721      726       +5     
  Lines       16997    17023      +26     
==========================================
+ Hits        15073    15111      +38     
+ Misses       1924     1912      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mamhoff mamhoff force-pushed the admin-adjustable-components branch from 1a049d4 to 56e4ac4 Compare June 14, 2024 09:53
This is used in a number of other places. Also, this adds icons to the
adjustment source components, which looks nice (and was probably
intended).
It will otherwise get confusing when we add adjustables.
This allows us to remove a bunch of untested (and untestable) code.

Especially the `else` block in `figcaption_for_adjustable` is impossible
to reach, as only orders, line items and shipments are adjustable. If
people have their own adjustable objects, they can now just add a
component.
@mamhoff mamhoff force-pushed the admin-adjustable-components branch 2 times, most recently from 7e54efb to 5955fb2 Compare June 20, 2024 13:46
@mamhoff mamhoff force-pushed the admin-adjustable-components branch from 5955fb2 to ec15751 Compare June 20, 2024 13:58
@tvdeyen tvdeyen merged commit a176e05 into solidusio:main Jun 20, 2024
14 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.

3 participants