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

fix: wp icon focus issue #62675

Merged
merged 6 commits into from
Jul 17, 2024
Merged

fix: wp icon focus issue #62675

merged 6 commits into from
Jul 17, 2024

Conversation

up1512001
Copy link
Contributor

@up1512001 up1512001 commented Jun 19, 2024

Fixes #62672

What?

  • fix the focus issue with the wp icon in the editor.

Why?

#62672

How?

  • moved the focus from before to the a tag itself.

Screenshots or screencast

Screen.Recording.2024-06-19.at.15.56.08.mov
Copy link

github-actions bot commented Jun 19, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: up1512001 <up1512001@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: bgardner <bgardner@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@akasunil akasunil added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Regression Related to a regression in the latest release labels Jun 19, 2024
@bgardner
Copy link

Confirming this works as expected!

@talldan
Copy link
Contributor

talldan commented Jun 24, 2024

@up1512001 Thanks for another contribution! Something that's helpful when creating PRs is to type 'Fixes #62672' in the PR description, that links the PR to the issue it solves, sets it in progress and will automatically close the issue when the PR's merged:
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

I've gone ahead and added it to this PR's description.

@talldan talldan requested a review from youknowriad June 24, 2024 07:31
@talldan
Copy link
Contributor

talldan commented Jun 24, 2024

It does look better than trunk:
Screenshot 2024-06-24 at 3 19 09 pm

But the focus style in this PR still looks too thin compared to a normal focus style:
Screenshot 2024-06-24 at 3 18 12 pm

I think because of the css scale that's applied to the anchor element as mentioned in the issue.

Maybe the scale implemented here:

Could be implemented on a div around the <SiteIcon> instead? Or applied tothe SiteIcon itself. I imagine there's also a transition style somewhere that would have to be updated too.

I've added @youknowriad as a reviewer, as the change seems to have come from #61579.

@afercia
Copy link
Contributor

afercia commented Jun 24, 2024

It does look better than trunk:

Yes it deoes look better but i'm not sure it fully solves the issue. Ideally, the focus style should be the same blue outline used for all buttons.

I believe this issue comes from #61579 Cc @youknowriad
While I understand the need for simplification on that PR, the CSS 'scale' should not be applied to the button itself because it impacts also the focus style. That said, I would eveb be in favor of entirely removing the animation because I'm not sure it adds great value. Also, as mentioned in that PR the view-transition CSS API is only fully supported in Chrome and I'm not sure WordPress should use unsupported features not even as progressive ehnancement.

@youknowriad
Copy link
Contributor

Can we try to check that this doesn't impact the focus styles ... on the full screen editor. These styles might be shared between both and the expectations different. So I just want to make sure we don't regress elsewhere.

@up1512001
Copy link
Contributor Author

I have updated the shadow and it's looking like this please let me know if it's ok.
cc: @youknowriad @afercia

Screen.Recording.2024-06-24.at.22.31.35.mov
@youknowriad youknowriad added the Needs Design Feedback Needs general design feedback. label Jun 25, 2024
@youknowriad
Copy link
Contributor

youknowriad commented Jun 25, 2024

Screenshot 2024-06-25 at 10 39 01 AM

The focus styles in the full editor looks broken to me. (See top left)

@afercia
Copy link
Contributor

afercia commented Jul 1, 2024

It is worth reminding that the whole mechanism of the WP logo / site icon is being discussed in #57813.

To me, the current implementation especially in the Site Editor is unnecessarily complicated and it's mainly done this way only to add an animation that doesn't add great value. Also, as mentioned in #57813, when a site icon is set, this link is used to 'preview' the site icon which, in my opinion, is just confusing. Given the complexity of this implementation, even a simple thing like making sure there is correct focus style becomes complicated. I'd rather see a drastic simplification:

  • remove the animaiton
  • remove the site icon preview
@up1512001
Copy link
Contributor Author

The focus styles in the full editor looks broken to me. (See top left)

@youknowriad I have added Fix for this can you please verify it?

@youknowriad
Copy link
Contributor

Maybe I'm not testing properly but I think the focus style is meant to be like that in the editor

Screenshot 2024-07-15 at 10 20 21 AM

In my testing, the blue outline is not visible at the moment in editor mode.

@up1512001
Copy link
Contributor Author

up1512001 commented Jul 16, 2024

@youknowriad This is how it's looking now.

Screen.Recording.2024-07-16.at.22.35.05.mov
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM

I'd appreciate a second review. cc @jameskoster @jasmussen

@jasmussen
Copy link
Contributor

Seems to fix the regression 👍 👍

