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

Navigation Menu Item: fix showing input placeholder #18374

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

retrofox
Copy link
Contributor

@retrofox retrofox commented Nov 7, 2019

Description

It fixes the visual issue which happens when the input is selected but not focused not showing the Add Item... placeholder.

Fixes #18368

How has this been tested?

  1. Apply these changes
  2. Create / Edit a new item. Just be sure the item content is empty.
  3. If the input is focused confirm you see the caret and be able to type
  4. If not focused, you should see the Add item... placeholder. For this, open the LinkControl popover, for instance.

Screenshots

item-text-placeholder

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.

it fixes the visual issue which happens when the input is selected but not focused, showing the `Add Item...` placeholder.
min-width: 20px;
}

.block-editor-rich-text__editable.is-selected:not(.keep-placeholder-on-focus):not(:focus) [data-rich-text-placeholder]::after {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is quite the selector!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proud to got it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing? I don't see any difference when I remove this rule. It sounds like something should be fixed for rich text instead of in the block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems to be correct, @ellatrix. The component has been developing constantly lately, and I think it's why these changes don't impact its behavior currently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed it in #19822.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, @ellatrix, it seems that we've introduced a regression.

no-cartet-issue

When the user tries to set the link text, it doesn't show the caret.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, I see it:

Screenshot 2020-01-23 at 17 44 41

Is it caused by this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. :-D

Fixed here: #20075

@retrofox retrofox merged commit f4cbd5f into master Nov 7, 2019
Navigation editor automation moved this from 👀 PRs to review to ✅ Done Nov 7, 2019
@retrofox retrofox deleted the update/navigation-menu-item-input-placeholder branch November 7, 2019 22:45
@youknowriad youknowriad added this to the Gutenberg 6.9 milestone Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

NavigationMenuItem: Set placeholder when creating a new item.
4 participants