zotero / zotero-ios

Zotero for iOS
https://apps.apple.com/us/app/zotero/id1513554812
Other
223 stars 27 forks source link

Allow annotations to be changed between highlights and underlines via sync #985

Open dstillman opened 1 month ago

dstillman commented 1 month ago

See https://github.com/zotero/zotero/issues/3744#issuecomment-2235951805

Any reason this would fail if it came in via a sync? For now we're going to delete and recreate to change between the two types, but we'll want to be able to switch to just changing the annotation type later.

(And once we have underlining merged, we'll want a UI option to change between highlights and underlines, but we can deal with that later. This is just to make sure there are no problems at the data layer.)

michalrentka commented 1 month ago

It shouldn't create any problem in the data layer. Annotation type is just a string, so that's fine. But it'll most likely be a problem when the user has changed document open and the change syncs. Not sure what would happen, most likely the original annotation won't be found in the document because the expected type is different, so nothing would change. So we'll have to handle this edge-case and after that even switching in UI should be as simple as just changing the value.

michalrentka commented 1 week ago

I checked and confirmed, everything works fine, even if the document is opened and the annotation type is changed. @dstillman do we add the option to convert between underline and highlight to iOS too?

dstillman commented 1 week ago

do we add the option to convert between underline and highlight to iOS too?

Sure, but it can be buried in the Edit Annotation pane.