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

Changing between highlight and underline annotations #1050

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

michalrentka
Copy link
Contributor

Closes #985

Copy link
Contributor

@mvasilak mvasilak left a comment

Choose a reason for hiding this comment

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

  • Tapping the "Convert to ..." cell, and this changing without actually changing the annotation seems unintuitive. Maybe a cell with 2 radio buttons instead? Or make it an action in the ... menu of the annotation instead of a cell, so it can be executed immediatelly.
  • The colors for the highlight and the underline shouls be adopted for the annotation type. Converting an underline to a highlight results in a slightly darker color.
  • Converting an annotation in the sidebar results in a jumpy animation and closes the reader.

@michalrentka
Copy link
Contributor Author

michalrentka commented Jan 14, 2025

  • Tapping the "Convert to ..." cell, and this changing without actually changing the annotation seems unintuitive. Maybe a cell with 2 radio buttons instead? Or make it an action in the ... menu of the annotation instead of a cell, so it can be executed immediatelly.

Updated based on #zotero discussion, changed to UISegmentedControl as you suggested.

  • The colors for the highlight and the underline shouls be adopted for the annotation type. Converting an underline to a highlight results in a slightly darker color.

I saw this before but I can't reproduce now. Anyway I do update the color of annotation when the type changes, so that shouldn't be the issue.

  • Converting an annotation in the sidebar results in a jumpy animation and closes the reader.

Fixed.

Check 5218305

@michalrentka michalrentka force-pushed the underline_highlight_switch branch from a0c47ee to 06a6b1d Compare January 17, 2025 10:26
@michalrentka michalrentka requested a review from mvasilak January 20, 2025 08:26
Copy link
Contributor

@mvasilak mvasilak left a comment

Choose a reason for hiding this comment

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

Can the cell change be made with a reconfigure instead of deletion and insertion, for a smoother animation?

@michalrentka
Copy link
Contributor Author

Can the cell change be made with a reconfigure instead of deletion and insertion, for a smoother animation?

I tried to mitigate this, but since we're actually deleting one annotation and creating a new one with new key and Realm doesn't provide a good way to simply ignore a specific notification tied to those actions, I don't have a good way to change it.
I could temporarily store the old and new key, wait for those 2 notifications and then just ignore original actions and create a refresh based on that data. But in case something else comes inbetween (it shouldn't, but yeah I wouldn't want to risk it), it'll crash. I'm not sure whether it's worth the work.

@michalrentka michalrentka merged commit 790a8d7 into zotero:master Jan 23, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Allow annotations to be changed between highlights and underlines via sync
2 participants