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

Improve bookmark controls #31806

Merged
merged 3 commits into from
Feb 6, 2025
Merged

Improve bookmark controls #31806

merged 3 commits into from
Feb 6, 2025

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Feb 5, 2025

  • Bookmark menu items get disabled when they would do nothing.
  • Bookmark deletion only deletes the closest bookmark instead of all of them within the proximity of 2 seconds to current clock time. Action is only however enabled within 2 seconds of a bookmark.
  • Fixed a bug wherein undoing break operations could break seeking between bookmarks.

Reproduction steps on master for the aforementioned bug:

  • open map with bookmark
  • delete the first bookmark
  • undo the deletion of the first bookmark
  • seek to previous bookmark will now always seek to the first bookmark rather than closest preceding regardless of current clock time

Additionally, bookmark logic was moved out of Editor because it's a huge class and I dislike huge classes if they can be at all avoided and in this instance they can. Not sure if you'll like that, can move back if that is preferred.

bdach added 2 commits February 5, 2025 15:28
- Bookmark menu items get disabled when they would do nothing.
- Bookmark deletion only deletes the closest bookmark instead of all of
  them within the proximity of 2 seconds to current clock time. Action
  is only however *enabled* within 2 seconds of a bookmark.

Additionally, logic was moved out of `Editor` because it's a huge class
and I dislike huge classes if they can be at all avoided.
Found in testing of previous commit. This would break seeking between
bookmarks.

Reproduction steps on `master`:

- open map with bookmark
- delete the first bookmark
- undo the deletion of the first bookmark
- seek to previous bookmark will now always seek to the first bookmark
  rather than closest preceding regardless of current clock time
@bdach bdach requested a review from peppy February 5, 2025 14:36
@bdach bdach self-assigned this Feb 5, 2025
@peppy
Copy link
Member

peppy commented Feb 6, 2025

Additionally, bookmark logic was moved out of Editor because it's a huge class and I dislike huge classes if they can be at all avoided and in this instance they can. Not sure if you'll like that, can move back if that is preferred.

Glad you did this, as I was going to mention it in the last PR.

@peppy
Copy link
Member

peppy commented Feb 6, 2025

This seems fine. Next up for bookmarks is going to be display in the timeline (probably as diamonds to give them a distinguishing visual separation) and some kind of feedback when adding / removing I guess.

@peppy peppy merged commit dd53ae0 into ppy:master Feb 6, 2025
8 of 10 checks passed
@peppy
Copy link
Member

peppy commented Feb 6, 2025

Disclosure: pushed d9b370e to master because I forgot to push here before merging.

@bdach bdach deleted the bookmark-follow-ups branch February 6, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing bookmarks is too extreme
2 participants