nextcloud / text

📑 Collaborative document editing using Markdown
GNU Affero General Public License v3.0
552 stars 91 forks source link

No way to undo headline formating #5217

Closed schiessle closed 1 week ago

schiessle commented 10 months ago

If you write a text with some headlines and later want to revert a headline to normal text there is no way beside deleting the line and write it again.

All other formatting options can be undo by clicking it again (bold, italic, bullet points,...). For headlines I only have the option to chose another headline level but not to go back to "normal text":

image

juliusknorr commented 10 months ago

You can untoggle the heading by just selecting the same heading level from the menu. We used to have a button to reset to paragraph but that was removed during a design review iirc.

cc @nextcloud/designers

marcoambrosini commented 10 months ago

I think something akin to "paragraph" should definitely be in that menu, along with all other text styles such as quote, code block, etc.
This would:

ref (notion): Screenshot from 2024-01-10 13-31-11

juliusknorr commented 10 months ago

The problem is that the trigger button for the menu currently indicates the state of the current cursor. If we add more entries to that and still use that indication the headline actions would be too hidden i think.

marcoambrosini commented 10 months ago

What about adding a label like Notion so that it's clearer that text styles and other blocks are underneath that menu? I think there would be a lot to gain from this simplification. Especially given the current amount of unlabeled buttons.

juliusknorr commented 10 months ago

I think this is something where some mockups could help to visualize how that could fit in the current UI. Especially on mobile we are quite limited on how much space we have there.

juliusknorr commented 10 months ago

Also https://github.com/nextcloud/text/issues/2836 might have a few points to consider when thinking about redesigning the menu bar.

szaimen commented 10 months ago

So in my opinion actually the chosen Headline should be selected so that if you click on it, it gets unselected, something like this:

H2 selected No headline selected
image image

Then you can disable the heading by simply clicking on it. WDYT @marcoambrosini @juliushaertl ? :)

marcoambrosini commented 10 months ago

@szaimen as a quick fix, yes that would work. But I'd still think that it would be nicer to have a text "styles" menu.

ckoegler commented 1 week ago

There still seems to be a problem.

If I format a paragraph to a H1 I cannot undo it via Ctrl+Z. In contrast, it works for other formattings (e.g. from plain text do bold)

Should I file a separate issue?

mejo- commented 1 week ago

If I format a paragraph to a H1 I cannot undo it via Ctrl+Z.

Dear @ckoegler, thanks for the report. Which Nextcloud version do you run? I'm unable to reproduce your problem. Given that it's not related to the topic discussed here, please open a new issue about it.

mejo- commented 1 week ago

Let's close this issue for now, as we have clear indicators nowadays that show the enabled headline formatting with a checkmark.