Gutenberg: Add word count to post settings

Created on 28 Jun 2017  路  10Comments  路  Source: WordPress/gutenberg

Note: If this already exists elsewhere please close it. I tried to find a duplicate.

Would it be helpful to add word count into the post settings area for the whole document? If that's too much work at this point we can hold off.

word-count

Good First Issue

Most helpful comment

would we want to use some trick to stick the counter at the bottom, in essentially a sidebar footer?

This might work. I think that could be a decent solution.

A few other ideas. I like how Bear Notes has a tooltip popup. It's something to at least consider (in mobile it would open another sidebar):

screen shot 2017-07-03 at 10 24 06 am

But since that could get confusing to have a post settings sidebar with a popup, I'm not sure. Thoughts?

All 10 comments

We can use the word counter module that is currently in core. https://github.com/WordPress/wordpress-develop/blob/master/src/wp-admin/js/word-count.js

I think what might make sense here is a Word Count for each editable text area that is displayed when the edit area is active. Then we can have an overall count based on the word counts for each editor that can be displayed in the same box
active-editor

I think what might make sense here is a Word Count for each editable text area that is displayed when the edit area is active. Then we can have an overall count based on the word counts for each editor that can be displayed in the same box

Do you often want to know the word count for a section of text you're working on? My only concern is I'm not sure if that's helpful. Usually when I'm writing articles I only care about the total word count. Keen on your thoughts. Thanks!

That's a good point @jwold. From a technical standpoint, I think we're going to need to track the count for each text block in order to display the full count but that doesn't mean we need to display the per-instance count. This might become helpful if an editor wants a certain amount of copy in a text block that appears before a more link but that may be the exception rather than the rule.

Added some comments on https://github.com/WordPress/gutenberg/pull/1624#issuecomment-312582131, relevant to this discussion.

Also worth noting, we need a UI for when you have opened all the metaboxes in the sidebar (and probably keep them open, pending #450). In this configuration, would we want to use some trick to stick the counter at the bottom, in essentially a sidebar footer? Then you'd scroll the content between the sidebar header and sidebar footer.

would we want to use some trick to stick the counter at the bottom, in essentially a sidebar footer?

This might work. I think that could be a decent solution.

A few other ideas. I like how Bear Notes has a tooltip popup. It's something to at least consider (in mobile it would open another sidebar):

screen shot 2017-07-03 at 10 24 06 am

But since that could get confusing to have a post settings sidebar with a popup, I'm not sure. Thoughts?

If we have to go with a counter in the main body, I like the dropdown idea from Bear that you screenshotted. Perhaps we could go super minimalist and instead of an icon just have a number. Instead of "123 Words", just "123", and then on click we could expand and show more.

@jasmussen I like that idea. Super simple in main body but popout to show more.

We could pair this with Table of Contents which counts headings alone.

Table of Contents could be moved to show as a popover as well on the main content like @jwold proposal.

Was this page helpful?
0 / 5 - 0 ratings