Skip to content

fix: adjust snackbar actions imports local file to uicore lib#1004

Merged
smarcet merged 4 commits into
masterfrom
fix/snackbar-actions
Jul 8, 2026
Merged

fix: adjust snackbar actions imports local file to uicore lib#1004
smarcet merged 4 commits into
masterfrom
fix/snackbar-actions

Conversation

@tomrndom

@tomrndom tomrndom commented Jul 3, 2026

Copy link
Copy Markdown

ref: https://app.clickup.com/t/9014802374/86baqq2rh

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Chores / Refactor
    • Updated multiple action modules to use shared notification/error-handling utilities from the UI foundation package for success/error snackbars, replacing local helpers.
    • Snackbar behavior remains consistent for end-users.
  • Tests
    • Extended admin access and selection plan tests to verify successful save flows dispatch SET_SNACKBAR_MESSAGE with { type: "success", code: 200 }.
  • Dependency
    • Bumped the UI foundation package version to 5.0.38.

…to uicore lib

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41a0177a-9a53-4c25-ad24-17bb8282eece

📥 Commits

Reviewing files that changed from the base of the PR and between d7a0a29 and 1a89321.

📒 Files selected for processing (2)
  • src/actions/__tests__/admin-access-actions.test.js
  • src/actions/__tests__/selection-plan-actions.test.js

📝 Walkthrough

Walkthrough

Action modules switch snackbar and related helper imports from src/actions/base-actions.js to openstack-uicore-foundation/lib/utils/actions. base-actions.js removes the moved helpers, the foundation dependency is updated, and save-flow tests now assert success snackbar dispatches.

Changes

Snackbar handler import migration

Layer / File(s) Summary
Core admin/content action files
src/actions/admin-access-actions.js, src/actions/form-template-item-actions.js, src/actions/media-file-type-actions.js, src/actions/member-actions.js, src/actions/page-template-actions.js, src/actions/selection-plan-actions.js, src/actions/show-pages-actions.js
Snackbar and related helper imports move from ./base-actions to openstack-uicore-foundation/lib/utils/actions.
Sponsor core action files
src/actions/sponsor-actions.js, src/actions/sponsor-cart-actions.js, src/actions/sponsor-forms-actions.js, src/actions/sponsor-mu-actions.js, src/actions/sponsor-pages-actions.js
Sponsor action modules switch snackbar and helper imports to the foundation module, including setSnackbarMessage and escapeFilterValue.
Sponsor purchases, users, and sponsorship actions
src/actions/sponsor-purchases-actions.js, src/actions/sponsor-users-actions.js, src/actions/sponsorship-actions.js
Sponsor purchase/user/sponsorship modules move snackbar and error helper imports to the foundation module.
Shared helpers and dependency bump
src/actions/base-actions.js, package.json, src/actions/ticket-actions.js, src/actions/track-chair-actions.js
Shared snackbar helpers are removed from base-actions.js, CODE_200 is dropped, the foundation dependency is bumped, and ticket/track-chair imports are rewired to the foundation module.
Snackbar success test updates
src/actions/__tests__/admin-access-actions.test.js, src/actions/__tests__/selection-plan-actions.test.js
Save-flow tests add assertions for dispatched success snackbar messages after create and update paths.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • fntechgit/summit-admin#789: Both PRs touch src/actions/base-actions.js around the snackbarErrorHandler implementation/exports, so the changes are related at the same code point.
  • fntechgit/summit-admin#857: Both PRs touch src/actions/sponsor-cart-actions.js and overlap on snackbar helper usage/imports.
  • fntechgit/summit-admin#911: Both PRs touch src/actions/admin-access-actions.js and revolve around snackbarErrorHandler/snackbarSuccessHandler usage.

Suggested reviewers: smarcet, santipalenque

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: moving snackbar action imports from the local file to the uicore library.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/snackbar-actions

Comment @coderabbitai help to get the list of available commands.

…rrorMsg

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
Signed-off-by: sebastian marcet <smarcet@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR standardizes snackbar success/error utilities across the app by switching multiple action modules from the local src/actions/base-actions.js helpers to the shared implementations exported by openstack-uicore-foundation, along with a patch bump of that dependency.

Changes:

  • Bumped openstack-uicore-foundation from 5.0.37 to 5.0.38.
  • Updated many src/actions/* modules to import snackbarErrorHandler, snackbarSuccessHandler, snackbarErrorMsg, and setSnackbarMessage from openstack-uicore-foundation/lib/utils/actions instead of ./base-actions.
  • Removed the now-redundant snackbar helper implementations from src/actions/base-actions.js (while retaining snackbar message action types and setters/clearers).

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Bumps openstack-uicore-foundation to 5.0.38.
yarn.lock Updates the resolved openstack-uicore-foundation tarball and integrity for 5.0.38.
src/actions/base-actions.js Removes local snackbar helper thunks that are now sourced from the shared library.
src/actions/admin-access-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/form-template-item-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/media-file-type-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/member-actions.js Switches snackbar error handler import from local base-actions to openstack-uicore-foundation.
src/actions/page-template-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/selection-plan-actions.js Switches snackbar success handler import from local base-actions to openstack-uicore-foundation.
src/actions/show-pages-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/sponsor-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/sponsor-cart-actions.js Switches snackbar handler + setSnackbarMessage imports from local base-actions to openstack-uicore-foundation.
src/actions/sponsor-forms-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/sponsor-mu-actions.js Switches snackbar error handler import from local base-actions to openstack-uicore-foundation.
src/actions/sponsor-pages-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/sponsor-purchases-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/sponsor-users-actions.js Switches snackbar handler imports (incl. snackbarErrorMsg) from local base-actions to openstack-uicore-foundation.
src/actions/sponsorship-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/ticket-actions.js Switches snackbar handler imports from local base-actions to openstack-uicore-foundation.
src/actions/track-chair-actions.js Switches snackbar error handler import from local base-actions to openstack-uicore-foundation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…plan saves

Asserts SET_SNACKBAR_MESSAGE (type: success, code: 200) is dispatched
after saveAdminAccess and saveSelectionPlan succeed, exercising the
real snackbarSuccessHandler now imported from openstack-uicore-foundation
instead of the removed local base-actions wrapper.

@smarcet smarcet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@smarcet smarcet merged commit 95b36e7 into master Jul 8, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants