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

feat(react-components): Undo in architecture + implemented it in cropping, slicing, measurement etc #4629

Merged
merged 21 commits into from
Jun 26, 2024

Conversation

nilscognite
Copy link
Contributor

@nilscognite nilscognite commented Jun 21, 2024

Type of change

Feat

Jira ticket 📘

https://cognitedata.atlassian.net/browse/BND3D-4443

Description 📝

This is a implementation of the undo pattern I have implemented on other apps. I have used in the Example, Slice planes, Crop box and all the measurement objects.

There is a minor bug when doing undo on the polylines measurement, when this is about to be created.

How has this been tested? 🔍

  1. Use architecture/storybook.
  2. Use crop, measurement or example.
  3. Create object, delete some, move some, try the Undo.

Checklist ☑️

  • I am proud of this feature.
  • I have performed a self-review of my own code.
  • I have added PR type (Feat, Bug, Chore, Test, Docs, Style, Refactor) to the PR title.
  • I have manually tested this for different scenarios (different models, formats, devices, browsers).
  • I have commented my code in hard-to-understand areas.
  • I have made corresponding changes to the public documentation.
  • I have added unit and visuals tests to prove that my feature works to the best of my ability.
  • I have refactored the code for readability to the best of my ability.
  • I have checked that my changes do not introduce regressions in the public documentation.
  • I have outlined any known defects / lacking capabilities in the contents of this PR.
  • I have listed any remaining work that should follow this PR in the description or jira/miro/etc.
  • I have added TSDoc to any public facing changes.
  • I have added "developer documentation" in any package README.md that is related / applicable to this PR.
  • I have noted down and am currently tracking any technical debt introduced in this PR.
  • I have thoroughly thought about the architecture of this implementation.
  • I have asked peers to test this feature.

@nilscognite nilscognite requested a review from a team as a code owner June 21, 2024 06:42
@nilscognite nilscognite marked this pull request as draft June 21, 2024 06:43
@nilscognite nilscognite changed the title react-components(feat): Undo in actitecture + implemented it in cropping, slicing, measurment etc feat) react-components): Undo in architecture + implemented it in cropping, slicing, measurement etc Jun 21, 2024
@nilscognite nilscognite marked this pull request as ready for review June 24, 2024 07:51
@nilscognite nilscognite changed the title feat) react-components): Undo in architecture + implemented it in cropping, slicing, measurement etc feat (react-components): Undo in architecture + implemented it in cropping, slicing, measurement etc Jun 24, 2024
@nilscognite nilscognite changed the title feat (react-components): Undo in architecture + implemented it in cropping, slicing, measurement etc feat(react-components): Undo in architecture + implemented it in cropping, slicing, measurement etc Jun 24, 2024
@greenbech
Copy link
Contributor

greenbech commented Jun 25, 2024

@nilscognite

Really nice to see these features coming in 🚀

Some feature requests from me:

  1. Can you add support for CMD for Macs? I guess it's fine to support either cltr or CMD.
  2. Can we have redo too?
  3. I think the styling we use in the Contextualize Editor (which again is taken for Canvas) is pretty nice to show hotkeys. Can we use the same here?
    a. https://github.com/cognitedata/fusion/blob/a4a5469d63a6d48fac84e587ae234dcdd01642c2/apps/3d-management/src/components/ContextualizeThreeDViewer/components/ToolTooltip.tsx#L1
image

@nilscognite nilscognite merged commit da08dd4 into master Jun 26, 2024
14 checks passed
@nilscognite nilscognite deleted the np/undo branch June 26, 2024 10:44
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