@talldan talldan added Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release and removed Needs Design Feedback Needs general design feedback. labels Jul 17, 2024
@talldan talldan merged commit 47b68f6 into WordPress:trunk Jul 17, 2024
64 checks passed
@github-actions github-actions bot added this to the Gutenberg 18.9 milestone Jul 17, 2024
@ellatrix
Copy link
Member

@talldan is this really important to land in a minor release?

@talldan
Copy link
Contributor

talldan commented Jul 18, 2024

@ellatrix I agree it is minor, but also seems low risk and affects quite a prominent part of the site editor.

I don't really mind, feel free to remove the label.

@ellatrix
Copy link
Member

It's fine to leave it there's high confidence.

@ellatrix ellatrix added the Backport to WP 6.6 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jul 18, 2024
ellatrix pushed a commit that referenced this pull request Jul 18, 2024
* fix: wp icon focus issue

* update: shadow and added focus visible

* Fix: editor focus style issue

* Fix: svg dimentions & padding issue

* Fix: border radius issue on editor focus

----

Co-authored-by: up1512001 <up1512001@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: bgardner <bgardner@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
@ellatrix
Copy link
Member

Manually backported in 9c34196

@ellatrix ellatrix added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP 6.6 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release labels Jul 18, 2024
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Jul 18, 2024
Bugfixes included:

* [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors].
* [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule].
* [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied].
* [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present].
* [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border].
* [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes].
* [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present].
* [WordPress/gutenberg#62675 fix: wp icon focus issue].
* [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element].

Props ellatrix.
Fixes #61692.
See #61660, #61630, #61656.

git-svn-id: https://develop.svn.wordpress.org/trunk@58757 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jul 18, 2024
Bugfixes included:

* [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors].
* [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule].
* [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied].
* [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present].
* [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border].
* [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes].
* [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present].
* [WordPress/gutenberg#62675 fix: wp icon focus issue].
* [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element].

Props ellatrix.
Fixes #61692.
See #61660, #61630, #61656.
Built from https://develop.svn.wordpress.org/trunk@58757


git-svn-id: http://core.svn.wordpress.org/trunk@58159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to gilzow/wordpress-performance that referenced this pull request Jul 18, 2024
Bugfixes included:

* [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors].
* [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule].
* [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied].
* [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present].
* [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border].
* [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes].
* [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present].
* [WordPress/gutenberg#62675 fix: wp icon focus issue].
* [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element].

Props ellatrix.
Fixes #61692.
See #61660, #61630, #61656.
Built from https://develop.svn.wordpress.org/trunk@58757


git-svn-id: https://core.svn.wordpress.org/trunk@58159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Jul 18, 2024
Bugfixes included:

* [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors].
* [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule].
* [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied].
* [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present].
* [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border].
* [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes].
* [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present].
* [WordPress/gutenberg#62675 fix: wp icon focus issue].
* [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element].

Reviewed by spacedmonkey.
Merges [58757] to the 6.6 branch.

Props ellatrix.
Fixes #61692.
See #61660, #61630, #61656.

git-svn-id: https://develop.svn.wordpress.org/branches/6.6@58760 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jul 18, 2024
Bugfixes included:

* [WordPress/gutenberg#63637 Elements: Avoid specificity bump for top-level element-only selectors].
* [WordPress/gutenberg#63406 Navigation block: Allow themes to override block library text-decoration rule].
* [WordPress/gutenberg#63436 Fix invalid css for nested fullwidth layouts with zero padding applied].
* [WordPress/gutenberg#63397 Prevent empty void at the bottom of editor when block directory results are present].
* [WordPress/gutenberg#63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border].
* [WordPress/gutenberg#63562 Global Styles: Disable "Reset styles" button when there are no changes].
* [WordPress/gutenberg#63093 Fix: Removed shuffle button when only 1 pattern is present].
* [WordPress/gutenberg#62675 fix: wp icon focus issue].
* [WordPress/gutenberg#63565 useBlockElement: return null until ref callback has time to clean up the old element].

Reviewed by spacedmonkey.
Merges [58757] to the 6.6 branch.

Props ellatrix.
Fixes #61692.
See #61660, #61630, #61656.
Built from https://develop.svn.wordpress.org/branches/6.6@58760


git-svn-id: http://core.svn.wordpress.org/branches/6.6@58162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Jul 18, 2024
* fix: wp icon focus issue

* update: shadow and added focus visible

* Fix: editor focus style issue

* Fix: svg dimentions & padding issue

* Fix: border radius issue on editor focus

----

Co-authored-by: up1512001 <up1512001@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: bgardner <bgardner@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Regression Related to a regression in the latest release
8 participants