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] Add the ability to configure batch action confirmation #5702

Conversation

forkata
Copy link
Contributor

@forkata forkata commented Mar 18, 2024

Summary

This change introduces a new boolean configuration on the BatchAction struct that would allow users of the UI::Table component to specify if a batch action requires confirmation.

This change enables this new behaviour on the products index batch actions as a proof of concept.

This is a draft because we haven't added any tests yet, but if this approach looks reasonable we can do that as well.
Update: Specs have been updated and passing now.

Issue https://github.com/orgs/solidusio/projects/12/views/1?pane=issue&itemId=52056191

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

Screenshots

Bulk Delete Bulk Discontinue Bulk Activate
Single Screenshot 2024-04-01 at 9 29 04 PM Screenshot 2024-04-01 at 9 29 21 PM Screenshot 2024-04-01 at 9 29 38 PM
Multiple Screenshot 2024-03-18 at 2 46 53 PM Screenshot 2024-03-18 at 2 47 04 PM Screenshot 2024-04-01 at 9 30 00 PM

@forkata forkata force-pushed the feature/solidus_admin/add-batch-action-confirmation branch from 4cbd7c5 to 83d0141 Compare March 18, 2024 23:41
@forkata forkata changed the title Add the ability to configure batch action confirmation [Admin] Add the ability to configure batch action confirmation Apr 2, 2024
forkata and others added 2 commits April 1, 2024 20:57
This change introduces a new boolean configuration on the `BatchAction`
struct that would allow users of the `UI::Table` component to specify
if a batch action requires confirmation.

This change enables this new behaviour on the products index batch
actions as a proof of concept.

Co-authored-by: Kendra Riga <kendra@super.gd>
Co-authored-by: Cameron Day <cameron@super.gd>
This change adds proper pluralization in the confirm dialog for the
resource being modified. Previously the dialog always used the plural
version of the resource.
@forkata forkata force-pushed the feature/solidus_admin/add-batch-action-confirmation branch from 83d0141 to 2e70faf Compare April 2, 2024 04:17
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.92%. Comparing base (9997bce) to head (2e70faf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5702   +/-   ##
=======================================
  Coverage   88.92%   88.92%           
=======================================
  Files         700      700           
  Lines       16655    16663    +8     
=======================================
+ Hits        14810    14818    +8     
  Misses       1845     1845           

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

@forkata forkata marked this pull request as ready for review April 2, 2024 04:34
@forkata forkata requested a review from a team as a code owner April 2, 2024 04:34
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

👌 Thanks!

@tvdeyen tvdeyen merged commit f7fc5ea into solidusio:main Apr 5, 2024
14 checks passed
@tvdeyen
Copy link
Member

tvdeyen commented Apr 5, 2024

Thanks @forkata 🙏🏻

@forkata forkata deleted the feature/solidus_admin/add-batch-action-confirmation branch May 2, 2024 20:51
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