-
Notifications
You must be signed in to change notification settings - Fork 293
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
Add entity context component to render in the header's “extra content area” when on the Entity Dashboard #4146
Comments
Looks good; I made a tweak to one of the strings to ensure it's localised properly. Also, the first reference to mobile CSS said to show the labels only on mobile, but later said to hide the "Back to Dashboard" label on mobile. The latter is correct (and what's in the Figma mockups), so I assume the first was just a typo and I changed it 🙂 IB ✅ |
A few questions here @tofumatt (with draft PR in #4384)
After resolving the above, I'll need some CSS assistance, as it currently looks like: |
Indeed, looks like that's gone. It would be good to have that as a visually hidden bit of text for the "back" arrow link (to the left of
The approach there separates the string which can cause issues for some translations. I didn't mention it in the IB Review but we use site-kit-wp/assets/js/components/OptIn.js Line 96 in d4bcbfc
Verifying the story is probably fine, but those are set when the Let me know if that answers anything or if I should clarify something further 👍🏻 |
Thanks for the update @tofumatt I've changed to use createInterpolateElement in 506357c and also changed the For QA, that scenario you linked won't suffice, as with a permaLink property we still don't have a
|
@tofumatt @ivankruchkoff Just FYI, the "Return to dashboard" label is visible only on large screens and not on small screens: |
@tofumatt over to you for CR. We didn't have a subHeader prop set on the I added 3e473ca to render the same as: site-kit-wp/assets/js/components/DashboardMainApp.js Lines 49 to 53 in 3e473ca
|
QA Update:
|
|
QA Update: ✅
Desktop Mobile |
Feature Description
There should be info about an entity when on the Entity Dashboard.
The full version (when the page has no yet scrolled) should look like this:
It should be inserted into the header "content" area created in #4050.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
EntityHeaderBanner
should be implemented, containing the title and URL of the current entity.null
.EntityHeaderBanner
within the overallHeader
as well.Implementation Brief
assets/js/components/EntityHeaderBanner.js
which exports theEntityHeaderBanner
functional component.VIEW_CONTEXT_DASHBOARD
. If the context isn'tVIEW_CONTEXT_DASHBOARD
, the component shouldreturn null
'Detailed page stats for: "$page_title"'
should usesprintf( __( '<strong>Detailed page stats for:</strong> "%s"' ), pageTitle )
to ensure the entire string is properly localised.$bp-tablet
breakpoint). But ensure that the text is placed off-screen and not set todisplay: none
on mobile viewports, so the text is still shown to assistive technologies like screenreaders.getCurrentEntityURL
getCurrentEntityTitle
EntityHeaderBanner
within the container where thesubHeader
prop is displayed.EntityHeaderBanner
.Test Coverage
QA Brief
Open the storybook story and confirm that it matches the figma designs (in AC):
https://google.github.io/site-kit-wp/storybook/develop/?path=/story/components-header--header-with-sub-header-entity-banner
Enable
unifiedDashboard
Open:
/wp-admin/admin.php?page=googlesitekit-dashboard¬ification=authentication_success&permaLink=http%3A%2F%2Fsitekit.10uplabs.com%2Fsample-page%2F
where the permaLink matches a page that exists on your site, you can find a page via:/wp-admin/admin.php?page=googlesitekit-dashboard¬ification=authentication_success
url search in the header component. The notificationnotification=authentication_success
is necessary to render the subHeader.Verify it matches the figma and press the back button to return to dashboard.
Changelog entry
The text was updated successfully, but these errors were encountered: