Skip to content

Clean up action types#4186

Open
marlo-longley wants to merge 1 commit intomainfrom
actions-review
Open

Clean up action types#4186
marlo-longley wants to merge 1 commit intomainfrom
actions-review

Conversation

@marlo-longley
Copy link
Copy Markdown
Member

@marlo-longley marlo-longley commented Oct 2, 2025

In the process of writing this Wiki documentation page, I realized that several action types were undispatched.
https://github.com/ProjectMirador/mirador/wiki/Architecture-overview-4:-Mirador-state-changes-for-plugin-authors

  • Remove un-dispatched setWorkspaceFullscreen action
  • Remove un-dispatched ADD_MANIFEST action type
  • Remove un-dispatched window actions
  • Remove un-dispatched CLEAR_ACCESS_TOKEN_QUEUE from action types

Happy to discuss, but cleaning up unused actions will make the code easier to understand.

@marlo-longley marlo-longley force-pushed the actions-review branch 2 times, most recently from c7fa1cd to 3fb337b Compare October 2, 2025 20:33
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.1%. Comparing base (6a4aa4e) to head (12fc0d0).
⚠️ Report is 106 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4186     +/-   ##
=======================================
- Coverage   95.2%   95.1%   -0.1%     
=======================================
  Files        326     326             
  Lines      16192   16165     -27     
  Branches    2554    2545      -9     
=======================================
- Hits       15413   15364     -49     
- Misses       774     796     +22     
  Partials       5       5             

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marlo-longley marlo-longley marked this pull request as ready for review October 2, 2025 21:01
@lutzhelm lutzhelm self-requested a review December 4, 2025 16:25
Copy link
Copy Markdown
Contributor

@lutzhelm lutzhelm left a comment

Choose a reason for hiding this comment

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

I'm wondering if there is a more than theoretical possibility that any dependent project relies on the reducers for SET_WINDOW_SIZE or UPDATE_WINDOW_POSITION. That would require them to provide their own functions to dispatch those actions. I searched on GitHub and couldn't find any indication, but there might (theoretically!) still be occurrences on different services / private repos.

I think it is quite unlikely, and if people actually run into this issue, we can still advice them to add those reducers in their own code.

If we agree on this, I will merge this PR; I just want to rule out that we are introducing an actually breaking change.

@geourjoa
Copy link
Copy Markdown
Collaborator

geourjoa commented Mar 17, 2026

I search also for usage in github projects and find nothing on it.

@marlo-longley @lutzhelm
I think it can be merged and mention in a changelog file

Copy link
Copy Markdown
Collaborator

@dnoneill dnoneill left a comment

Choose a reason for hiding this comment

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

SET_WORKSPACE_FULLSCREEN is still in

case ActionTypes.SET_WORKSPACE_FULLSCREEN:
. Also we are using SET_WORKPACE_FULLSCREEN in our instance though I think we could easily remove it because it doesn't make a ton of sense. https://github.com/sul-dlss/sul-embed/blob/ebd41ba990eeec8b0fab905844c291b6c3ef3050/app/javascript/src/mirador/plugins/analyticsPlugin.js#L192

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.

4 participants