Skip to content

feat: move activity types new and edit to mui#977

Open
priscila-moneo wants to merge 2 commits into
feature/move-activity-types-grid-muifrom
feature/move-edit-new-activity-types-mui
Open

feat: move activity types new and edit to mui#977
priscila-moneo wants to merge 2 commits into
feature/move-activity-types-grid-muifrom
feature/move-edit-new-activity-types-mui

Conversation

@priscila-moneo

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 942af5da-4204-4100-a37e-f791b82720c8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/move-edit-new-activity-types-mui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@santipalenque santipalenque 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.

@priscila-moneo looks good ! just one thing

linkToPresentationType,
unlinkFromPresentationType
}) => {
const [isSaving, setIsSaving] = useState(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please use baseState loading prop . it is set at the beginning of each action call: example

@santipalenque santipalenque 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

linkToPresentationType,
unlinkFromPresentationType
}) => {
const isSaving = Boolean(loading);

@smarcet smarcet Jun 23, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

isSaving is derived from the global baseState.loading counter instead of local state. This means any concurrent request (autocomplete, list reload, etc.) incorrectly disables the form while the user is filling it in.

The canonical pattern for popups in this project (see summit-admin-popup-dialog-pattern.md and the media-file-type-dialog.js reference) requires:

  • const [isSaving, setIsSaving] = useState(false) in the popup
  • setIsSaving(true) before calling save
  • .finally(() => setIsSaving(false)) to reset

Related: saveEventType is connected directly via Redux-connect in this dialog (mapDispatchToProps line 132), which is also an anti-pattern per the project rules — the save action belongs in the parent's handleSave, passed down as a single onSave prop.
see https://app.clickup.com/t/9014802374/86bag2zk7

Comment thread src/actions/event-type-actions.js Outdated
dispatch(
showSuccessMessage(T.translate("edit_event_type.event_type_saved"))
);
return dispatch(getEventTypes());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The list reload (dispatch(getEventTypes())) belongs in the parent's handleSave, not inside the action. As-is, saveEventType is coupled to the list page: it can't be reused in any other context without triggering a full list refresh.

The canonical shape (from the media-file-type-list-page.js reference and ticket 86bag2zk7) is:

// parent
const handleSave = (entity) =>
  saveEventType(entity)
    .then(() => getEventTypes(term, DEFAULT_CURRENT_PAGE, perPage, order, orderDir));

Same issue applies to the POST path on line 155.

@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.

@priscila-moneo please review

@priscila-moneo priscila-moneo force-pushed the feature/move-activity-types-grid-mui branch from 77cea30 to 6872754 Compare June 24, 2026 21:57
Signed-off-by: Priscila Moneo <priscila_moneo@hotmail.com.ar>
@priscila-moneo priscila-moneo force-pushed the feature/move-edit-new-activity-types-mui branch from 82c99d3 to bb7892e Compare June 24, 2026 22:02
Signed-off-by: Priscila Moneo <priscila_moneo@hotmail.com.ar>
@priscila-moneo priscila-moneo requested a review from smarcet June 24, 2026 22:07
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