See screenshot:
@ramonjd could Ganon tackle this while working on editor improvements?
@ramonjd could Ganon tackle this while working on editor improvements?
Yep, I think it's suited to an ad hoc, small task. @roo2 if you get time on Monday could you change the aria-label
on that element. Should be able to do it somewhere in the button override file
hmmm this one is a little bit funny...
The button label is set in gutenberg to the label for the "View Items" action for the current page type. https://github.com/WordPress/gutenberg/blob/master/packages/edit-post/src/components/header/fullscreen-mode-close/index.js#L39
The translation for view_items
comes from the wpcom page types API /wp/v2/types
Hmm so if this button is a home page button everywhere that Gutenberg is used, then we could make a gutenberg bug to just change it to say "Home"...
We also have an existing hook in the FSE plugin where we -mess around with- customize the header, including setting the click handler for that button. But as I understand it the FSE plugin is only enabled at all for FSE stickered sites so maybe we should find another place to change it? 馃
Anyway, I'll take another look tomorrow! 馃檹
But as I understand it the FSE plugin is only enabled at all for FSE stickered sites so maybe we should find another place to change it
Ah, thanks for looking!
Hmm so if this button is a home page button everywhere that Gutenberg is used, then we could make a gutenberg bug to just change it to say "Home"...
Hmmm, not sure since that button, at least in the plugin itself, is to exit fullscreen mode
Maybe another "override" in https://github.com/Automattic/wp-calypso/tree/master/apps/wpcom-block-editor/src/default/features ?
hmm it looks like my approach in #42869 is not going to work for this bug.
The button uses a @wordpress/components
tooltip
, which we cannot access via our jquery hacks ( because it is not rendered onto the page until the user mouses over the close button ).
I think to solve this problem elegantly we would have to add an API to gutenberg with arguments for the "Close button"'s label and href.
This will also allow us to get rid of our hacks between calypso and the gutenberg-block-editor
app which override the onclick behavior.
Also, @p-jackson pointed out, the close button's behavior and label change depend on how you enetered the editor: https://github.com/Automattic/wp-calypso/pull/42869#issuecomment-637267030
hmm we could also hide the gutenberg close button and add our own like the full site editing plugin does https://github.com/Automattic/wp-calypso/tree/master/apps/full-site-editing/full-site-editing-plugin/wpcom-block-editor-nav-sidebar/src/wpcom-block-editor-nav-sidebar.tsx
@roo2 There's a maintenance task to switch to the official "override the (W) button" API once it's available after shipping GB 8.2. I think this will give us the power we need to fix the button url and tooltip without any hacks.
The nav sidebar will eventually use this official API too.
Yeah, I think it's best we wait for the override to get rid of hacks and have correct tooltip.
This was fixed by #43313