Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISNBAT add a Carousel block caption immediately after selecting the block #1149

Closed
Tracked by #2077
richtabor opened this issue Nov 21, 2019 · 7 comments
Closed
Tracked by #2077
Labels
Good First Issue A great place to start if you're new to contributing [Priority] Low This issue/pull request is not immediate [Type] Bug Something that is not working as expected

Comments

@richtabor
Copy link
Contributor

richtabor commented Nov 21, 2019

Describe the bug
To follow core'sGallery block UX, the caption should only be focused when I am attempting to add a caption.

Currently the caption is focused as soon as the block is selected. This pulls my attention from the primary purpose of this block, and causes the caption's inline toolbar controls to interfere with the upload appender (which is the primary interaction at this point).

To Reproduce
Steps to reproduce the behavior:

  1. Add a Carousel block
  2. Add images to the placeholder component
  3. See error

Screenshot: Comparison of the Carousel and core Gallery blocks
ScreenFlow

Expected behavior
The caption RichText componet is focused only when I click to type in the field.

Isolating the problem:

  • This bug happens with no other plugins activated
  • This bug happens with a default WordPress theme active
  • This bug happens without the Gutenberg plugin active
  • I can reproduce this bug consistently using the steps above
@richtabor richtabor added [Type] Bug Something that is not working as expected [Block] Carousel Gallery labels Nov 21, 2019
@AnthonyLedesma
Copy link
Member

Duplicate of #1010

@AnthonyLedesma AnthonyLedesma marked this as a duplicate of #1010 Nov 21, 2019
@richtabor
Copy link
Contributor Author

Bah, I reported that one too ha

@richtabor
Copy link
Contributor Author

The Gallery block achieves it now though - is that something we can look into emulating @AnthonyLedesma?

@jrtashjian
Copy link
Member

This is still a valid issue. Looks like we're handling the caption's focus with state. This method seems to be unnecessary and is overly complex. I would say that's a good place to start.

@jrtashjian jrtashjian added the Good First Issue A great place to start if you're new to contributing label Dec 15, 2020
@AnthonyLedesma AnthonyLedesma self-assigned this Dec 15, 2020
@ehamwey
Copy link
Contributor

ehamwey commented Jun 21, 2021

This is resolved in WordPress 5.8. Will close in a bit of time if there are no concerns here.

@ehamwey
Copy link
Contributor

ehamwey commented Jun 21, 2021

Note from @AnthonyLedesma: Logic exists within the Carousel block to direct focus away from/to the captions. We should probably beware of this logic so we can remove it if no longer relevant for 5.8.

@AnthonyLedesma AnthonyLedesma removed their assignment Oct 12, 2021
@AnthonyLedesma
Copy link
Member

May not be relevant anymore but we should double-check with the refactor. Closing now to link back from refactor issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue A great place to start if you're new to contributing [Priority] Low This issue/pull request is not immediate [Type] Bug Something that is not working as expected
Projects
None yet
Development

No branches or pull requests

4 participants