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 annotation comment icon drawing #847

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

mvasilak
Copy link
Contributor

Prompted by this forum comment
I tried to make the annotation comment more inline with Z7, by

  • moving it to overlap with the annotation
  • making it 40% transparent

Examples:
Screenshot 2024-02-13 at 09 58 51

Screenshot 2024-02-13 at 09 59 06

We could also update the comment outline image, that is being used as one of the masks, to have thinner lines.

@mvasilak mvasilak self-assigned this Feb 13, 2024
Copy link
Contributor

@michalrentka michalrentka left a comment

Choose a reason for hiding this comment

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

Code-wise it's fine, @dstillman @yexingsha can you say anything to the aesthetic side?

@yexingsha
Copy link

I think we went with 0.5 opacity on desktop, and using a thinner line can definitely help. See zotero/zotero#3640

Also, are both examples using the same opacity? It looks like the blue annotation icon has much darker lines.

@mvasilak mvasilak force-pushed the improve-annotation-comment-icon branch from 9039236 to 409f18e Compare February 14, 2024 15:10
@mvasilak
Copy link
Contributor Author

mvasilak commented Feb 14, 2024

I took some inspiration from the desktop client, and re-implemented the drawing without image masks. We can easily make any further adjustments needed.

Screenshot 2024-02-14 at 17 13 09

The issue with the darker lines for image annotations, compared to highlight ones, remains. It seems there is some difference in the two contexts, but I couldn't find it. @michalrentka any ideas?

@michalrentka
Copy link
Contributor

I took some inspiration from the desktop client, and re-implemented the drawing without image masks. We can easily make any further adjustments needed.

Screenshot 2024-02-14 at 17 13 09 The issue with the darker lines for image annotations, compared to highlight ones, remains. It seems there is some difference in the two contexts, but I couldn't find it. @michalrentka any ideas?

@mvasilak check AnnotationColorGenerator, it's probably due to that.

@mvasilak
Copy link
Contributor Author

Color difference should be fixed.

Screenshot 2024-02-16 at 17 01 45

I will also check how the desktop client draws note annotations and update accordingly.

@mvasilak mvasilak force-pushed the improve-annotation-comment-icon branch from e66313c to 57b8b78 Compare February 19, 2024 08:56
@mvasilak
Copy link
Contributor Author

@michalrentka ready for another look

Note annotations now use the same code to draw a similar icon with different parameters. Of course, due to using the PSPDFKit note annotation, in iOS it is of a fixed size, and it doesn't scale according to zoom level, as in the desktop client.

@mvasilak mvasilak merged commit d47dec5 into zotero:master Feb 19, 2024
1 check passed
@mvasilak mvasilak deleted the improve-annotation-comment-icon branch February 26, 2024 08:56
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.

3 participants