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

A4A: Fix inconsistency with header spacing. #94992

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

jkguidaven
Copy link
Contributor

@jkguidaven jkguidaven commented Sep 27, 2024

This pull request standardizes the spacing in the A4A header layout. We have a couple of pages with different spacing, causing our page content to shift a lot. Example is the Overview page.

Before After
Screenshot 2024-09-27 at 9 57 10 PM Screenshot 2024-09-27 at 9 57 16 PM

Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/805

Proposed Changes

  • Remove the 'compact' layout variant, which has different spacing, and force all layout consumers to use the same spacing. We follow a 24px spacing for both the top and bottom.
  • Remove some ad-hoc on some of the pages to force some consistency. We no longer need it as we are standardizing it from the core layout.

Why are these changes being made?

  • Make our UI more polished, which results in a better user experience.

Testing Instructions

  • Use the A4A live link and verify all headers have consistent spacing.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@jkguidaven jkguidaven self-assigned this Sep 27, 2024
title,
wide,
withBorder,
compact,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that we are standardizing the spacing for all our headers, there is no longer a need for the compact variant in our layout.

Comment on lines +224 to +226
/* FIXME: This is a temporary fix to make the referral
* layout columns the same height
*/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lint is complaining about the maximum line length. I have to split it. though not related to the main goal of the PR

@jkguidaven jkguidaven requested a review from a team September 27, 2024 14:00
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 27, 2024
@jkguidaven jkguidaven marked this pull request as ready for review September 27, 2024 14:00
@matticbot
Copy link
Contributor

matticbot commented Sep 27, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~23 bytes removed 📉 [gzipped])

name                                parsed_size           gzip_size
a8c-for-agencies-marketplace              -94 B  (-0.0%)       -9 B  (-0.0%)
a8c-for-agencies-team                     -69 B  (-0.0%)       -5 B  (-0.0%)
a8c-for-agencies-client                   -36 B  (-0.0%)       -8 B  (-0.0%)
staging-site                              -25 B  (-0.0%)       -4 B  (-0.0%)
sites-dashboard                           -25 B  (-0.0%)       -4 B  (-0.0%)
site-performance                          -25 B  (-0.0%)       -4 B  (-0.0%)
site-monitoring                           -25 B  (-0.0%)       -4 B  (-0.0%)
site-logs                                 -25 B  (-0.0%)       -4 B  (-0.0%)
plugins                                   -25 B  (-0.0%)       -4 B  (-0.0%)
jetpack-cloud-plugin-management           -25 B  (-0.0%)       -4 B  (-0.0%)
hosting-features                          -25 B  (-0.0%)       -4 B  (-0.0%)
hosting                                   -25 B  (-0.0%)       -4 B  (-0.0%)
github-deployments                        -25 B  (-0.0%)       -4 B  (-0.0%)
a8c-for-agencies-sites                    -25 B  (-0.0%)       -3 B  (-0.0%)
a8c-for-agencies-settings                 -25 B  (-0.0%)       -3 B  (-0.0%)
a8c-for-agencies-referrals                -25 B  (-0.0%)       -3 B  (-0.0%)
a8c-for-agencies-plugins                  -25 B  (-0.0%)       -3 B  (-0.0%)
a8c-for-agencies-partner-directory        -25 B  (-0.0%)       -3 B  (-0.0%)
a8c-for-agencies-overview                 -25 B  (-0.0%)       -3 B  (-0.0%)
a8c-for-agencies-migrations               -25 B  (-0.0%)       -3 B  (-0.0%)
a8c-for-agencies-landing                  -25 B  (-0.0%)       -3 B  (-0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@cleacos cleacos left a comment

Choose a reason for hiding this comment

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

Now, all the header sections are consistent.

As Tiago already said, in the Overview section, the content top padding seems small.

Other than that LGTM!

@jkguidaven jkguidaven force-pushed the fix/a4a/inconsistent-header-spacing branch from a0aa6bd to 0cadafb Compare October 1, 2024 05:29
@jkguidaven
Copy link
Contributor Author

Now, all the header sections are consistent.

As Tiago already said, in the Overview section, the content top padding seems small.

Other than that LGTM!

Thanks. The Overview section top padding has been fixed along with other pages.

@jkguidaven jkguidaven force-pushed the fix/a4a/inconsistent-header-spacing branch from 0cadafb to 5ed6a6a Compare October 1, 2024 06:51
@jkguidaven jkguidaven merged commit 60916f1 into trunk Oct 1, 2024
11 checks passed
@jkguidaven jkguidaven deleted the fix/a4a/inconsistent-header-spacing branch October 1, 2024 07:08
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants