Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Jul 1, 2022

Summary

Show word count as last element of the overflow menu,
which now will be always shown. The word count
is updated when the menu is openend as the
tiptap word count is not reactive.

Modified ActionList: Added a named slot for adding
elements that should always shown as the last elements.


What should be mentioned: This solution refreshes on menu open, but it is also possible to refresh it on content change.
So the current solution do not introduce many unneeded calculations, but (and I am not sure if this is even possible) does not update the label if typing while the menu is open.

susnux added 2 commits July 2, 2022 09:56
Show word count as last element of the overflow menu,
which now will be always shown. The word count
is updated when the menu is openend as the
tiptap word count is not reactive.

Modified ActionList: Added a named slot for adding
elements that should always shown as the last elements.

Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
@juliusknorr
Copy link
Member

juliusknorr commented Jul 4, 2022

I'm a bit hesitant to add even more to the menu, especially on mobile. Also it is not fully related to the other actions which are more formatting actions that are targeting the current position/selection. To me it would be more suitable on the right hand side. Maybe we need to adapt the "collaborator" menu a bit to cover more details about the document in general.

For reference this is how it currently looks:
Screenshot 2022-07-04 at 14 09 37

Screenshot 2022-07-04 at 14 07 58

@jancborchardt What do you think?

Dropbox Paper for example also has a separate context menu for the document itself:
Screenshot 2022-07-04 at 14 10 37

@susnux
Copy link
Contributor Author

susnux commented Jul 4, 2022

I moved the PR, so the assets can be compiled (and the node CI test succeeds), as suggested here #2628 (comment)

@susnux susnux closed this Jul 4, 2022
@susnux susnux deleted the feature/word-count branch July 4, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Word Count

2 participants