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

Assembler: Add interaction in the Pages screen #83501

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

taipeicoder
Copy link
Contributor

@taipeicoder taipeicoder commented Oct 26, 2023

Related to https://github.com/Automattic/dotcom-forge/issues/2225

Proposed Changes

This PR introduces the sidebar interaction for the Pages screen.
See the design spec: Tv3pYqA3EcRfiXC31IxrXE-fi-2390%3A25283

Screen.Capture.on.2023-10-26.at.11-47-28.mp4

Tasks for later: API integration to retrieve the list of pages.

Testing Instructions

  • Head to the Assembler with the flag &flags=pattern-assembler/add-pages.
  • Go through the Patterns, and Styles screen until you arrive at the Pages screen.
  • Ensure that the sidebar interaction works as shown above.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • https://wpcalypso.wordpress.com/devdocs/docs/testing/index.md 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-ajp-p2)?

@taipeicoder taipeicoder self-assigned this Oct 26, 2023
@github-actions
Copy link

github-actions bot commented Oct 26, 2023

@matticbot
Copy link
Contributor

matticbot commented Oct 26, 2023

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

Sections (~407 bytes added 📈 [gzipped])

name         parsed_size           gzip_size
import-flow      +1610 B  (+0.0%)     +407 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.

@taipeicoder taipeicoder marked this pull request as ready for review October 26, 2023 04:00
@taipeicoder taipeicoder requested a review from a team October 26, 2023 04: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 Oct 26, 2023
@miksansegundo
Copy link
Contributor

I think the feature flag is not working for me because I don't see the screen when testing on Calypso live: https://container-hopeful-nash.calypso.live/setup/site-setup/patternAssembler?siteSlug=test19519.wordpress.com&siteId=225125315&flags=pattern-assember%2Fadd-pages

Can you enable the flag in Calypso?

"pattern-assembler/add-pages": false,

@taipeicoder
Copy link
Contributor Author

taipeicoder commented Oct 26, 2023

I think the feature flag is not working for me because I don't see the screen when testing on Calypso live: https://container-hopeful-nash.calypso.live/setup/site-setup/patternAssembler?siteSlug=test19519.wordpress.com&siteId=225125315&flags=pattern-assember%2Fadd-pages

Can you enable the flag in Calypso?

"pattern-assembler/add-pages": false,

Oops, I had a typo in the description it should be
https://container-hopeful-nash.calypso.live/setup/site-setup/patternAssembler?siteSlug=test19519.wordpress.com&siteId=225125315&flags=pattern-assembler%2Fadd-pages

instead of
https://container-hopeful-nash.calypso.live/setup/site-setup/patternAssembler?siteSlug=test19519.wordpress.com&siteId=225125315&flags=pattern-assember%2Fadd-pages!

There was a l missing.

Copy link
Contributor

@miksansegundo miksansegundo left a comment

Choose a reason for hiding this comment

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

The code and functionality are looking good to me 👍

The selected pages are persisted in the URL.

Screen.Recording.2566-10-26.at.12.08.39.mov

Not related to this PR, I'm wondering if we should do something different for existing sites because when they come from the Theme showcase their site can already have these pages. Are we going to replace them or create new ones? cc: @fushar

@taipeicoder taipeicoder merged commit 755b993 into trunk Oct 26, 2023
5 checks passed
@taipeicoder taipeicoder deleted the add/pattern-assembler-screen-pages-selection-ui branch October 26, 2023 05:57
@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 26, 2023
@taipeicoder
Copy link
Contributor Author

Not related to this PR, I'm wondering if we should do something different for existing sites because when they come from the Theme showcase their site can already have these pages. Are we going to replace them or create new ones? cc: @fushar

Great question! I just assumed that we would add those pages and draft existing ones 🤔
Worth discussing with the team @Automattic/lego @autumnfjeld @lucasmendes-design

@fushar
Copy link
Contributor

fushar commented Oct 26, 2023

Not related to this PR, I'm wondering if we should do something different for existing sites because when they come from the Theme showcase their site can already have these pages. Are we going to replace them or create new ones? cc: @fushar

Good question. I'd just add the pages without worrying about the existing ones. There could be duplicates as a result -- but I think it's clear from the flow, and it's up to the users to choose which pages to keep or trash. 😄

{ /* eslint-disable wpcalypso/jsx-gridicon-size */ }
<Gridicon icon="checkmark" size={ 10 } />
</FlexItem>
<FlexItem className="page-list-item__label">{ label }</FlexItem>
Copy link
Contributor

Choose a reason for hiding this comment

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

Just realized that we have to translate the label.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forgot to mention that this is only "placeholder" UI 😅
We'll have a better handling of data once we integrate the UI with the API!

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, cool, we can use the pattern or category name because they should be already translated.

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.

4 participants