Skip to content

feat(data-modeling): add rename collection to side panel COMPASS-9658 #7174

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Aug 7, 2025

COMPASS-9658

Opening as a draft, there's a TODO in this code that I have an open thread in the tech design on: https://docs.google.com/document/d/15Dn5FB3POEj9sYQrYIUajZySqFzlPfpcgjkPhzFqSFg/edit?disco=AAABnqG-O7o

Adding e2e tests for this in the next pr that has remove collection.

rename.collection.mp4

@github-actions github-actions bot added the feat label Aug 7, 2025
@Anemy Anemy added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Aug 7, 2025
Comment on lines +363 to +370
dispatch(applyEdit(edit));

// When renaming we want to keep the renamed collection selected in the UI,
// the ID is the collection name.
dispatch({
type: DiagramActionTypes.COLLECTION_SELECTED,
namespace: toNS,
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Batch updates are an antipattern, reducer should be the one accounting for that instead of multiple events being dispatched

Copy link
Collaborator

Choose a reason for hiding this comment

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

Because APPLY_EDIT is somewhat of a generic action with subactions itself, we can in theory apply this redux pattern where you create a case reducer (not a slice, just another reducer that expects only a certain type of action) and move the logic of handling applies there. No strong opinion here, definitely might be an overkill, but this would be a second case for something like that for this action already 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat feature flagged PRs labeled with this label will not be included in the release notes of the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants