Open
Description
openedon Sep 11, 2023
Bug Description
Analytics most popular pages widget is not properly appearing on viewport having width between 599px to 668px.
Steps to reproduce
- Set up site kit with Analytics.
- Go to main dashboard.
- Set viewport between 599px to 668px using dev tool.
- See issue.
Screenshots
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- For the Top content over 28 days table, on mobile viewports where the table headings start to overlap with each other, the table should be converted to a two column layout with tabs that as per this Figma mock.
Implementation Brief
Report Table Tabbed View
- Update
assets/js/components/ReportTable.js
- Add a new boolean prop
tabbedLayout
, if this prop is true, render the following alternate component structure:- Use the
TabBar
andTab
components to render a new tab bar above the report table, mapping over thecolumns
props to get the tab titles and keys. - Store the currently selected tab in component state.
- Update the table to render only the column selected in the active tab.
- Use the
- Add a new boolean prop
- Update
assets/sass/components/global/_googlesitekit-table.scss
, matching the Figma mock for this tabbed version of the report table.
Most Popular Pages module
- Update
assets/js/modules/analytics-4/components/module/ModulePopularPagesWidgetGA4/index.js
:- Use the
useBreakpoint
hook to get the current breakpoint. - Pass the true to the
tabbedLayout
prop of the ReportTable in this component if the breakpoint isBREAKPOINT_TABLET
orBREAKPOINT_MOBILE
.
- Use the
Test Coverage
- In
assets/js/components/ReportTable.stories.js
, create a new VRT for the tabbed version of this component. - Confirm there are no regressions to other key widgets that share this component.
QA Brief
Changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment