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

Remove obsolete dom reducer actions #1541

Merged
merged 3 commits into from
Jan 10, 2023
Merged

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Jan 10, 2023

Taking a look at the undo/redo logic. Trying to move more of the logic inside of the reducer. Saw an opportunity to simplify some of the logic (always prefer positive logic) and remove some of the actions. Having a single DOM_UPDATE action should hopefully make it easier to detect the nature of an update (updating the same property, or a new one)

@oliviertassinari oliviertassinari requested a deployment to remove-unnecessary-actions - toolpad-db PR #1541 January 10, 2023 14:05 — with Render Abandoned
@Janpot Janpot requested a review from apedroferreira January 10, 2023 14:06
@Janpot Janpot added the core Infrastructure work going on behind the scenes label Jan 10, 2023
@Janpot Janpot marked this pull request as ready for review January 10, 2023 15:43
@Janpot Janpot enabled auto-merge (squash) January 10, 2023 15:43
@oliviertassinari oliviertassinari temporarily deployed to remove-unnecessary-actions - toolpad PR #1541 January 10, 2023 15:46 — with Render Destroyed
Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

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

Looks good, definitely more readable and shorter!

We can also remove some methods such as domApi.setNodeNamespace and domApi.setNodeName and make them usable only with domApi.update if you think it's worth doing. I kept them separate because I think they're still kind of useful like that.

@Janpot Janpot disabled auto-merge January 10, 2023 15:50
@oliviertassinari oliviertassinari temporarily deployed to remove-unnecessary-actions - toolpad PR #1541 January 10, 2023 15:52 — with Render Destroyed
@Janpot Janpot merged commit 5a27e81 into master Jan 10, 2023
@Janpot Janpot deleted the remove-unnecessary-actions branch January 10, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants