text icon indicating copy to clipboard operation
text copied to clipboard

Fix/toc without transaction

Open max-nextcloud opened this issue 1 year ago • 7 comments

📝 Summary

  • Resolves: #5861

🚧 TODO

  • [x] implement click function
  • [x] sync plugin state to vuex
  • [x] cleanup file structure

🏁 Checklist

  • [x] Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • [x] Sign-off message is added to all commits
  • [x] Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • [x] Documentation (README or documentation) has been updated or is not required

max-nextcloud avatar Jun 12 '24 08:06 max-nextcloud

Very nice, unfortunately this does not seem to fix the initial update step stent for read only sessions.

juliusknorr avatar Jun 13 '24 05:06 juliusknorr

Also happens without headings for files that have not been opened by a write session before:

Screenshot 2024-06-13 at 07 25 53

juliusknorr avatar Jun 13 '24 05:06 juliusknorr

Additional backend attempt at https://github.com/nextcloud/text/pull/5895

juliusknorr avatar Jun 13 '24 05:06 juliusknorr

Very nice, unfortunately this does not seem to fix the initial update step stent for read only sessions.

Yes... that's exactly what I wondered this morning - whether the toc transaction was really the cause.

Thanks for coming up with the backend fix. I'll take a look at it.

max-nextcloud avatar Jun 13 '24 05:06 max-nextcloud

Since this does not fix the 403s fully, there's no rush to get it into todays RC anymore.

I'll fix the tests and see if it fixes https://github.com/nextcloud/collectives/issues/1114 .

max-nextcloud avatar Jun 13 '24 06:06 max-nextcloud

I fixed quite a few of the cypress tests and the failing ones are also failing for me locally.

One major issue remains though. When typing at the beginning of the heading nothing happens. I suspect this is due to the slightly different markup: previously: grafik now: grafik (or without the span when the renderHTML function is left untouched.)

It's fairly hard to bring back the anchor in front of the span inside the heading tag.

max-nextcloud avatar Jun 17 '24 13:06 max-nextcloud

One major issue remains though. When typing at the beginning of the heading nothing happens. I suspect this is due to the slightly different markup:

I figured it out. By default decorations are put behind the cursor in the given position. Adding a { side: -1 } fixed that and now the cursor is between the anchor and the first letter of the heading and typing works just fine.

max-nextcloud avatar Jun 18 '24 07:06 max-nextcloud

/backport to stable29

mejo- avatar Jul 25 '24 11:07 mejo-

/backport to stable28

mejo- avatar Jul 25 '24 11:07 mejo-