Wp-calypso: Editor: Sticky Button is seemingly hidden

Created on 24 Sep 2017  Â·  27Comments  Â·  Source: Automattic/wp-calypso

Steps to reproduce

  1. Starting at URL: wordpress.com/post/you.wordpress.com/123
  2. Open devtools/elements
  3. Search for editor-sticky
  4. Note that the element is present, but seemingly missing from the UI

What I expected

Expected to see a bookmark icon that, when clicked, toggles the 'sticky' status of my post.

What happened instead

The icon is not visible (to the eye) but is clickable if you click in the right place.

Screenshot / Video

screen shot 2017-09-24 at 05 04 56
screen shot 2017-09-24 at 05 05 16
screen shot 2017-09-24 at 05 05 34

Context / Source

Refactoring the element, I was looking for it in the UI to write a test plan.

Editor [Type] Bug

Most helpful comment

A few options:

  1. Remove the flag icon entirely. It's confusing and it duplicates functionality already available elsewhere.
  2. Make the icon informational only, not clickable in either state. Preserve the current tooltip and maybe add some text about how to change this setting.
  3. Allow clicking the icon. Show an outline of a flag icon when the current post is not sticky, and the current orange flag when it is sticky. Make sure the informational tooltip shows with an appropriate message for each case, and make sure the element is keyboard-focusable and has appropriate styles like cursor: pointer. Consider removing the sticky toggle from "Post settings".

All 27 comments

Someone asking about #779927-zen

Thanks @rantoncuadrado :)

A number of reports are also in this duplicate issue: https://github.com/Automattic/wp-calypso/issues/19575

Influx of reports since yesterday.

What was changed?

@rachelmcr can you confirm that we're talking about not only the orange label but also about the toggle under the Status tab? Support docs were recently updated with this change:

https://en.support.wordpress.com/post-visibility/#sticky-posts

So it looks like we removed the toggle from the Status tab and left only the small orange label / flag.

Ah, I missed the distinction in the other issue about the sidebar toggle also being missing. That is likely new — @spen do you think the missing sidebar toggle could be a side effect of the changes you just made in https://github.com/Automattic/wp-calypso/pull/19294?

Thanks for pointing that out @eduardozulian

My user said the same thing that the sticky toggle is now suddenly gone from the sidebar.

Thanks for bringing this up again @ehti -- we'll take a look ("we" = someone on Delta teams).

I have two new reports of this in the forums:

  1. 883285-f
  2. 883282-f

I believe that these users are still able to access this function through wp-admin, and the issue is only in Calypso. Commenting now to confirm.

The option is actually still there as an invisible flag in Calypso (not under the Status section):


_Link to screencast: http://cld.wthms.co/Hrbp5m_

It looks like this is the intended behavior (since March) from 11ea3f6835f53f6e89c6750a566a12874305c2d2. Discussion here.

The flag gets displayed only when the toggle from the Post Settings is on.

sticky-flag

@michaeldcain The toggle seems to be missing from the post settings.

If it helps:

screen shot 2017-11-08 at 4 23 36 pm

FYI, Looking in to this right now.
At first glance, the render logic is still here.
My instinct is that either some of the utils that you see in the lines above are giving the wrong value (though I'm doubtful of this) or there's some data issue.

I believe this is a regression from the last couple of days in wp-calypso as a branch I had from a couple of days ago still showed it. I can run a git bisect to find the PR that removed this if you like.

Here's what I see in my debugging when looking at the properties that are used in the conditional that renders the component.

The post type is missing - chances are this relates to one of my recent commits 😬
If so it should be a really quick fix.

{
  type: undefined,
  isPostPrivate: false,
  isPasswordProtected: false
}

Thanks Alister, I was just heading back to say the same!
I'll open a quick PR pronto!

A quick fix for the discussed issue open @ #19620

This doesn't close the original issue, though @michaeldcain has cleared that issue up (thanks!).
I would like to quickly discuss that before closing though.

Thanks for finding the original discussion @michaeldcain :)

I've some thoughts on this...
My first thought was that we should make the 'invisible', 'unstickied' icon unclickable.
The problem that leaves is that we're then allowing cases where folks may click the button, not really knowing what it does but then have no obvious way to re-sticky it. Perhaps this person wasn't the same person who stickied it in the first place.
My second thought was that we could then make it purely a visual aid by removing any ability to toggle with this button.

cc/ @shaunandrews have you any opinions on this?

A few options:

  1. Remove the flag icon entirely. It's confusing and it duplicates functionality already available elsewhere.
  2. Make the icon informational only, not clickable in either state. Preserve the current tooltip and maybe add some text about how to change this setting.
  3. Allow clicking the icon. Show an outline of a flag icon when the current post is not sticky, and the current orange flag when it is sticky. Make sure the informational tooltip shows with an appropriate message for each case, and make sure the element is keyboard-focusable and has appropriate styles like cursor: pointer. Consider removing the sticky toggle from "Post settings".

Allow clicking the icon. Show an outline of a flag icon when the current post is not sticky, and the current orange flag when it is sticky. Make sure the informational tooltip shows with an appropriate message for each case, and make sure the element is keyboard-focusable and has appropriate styles like cursor: pointer.

I like this :)

Consider removing the sticky toggle from "Post settings".

I'd rather see it left in the Post Settings space as well, since people are used to accessing it there. Is it okay to have more than one way to sticky a post?

  1. Make the icon informational only, not clickable in either state. Preserve the current tooltip and maybe add some text about how to change this setting.

I'm personally in favor of this as it doesn't make sense to duplicate the functionality that's already under Post Settings. It just gets confusing.

Either make it informational or remove the flag/icon.

I'd remove the icon — it seems rather worthless in its current state.

If we do end up keeping it, then I'd suggest option #2 from @nylen's comment above.

I am closing this as the classic editor in calypso is being deprecated in favor of the block editor. If needed, please feel free to reopen.

Was this page helpful?
0 / 5 - 0 ratings