text icon indicating copy to clipboard operation
text copied to clipboard

Line length toggle follow ups

Open juliusknorr opened this issue 1 year ago • 1 comments

Follow up from https://github.com/nextcloud/text/pull/6569

  • [ ] Hide the toggle for line length in collectives as it has its own option
  • [ ] Discuss if moving the toggle to the action menu makes sense
    • Feedback from @jancborchardt

      I would expect a setting like this to be in the collapsed part of the toolbar along with these other more info/settings like items, as the "people" menu is more focused on collaboration and sharing. (Also, this setting is disabled by default, right?) Image

juliusknorr avatar Nov 27 '24 07:11 juliusknorr

In collectives this is a per page setting. So hiding makes sense to avoid conflicts.

max-nextcloud avatar Mar 03 '25 11:03 max-nextcloud

Tackling the second part in #7514.

I'm unsure how best to achieve the hiding in collectives though.

  • We could hide it everywhere where createEditor is used - but that seems too generic.
  • Collectives could specify a parameter to createEditor.
  • Collectives could provide some data that we inject in the Editor that hides the toggle.

Alternatively we could make the toggle work on the collectives per page setting - but I wonder if that would be more confusing or less.

max-nextcloud avatar Aug 03 '25 20:08 max-nextcloud

I'm unsure how best to achieve the hiding in collectives though.

I think we want to further customize the toolbar options in Text via editorApi (createEditor()) in the future, e.g. to add "Link page" as first option in the link submenu and remove/change "Link file".

I'm not sure about the best approach either, but exposing the configurability in the API at editor.js sounds like the right approach to me. Probably for a simple show/hide option, a flag passed to createEditor() is the most straight forward solution? 🤔

mejo- avatar Aug 03 '25 20:08 mejo-

I found a different way (https://github.com/nextcloud/text/pull/7514/commits/f8ee19440106ceb93a4b7efbc0d9e807ffa870d9): Text now detects the width has already been set and does not render the width toggle anymore.

max-nextcloud avatar Aug 06 '25 08:08 max-nextcloud

Very nice! Then I'd say this issue can be closed once #7514 got merged, right?

mejo- avatar Aug 11 '25 10:08 mejo-