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: Implement the initial product category menu using a standardized side-scrolling behavior. #98153

Merged
merged 6 commits into from
Jan 13, 2025

Conversation

jkguidaven
Copy link
Contributor

@jkguidaven jkguidaven commented Jan 9, 2025

This PR introduces a working carousel menu on the new Products page. Just so you know, the menu items are placeholders and will be replaced with actual items in a separate PR.

We want this PR to focus exclusively on the Carousel element and the scroll-down behavior.

Screen.Recording.2025-01-09.at.11.18.23.PM.mov

Depends on #98086
Related to https://github.com/Automattic/automattic-for-agencies-dev/issues/1636

Proposed Changes

  • Standardize side-scrolling behavior in A4A using a Carousel component. This new component will be reused later for other side-scrolling use cases in the A4A context.
  • Implement the product category menu on the new products page using the carousel component. For now, we will use placeholder items, which we will replace later with actual menu items in a separate PR.

Why are these changes being made?

  • This is part of the Marketplace UX improvement project.

Testing Instructions

  • Use the A4A live link and go to the /marketplace/products?flags=a4a-product-page-redesign.
  • Test out the Product category menu carousel and scroll down behavior.

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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 Jan 9, 2025
@jkguidaven jkguidaven force-pushed the add/a4a/product-page-redesign-feature-flag branch from 0a8a0ab to f544d16 Compare January 9, 2025 14:52
@jkguidaven jkguidaven force-pushed the add/a4a/product-category-menu branch from 91c559f to 63cb8cb Compare January 9, 2025 14:52
@matticbot
Copy link
Contributor

matticbot commented Jan 9, 2025

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

Sections (~436 bytes added 📈 [gzipped])

name                          parsed_size           gzip_size
a8c-for-agencies-marketplace      +1831 B  (+0.2%)     +436 B  (+0.2%)

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.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/a4a/product-category-menu on your sandbox.

@jkguidaven jkguidaven requested a review from a team January 9, 2025 15:22
@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 Jan 9, 2025
@jkguidaven jkguidaven marked this pull request as ready for review January 9, 2025 15:23
@jkguidaven jkguidaven changed the title A4A: Add product category menu. A4A: Implement initial product category menu using a standardized side-scrolling behavior. Jan 9, 2025
@jkguidaven jkguidaven changed the title A4A: Implement initial product category menu using a standardized side-scrolling behavior. A4A: Implement the initial product category menu using a standardized side-scrolling behavior. Jan 9, 2025
@jkguidaven jkguidaven requested a review from madebynoam January 9, 2025 15:24
@jkguidaven jkguidaven force-pushed the add/a4a/product-page-redesign-feature-flag branch from f544d16 to 5dc0d70 Compare January 10, 2025 12:21
@jkguidaven jkguidaven force-pushed the add/a4a/product-category-menu branch from 421fe7b to 375334b Compare January 10, 2025 12:23
Copy link
Contributor

@travisw travisw left a comment

Choose a reason for hiding this comment

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

pretty neat - lgtm 🚀

<Icon icon={ chevronRight } size={ 20 } />
</Button>
</div>
<div
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be cool to allow the content to be scrolled by swiping on mobile screens. Just an idea for later.

Copy link
Contributor Author

@jkguidaven jkguidaven Jan 13, 2025

Choose a reason for hiding this comment

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

That is good suggestion. I'll add a low-prio ticket to address this. 👍

@jkguidaven jkguidaven force-pushed the add/a4a/product-page-redesign-feature-flag branch from 5dc0d70 to 92cc682 Compare January 13, 2025 08:52
Base automatically changed from add/a4a/product-page-redesign-feature-flag to trunk January 13, 2025 09:15
@jkguidaven jkguidaven force-pushed the add/a4a/product-category-menu branch from 37d4f5e to 0b51b3c Compare January 13, 2025 09:21
@jkguidaven jkguidaven merged commit a2f9821 into trunk Jan 13, 2025
11 checks passed
@jkguidaven jkguidaven deleted the add/a4a/product-category-menu branch January 13, 2025 09:43
@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 Jan 13, 2025
@a8ci18n
Copy link

a8ci18n commented Jan 13, 2025

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17193310

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Hi @jkguidaven, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • Shop by category
  • Shop products by category

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Jan 19, 2025

Translation for this Pull Request has now been finished.

@jeffgolenski
Copy link
Member

Looks great James

@madebynoam
Copy link

@jkguidaven looking good! Just leaving a note for the details to tweak (transition timing) later on:
#98214 (comment)

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.

6 participants