-
Notifications
You must be signed in to change notification settings - Fork 278
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
Page <title>
is incomplete on user input screen
#6668
Comments
#5998 is related to this. |
A simple solution could be using a non-existent parent slug for the hidden menu items, e.g. Example: if ( Feature_Flags::enabled( 'userInput' ) ) {
$screens[] = new Screen(
self::PREFIX . 'user-input',
array(
'title' => __( 'User Input', 'google-site-kit' ),
'capability' => Permissions::MANAGE_OPTIONS,
'parent_slug' => Screen::MENU_SLUG . '_hidden',
'enqueue_callback' => function( Assets $assets ) {
$assets->enqueue_asset( 'googlesitekit-user-input' );
},
'render_callback' => function( Context $context ) {
?>
<div id="js-googlesitekit-user-input" class="googlesitekit-page"></div>
<?php
},
)
);
} (draft IB added) @aaemnnosttv Any thoughts? |
The estimate looks a bit high at first glance but guessing that's more/less entirely for test coverage which should be more than enough. Thanks for the elegant solution here @nfmohit 👍 IB ✅ |
Bug Description
The page title tag does not display properly on the user input screen. This is due to the screen not having a parent page in the admin menu.
Steps to reproduce
Screenshots
Dashboard
User Input
Additional Context
This was actually raised a very long time ago in v1 in #2883 but it got missed and forgotten about because the feature was stalled.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
<title>
element on the User Input screen should use the same format as all other Site Kit screens (i.e. if the User Input page was called "Dashboard", it should produce a page title that matches the main SK dashboard)Implementation Brief
includes/Core/Admin/Screens.php
:get_screens()
method so that thegooglesitekit-user-input
Screen
entry to the returned array has a non-existentparent_slug
in its arguments, e.g.googlesitekit_hidden
.Test Coverage
<title>
tag).QA Brief
Using the latest version of the plugin build form the main branch, perform the following steps:
userInput
feature flag. This can be done via theTester Settings
sub menu item of Google Site Kit when the tester plugin is enabled.<your testing URL>/wp-admin/admin.php?page=googlesitekit-user-input
where<your testing URL>
is the URL of whatever local or remote instance you are testing on.<title>
element for the page. This can be done via visual inspection on the browser tab, or (ideally) via the developer tools console underelements
. It should no longer contain an empty element, and should be of the following pattern:Site Kit by Google User Input ‹ sitekit.10uplabs.com — WordPress
, although your testing instance will likely replacesitekit.10uplabs.com
with your testing domain or site name if changed.The important validate is that the title is no longer broken in the sense that the first set of wording before the first
‹
was previously blank. Using the example steps above, in this case the old title element would have been as follows:But following the fix is now the following:
Changelog entry
The text was updated successfully, but these errors were encountered: