online icon indicating copy to clipboard operation
online copied to clipboard

Shows calc comment indicatior as a triangle.

Open GulsahKose opened this issue 1 year ago • 1 comments

Comment indicator is changed in core d395b42cdf3ef517d215dee905e5ccf2ae73b2b8 We draw that indicator on online side separately. Now we see the same indicator on online too.

Change-Id: I2c640f4850473724e8a14e75fa7d3c00f76d4e9e

  • Resolves: #7130
  • Target version: master

Summary

TODO

  • [ ] ...

Checklist

  • [ ] I have run make prettier-write and formatted the code.
  • [ ] All commits have Change-Id
  • [ ] I have run tests with make check
  • [ ] I have issued make run and manually verified that everything looks okay
  • [ ] Documentation (manuals or wiki) has been updated or is not required

GulsahKose avatar Oct 17 '24 11:10 GulsahKose

Looks nice, but you need to also take into account zoom level I think: comment-zoom

I inserted comment in view with 100%, then I zoomed in and it is off.

eszkadev avatar Oct 18 '24 07:10 eszkadev

@eszkadev @pedropintosilva Position problem is not related with this pr. I've updated core co-24.04 and online latest master. Without this PR it looks as video: Screencast from 2024-10-24 16-04-29.webm

Maybe we can merge this and fix the regression seperatly?

GulsahKose avatar Oct 24 '24 13:10 GulsahKose

@GulsahKose good catch! but can we try to fix it too? It should be really easy. You do the calculations of the x, y coordinates. It is only required to correctly multiply by the factor based on zoom/dpi.

Some pointers to find numbers: https://github.com/CollaboraOnline/online/blob/master/browser/src/docstate.js#L20 You can look how it is used in other places. In my opinion this issue is serious and very visible.

eszkadev avatar Oct 25 '24 09:10 eszkadev

so it seems Gulsah already tried that but it didn't work, probably because the cell coordinates are already being multiplied and so, I think we shouldn't need to multiple again (? as it seems the triangle is been drawn according to the cell).

@GulsahKose could you please add here your notes? and also your question around outgoing message clientVisibleArea

https://github.com/user-attachments/assets/0362db1f-d24c-486b-a75b-b0493a0fc7b9

pedropintosilva avatar Oct 25 '24 11:10 pedropintosilva

@eszkadev I've tried to multiply with app.dpiScale but didn't fix the problem. Then I realized I'm using cell coordinates that also multiplied with scale. And the triangle is also grown when we zoom.

And found a good case. When we zoom in then scroll the sheet (with mouse wheel) the indicator position is fixed.

When i checked the console I see we sent clientvisiblearea message that contains visible area coordinates, width and height. I think after the zoom, this visible area coordinates is wrong so triangle position is wrong too. When the clientvisiblearea updated with scroll, triangle position is fixed too.

GulsahKose avatar Oct 25 '24 11:10 GulsahKose

Maybe just a "refresh" is needed? @gokaysatir might know

eszkadev avatar Oct 25 '24 12:10 eszkadev

Maybe just a "refresh" is needed? @gokaysatir might know

I am checking the positioning issue now.

gokaysatir avatar Oct 25 '24 12:10 gokaysatir

Pressed retry Cypress (desktop) as the failing test is unrelated "integration_tests/mobile/writer/annotation_spec.js "

pedropintosilva avatar Oct 25 '24 13:10 pedropintosilva

@eszkadev @GulsahKose i think below commit solves the positioning issue:

  • https://github.com/CollaboraOnline/online/pull/10328

gokaysatir avatar Oct 25 '24 13:10 gokaysatir

Pressed the retry button on cypress mobile since writer/annotation_spec.js is unrelated

pedropintosilva avatar Oct 28 '24 09:10 pedropintosilva

There is a typo in the commit message and MR title s/indicatior/indicator

meven avatar Oct 29 '24 09:10 meven

I think we could merge in red window (since it doesn't fix any particular bug) or we could merge this since it seems safe and better than the current situation, what's your opinion @eszkadev

Furthermore, I would like to see the 3 following enhancements/follow ups:

  • The triangle not being drawn on top of the cell border (see the screenshot it is above the right cell border)
  • The right edge of the triangle should have the same length as the top edge of the triangle
  • The color should come from the palette or dark palette css instead (css var)

image

pedropintosilva avatar Oct 29 '24 12:10 pedropintosilva

this seems to be safe @pedropintosilva

eszkadev avatar Oct 30 '24 06:10 eszkadev

There is a typo in the commit message and MR title s/indicatior/indicator

@gokaysatir You only changed the PR title, I am more concerned about the commit message.

meven avatar Oct 30 '24 11:10 meven

There is a typo in the commit message and MR title s/indicatior/indicator

@gokaysatir You only changed the PR title, I am more concerned about the commit message.

Too late to fix now.

meven avatar Oct 30 '24 11:10 meven