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

Add Undo/Redo support in the viewer #7546

Merged
merged 21 commits into from
Dec 2, 2024
Merged

Add Undo/Redo support in the viewer #7546

merged 21 commits into from
Dec 2, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Sep 29, 2024

What

This PR implements Undo and Redo for any edit to the active blueprint.

undo.mp4

Implementation

This implements undo/redo by editing the "time cursor" for the blueprint timeline. Undo moves it backwards, redo forwards. When doing an action, all redo history is erased from the store with a new ChunkStore::drop_time_range function.

Known shortcomings

  • Undo doesn't work when the blueprint streams panel is open

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@emilk emilk added enhancement New feature or request 📺 re_viewer affects re_viewer itself include in changelog labels Sep 29, 2024
@emilk emilk mentioned this pull request Oct 6, 2024
6 tasks
@emilk emilk added the blocked can't make progress right now label Oct 6, 2024
@emilk emilk force-pushed the emilk/undo branch 2 times, most recently from d4b0b9c to 644c87c Compare October 6, 2024 15:19
teh-cmc added a commit that referenced this pull request Oct 7, 2024
### What
Adds `ChunkStore::drop_time_range` to drop all events within some time
range. Will be used to implement undo.

* Part of #3135
* Extracted from #7546

---------

Co-authored-by: Clement Rey <[email protected]>
@emilk emilk removed the blocked can't make progress right now label Oct 7, 2024
@emilk emilk force-pushed the emilk/undo branch 5 times, most recently from 5b9aa8d to e4dbc86 Compare November 8, 2024 15:49
@emilk
Copy link
Member Author

emilk commented Nov 11, 2024

This is blocked by:

Copy link

github-actions bot commented Nov 28, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link
2e6be76 https://rerun.io/viewer/pr/7546

Note: This comment is updated whenever you push a commit.

@emilk emilk marked this pull request as ready for review November 29, 2024 09:26
@emilk emilk removed the blocked can't make progress right now label Nov 29, 2024
@teh-cmc teh-cmc self-requested a review December 2, 2024 09:17
crates/viewer/re_viewport_blueprint/src/container.rs Outdated Show resolved Hide resolved
crates/viewer/re_viewport_blueprint/src/space_view.rs Outdated Show resolved Hide resolved
crates/viewer/re_viewer/src/app_state.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit c9a1e42 into main Dec 2, 2024
31 checks passed
@emilk emilk deleted the emilk/undo branch December 2, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request include in changelog 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undo (and redo) in viewer
2 participants