Skip to content
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

Implement mobile tabbed view for Report Table and Popular Pages Widget. #9765

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

techanvil
Copy link
Collaborator

@techanvil techanvil commented Nov 26, 2024

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

Copy link

github-actions bot commented Nov 26, 2024

Build files for c8b866e are ready:

Copy link

github-actions bot commented Nov 26, 2024

Size Change: +1.27 kB (+0.07%)

Total Size: 1.89 MB

Filename Size Change
./dist/assets/css/googlesitekit-admin-css-********************.min.css 60.8 kB +83 B (+0.14%)
./dist/assets/css/googlesitekit-adminbar-css-********************.min.css 11.8 kB +9 B (+0.08%)
./dist/assets/css/googlesitekit-wp-dashboard-css-********************.min.css 8.23 kB +40 B (+0.49%)
./dist/assets/js/googlesitekit-main-dashboard-********************.js 165 kB +33 B (+0.02%)
./dist/assets/js/googlesitekit-modules-adsense-********************.js 118 kB +209 B (+0.18%)
./dist/assets/js/googlesitekit-modules-analytics-4-********************.js 186 kB +387 B (+0.21%)
./dist/assets/js/googlesitekit-modules-search-console-********************.js 66.2 kB +202 B (+0.31%)
./dist/assets/js/googlesitekit-settings-********************.js 127 kB +29 B (+0.02%)
./dist/assets/js/googlesitekit-widgets-********************.js 98.9 kB +29 B (+0.03%)
./dist/assets/js/googlesitekit-wp-dashboard-********************.js 62.8 kB +254 B (+0.41%)
ℹ️ View Unchanged
Filename Size
./dist/assets/css/googlesitekit-authorize-application-css-********************.min.css 846 B
./dist/assets/js/32-********************.js 2.76 kB
./dist/assets/js/33-********************.js 2.25 kB
./dist/assets/js/34-********************.js 3.64 kB
./dist/assets/js/35-********************.js 936 B
./dist/assets/js/36-********************.js 892 B
./dist/assets/js/37-********************.js 1.61 kB
./dist/assets/js/38-********************.js 1.57 kB
./dist/assets/js/39-********************.js 1.61 kB
./dist/assets/js/40-********************.js 1.59 kB
./dist/assets/js/41-********************.js 1.83 kB
./dist/assets/js/42-********************.js 3.12 kB
./dist/assets/js/analytics-advanced-tracking-********************.js 901 B
./dist/assets/js/googlesitekit-activation-********************.js 24 kB
./dist/assets/js/googlesitekit-ad-blocking-recovery-********************.js 54.8 kB
./dist/assets/js/googlesitekit-adminbar-********************.js 34.6 kB
./dist/assets/js/googlesitekit-api-********************.js 10.1 kB
./dist/assets/js/googlesitekit-components-gm2-********************.js 6.18 kB
./dist/assets/js/googlesitekit-components-gm3-********************.js 10.1 kB
./dist/assets/js/googlesitekit-consent-mode-********************.js 25.6 kB
./dist/assets/js/googlesitekit-data-********************.js 2.37 kB
./dist/assets/js/googlesitekit-datastore-forms-********************.js 8.94 kB
./dist/assets/js/googlesitekit-datastore-location-********************.js 2.09 kB
./dist/assets/js/googlesitekit-datastore-site-********************.js 20.9 kB
./dist/assets/js/googlesitekit-datastore-ui-********************.js 10 kB
./dist/assets/js/googlesitekit-datastore-user-********************.js 27.5 kB
./dist/assets/js/googlesitekit-entity-dashboard-********************.js 82.1 kB
./dist/assets/js/googlesitekit-events-provider-contact-form-7-********************.js 646 B
./dist/assets/js/googlesitekit-events-provider-easy-digital-downloads-********************.js 624 B
./dist/assets/js/googlesitekit-events-provider-mailchimp-********************.js 630 B
./dist/assets/js/googlesitekit-events-provider-ninja-forms-********************.js 712 B
./dist/assets/js/googlesitekit-events-provider-optin-monster-********************.js 675 B
./dist/assets/js/googlesitekit-events-provider-popup-maker-********************.js 634 B
./dist/assets/js/googlesitekit-events-provider-woocommerce-********************.js 657 B
./dist/assets/js/googlesitekit-events-provider-wpforms-********************.js 633 B
./dist/assets/js/googlesitekit-i18n-********************.js 3.93 kB
./dist/assets/js/googlesitekit-modules-********************.js 22.2 kB
./dist/assets/js/googlesitekit-modules-ads-********************.js 33.6 kB
./dist/assets/js/googlesitekit-modules-pagespeed-insights-********************.js 22.6 kB
./dist/assets/js/googlesitekit-modules-reader-revenue-manager-********************.js 41.1 kB
./dist/assets/js/googlesitekit-modules-sign-in-with-google-********************.js 26.3 kB
./dist/assets/js/googlesitekit-modules-tagmanager-********************.js 32.1 kB
./dist/assets/js/googlesitekit-notifications-********************.js 22.8 kB
./dist/assets/js/googlesitekit-polyfills-********************.js 377 B
./dist/assets/js/googlesitekit-splash-********************.js 69 kB
./dist/assets/js/googlesitekit-user-input-********************.js 44 kB
./dist/assets/js/googlesitekit-vendor-********************.js 322 kB
./dist/assets/js/runtime-********************.js 1.39 kB

compressed-size-action

@@ -31,29 +31,17 @@
border-radius: $br-sm;

.googlesitekit-widget-audience-tiles__tabs {
border-bottom: 1px solid $c-utility-divider;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tabs in the new design use the same styling as the Audience Tiles widget's tabs, so the common style has been extracted for reuse in the googlesitekit-tab-bar--start-aligned-high-contrast class below.

@@ -52,174 +59,221 @@ export default function ReportTable( props ) {
'limit must be an integer, if provided.'
);

const mobileColumns = columns.filter( ( col ) => ! col.hideOnMobile );
function isHiddenOnMobile( hideOnMobile ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hideOnMobile column flag is not relevant for the tabbed layout.

In fact, the ModulePopularPagesWidgetGA4 widget was the only widget making use of the hideOnMobile flag so we could go one further and completely strip it out of this component.

If so, I'd suggest we do so in a followup issue rather than this one which has hit the estimate in execution.

@@ -49,6 +49,7 @@ export default function DetailsPermaLinks( { title, path, serviceURL } ) {
return (
<Fragment>
<Link
className="googlesitekit-font-weight-medium"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone ahead and set the medium font weight here so it's applied to the desktop viewport and WP dashboard "top content" widget as well, as per this Slack thread, as I think it's most likely that we'll go ahead with this approach.

If it turns out we decide not to, it will be quick to amend in a followup issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: This approach has now been agreed.

export const ReportTableBasic = Template.bind( {} );
ReportTableBasic.storyName = 'Basic';
ReportTableBasic.args = createBasicArgs();
ReportTableBasic.scenario = {};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't make sense to add a VRT scenario for the ReportTableTabbedLayout story without adding one for the basic version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant