text icon indicating copy to clipboard operation
text copied to clipboard

fix(files): Disable suggestions bar output for not rich workspace

Open JuliaKirschenheuter opened this issue 2 months ago • 10 comments

📝 Summary

  • Resolves: https://github.com/nextcloud/text/issues/7874

🖼️ Screenshots

🏚️ Before 🏡 After
image image

JuliaKirschenheuter avatar Oct 30 '25 18:10 JuliaKirschenheuter

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests.

:loudspeaker: Thoughts on this report? Let us know!

codecov[bot] avatar Oct 30 '25 18:10 codecov[bot]

@marcoambrosini I know we removed the placeholder text, but now nothing is indicating to the user that they can click in there and type something if it is empty and not in focus.

juliusknorr avatar Oct 31 '25 11:10 juliusknorr

@juliusknorr what about re-introducing the placeholder? Why was it taken out? If accessibility is the concern, I think we could solve it by having an action that focuses the textarea within the new menu. It could read: "Add folder description"

marcoambrosini avatar Oct 31 '25 11:10 marcoambrosini

@juliusknorr what about re-introducing the placeholder? Why was it taken out? If accessibility is the concern, I think we could solve it by having an action that focuses the textarea within the new menu. It could read: "Add folder description"

It was removed in https://github.com/nextcloud/text/pull/6855 when the smart picker button was added to the side. I also think we should bring it back, not only in empty rich workspace documents, but in general.

mejo- avatar Nov 01 '25 19:11 mejo-

Why was it taken out?

  • It seemed redundant to write... "Type / to add" when there's a plus button right next to it.
  • Not everyone can mention people (I think it's not possible on public shares). So the "@ to mention" part would have needed to become context dependent.
  • The placeholder we used did not just show on an empty document but also in empty lines, which seemed broken to me as placeholders usually go away when something is typed into the textfield and do not show again on new emtpy lines.

max-nextcloud avatar Nov 02 '25 19:11 max-nextcloud

@max-nextcloud to address those points:

  1. I think It's still nice a nice invitation and it inform users about the existence of the keyboard shortcut
  2. We can skip the @ mention part
  3. This is just a bug that can be fixed

marcoambrosini avatar Nov 05 '25 10:11 marcoambrosini

Sounds good to me. I wonder if it might be easier to use the approach of the suggestion bar of checking for an empty editor for the placeholder as well. Previously we used the tiptap placeholder extension if i remember correctly. Fixing that seems more involved.

max-nextcloud avatar Nov 05 '25 19:11 max-nextcloud

https://tiptap.dev/docs/editor/extensions/functionality/placeholder Does behave as I would expect to only render if the document is fully empty by using css rules as in the example

 /* Placeholder (at the top) */
  p.is-editor-empty:first-child::before {
    color: var(--gray-4);
    content: attr(data-placeholder);
    float: left;
    height: 0;
    pointer-events: none;
  }

juliusknorr avatar Nov 05 '25 21:11 juliusknorr

I checked Notion and Coda, they both show the placeholder on each new paragraph. I wonder why we would want it only on empty files, but don't have strong feelings about it.

@JuliaKirschenheuter, do you plan to bring back the placeholder as part of this PR? Or would you prefer if someone else takes over? I could do so if you like.

mejo- avatar Nov 24 '25 13:11 mejo-

I wonder why we would want it only on empty files

I think it's fine to show the placeholder text on each new line (not the suggestion bar though)

marcoambrosini avatar Dec 08 '25 14:12 marcoambrosini

/backport to stable32

mejo- avatar Dec 17 '25 08:12 mejo-

Let's bring this in. I opened https://github.com/nextcloud/text/pull/8075 for bringing back the placeholder.

mejo- avatar Dec 17 '25 08:12 mejo-