Repository navigation
Premium Analytics: remove the page descriptions and the section header date subtitle - #51707
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Premium Analytics plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Nikschavan
left a comment
There was a problem hiding this comment.
Thank you, the changes look good. I left one question inline about the chart interval.
| subtitle={ sectionSubtitle } | ||
| condenseOnScroll | ||
| > | ||
| <SectionHeader title={ resolveSectionHeading( section ) } condenseOnScroll> |
There was a problem hiding this comment.
With the subtitle gone, the active bucket is no longer readable without opening the interval menu: the trigger is a glyph and its accessible name is the fixed Chart interval (date-interval-dropdown.tsx#L66). WOOA7S-2024 and WOOA7S-2028 cover the period and the comparison tooltips, but neither names the interval. Is there a ticket for it, or would folding the current value into the trigger label cover it for now?
There was a problem hiding this comment.
No ticket covers it. Going through the WOOA7S-1793 children: 2024 is the period tooltip, 2028 the comparison one, and 2026 is what moved the interval behind the button in the first place. None of them names the active bucket.
The design does treat the interval as secondary on purpose: the 26 August recap asks it to "always default to a recommended option based on the selected range, only needed if users want to adjust it", and that default already ships. getAllowedIntervalsByRange() returns the buckets a range allows, default first, and several ranges allow exactly one, so there the control has nothing to choose.
What is not intentional is the asymmetry you are pointing at: the period and the comparison each get their exact value on a tooltip, and the interval gets nothing. So yes, folding the value into the trigger label covers it. IconButton's label renders both as the tooltip and as the accessible name, so Chart interval: Days gives the interval the same hover surface its two siblings get, with no text back on the face.
I'll do it in #51708, which already rewrites that trigger onto the design system Menu and renames the buckets to Days / Weeks / Months, which composes better into that string. Keeping it out of this PR so the two don't collide.
…ics-page-descriptions
…ics-page-descriptions
Code Coverage SummaryCoverage changed in 6 files. Only the first 5 are listed here.
|
Fixes WOOA7S-2027
Proposed changes
This removes them from the three places they rendered, along with the plumbing that only existed to carry them.
subTitleeach page passed toReportPageShell, and thegetDescriptionentries in the report registry, which nothing read.descriptionrendered as thePagesubtitle above the tab bar. The field comes out of the section registration, theDashboard_Sectionmodel, the REST schema and theDashboardSectiontype, so a section can no longer register one. The distinct section title (Site trafficfor theTraffictab) stays.Tuesday, July 21 – Monday, July 27 (7 days, daily) vs. …). The recap moves the exact range to a tooltip on the date controls, so the header keeps the title and the controls only, andgetSectionSubtitlegoes with it.condenseOnScrollstill steps the title down a size once the header pins; there is no row left to collapse.This undoes the description half of #51092 and the subtitle from #50897.
formatDateRangeLongandgetDateRangeSpanstay in@jetpack-premium-analytics/formattersfor the tooltips WOOA7S-2024 and WOOA7S-2028 add.Until those tooltips land, the compared period is readable only by its preset name on the comparison control, and the active chart interval only from the interval menu.
Screenshots
Dashboard, Traffic tab:
Reports page:
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jetpack build --deps packages/premium-analytics.admin.php?page=jetpack-premium-analytics-wp-admin). Under theStatspage title there is no description on any tab. Each section header shows its title and the date controls, with no date range line under the title, and still condenses into the compact bar as you scroll.All pages,Emails,Videos,Tags & categories,All comments,Annual insights). The page header has no description under the breadcrumbs, and the section header carries the title and the range picker only.GET /wp-json/wpcom/v2/dashboards/analytics/sectionsreturns nodescriptionkey on any section.Packages/Premium Analytics/UI/SectionHeaderrenders every story without a subtitle, andPackages/Premium Analytics/Routes/Dashboard/SectionsGridshows no page description.