-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Basic comparison grid component #88045
Basic comparison grid component #88045
Conversation
The only existing comparison grid components we have currently are heavily tied to the plans page. This adds a basic component that's more generic. (Currently only tested with 2 columns)
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
packages/components/src/standalone-comparison-grid/index.stories.jsx
Outdated
Show resolved
Hide resolved
@markbiek I liked to see the component on the storybook, it helped me a lot to see the component usage. 👍 . |
@andres-blanco You may already be thinking about this but the HTML markup changes you suggested will probably make it way easier to support lots of columns and work on mobile. It might be worth adding new storybook stories for different numbers of columns. @gabrielcaires Is there a way to simulate a mobile view in a story? |
I've pushed changes that should support multiple columns and basic stacking on mobile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/components/src/standalone-comparison-grid/index.stories.jsx
Outdated
Show resolved
Hide resolved
|
||
const GridVariations = () => ( | ||
<> | ||
<StandaloneComparisonGrid> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need the prefix Standalone and it making hard to read
Maybe we can use just:
ComparisonGrid
Column << imported from the same package module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that there is an existing ComparisonGrid
component that's specific to the plans page. I wanted something to make it clear that this was a generic, general purpose component.
But I am super open to naming suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left the StandAlone prefix but renamed the columns to Column
. I felt as mark regarding avoiding confusion with the older ComparisonGrid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this open either way if you feel like we should still drop / replace the prefix
Co-authored-by: Gabriel Caires <[email protected]>
Co-authored-by: Gabriel Caires <[email protected]>
Co-authored-by: Gabriel Caires <[email protected]>
Co-authored-by: Gabriel Caires <[email protected]>
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
LGTM! I can't officially approve it since I opened the PR. But everything looks great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a starting point! 👍
Folks, are we still planning to use this component? It's been a year, and it's still unused. In case we mean to use it, should it really be in In case we don't want to use it, I'm happy to clean it up. |
Here's a PR to clean it up: #99490 |
The only existing comparison grid components we have currently are heavily tied to the plans page. This adds a basic component that's more generic. (Currently only tested with 2 columns)
Related to #87905
Proposed Changes
For the new Site Migration flow, we have a step which will show the benefits of migrating over importing and we need some basic UI for it. I envisioned a comparison grid like the Plans pages. Unfortunately, all of the existing components are heavily tied to the Plans page.
This adds a new component to display a more generic comparison grid.
The goal here is to get some feedback about the component itself and any tweaks we might need to make. For the first iteration, we're only going to worry about having 2 columns. We'll mobile styles next (in a separate PR) and then larger numbers of columns.
![image](https://private-user-images.githubusercontent.com/375980/309320512-33afb52a-697c-4eb1-bffb-ae44c0566865.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzcwMzMsIm5iZiI6MTczOTM3NjczMywicGF0aCI6Ii8zNzU5ODAvMzA5MzIwNTEyLTMzYWZiNTJhLTY5N2MtNGViMS1iZmZiLWFlNDRjMDU2Njg2NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxNjEyMTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNTQ3NDYwNDVkMzA1YTEyNjk0NzczZTcwZDk0YjM1ZmZhOGYxZTlmM2QxY2Q0ZWUyYTllODIzZjA1MjMzZWVjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Ko3A-W_xdb6IaIcKrfEhMHybu1nTqUZFNcGrCploUK0)
Testing Instructions
yarn run storybook:start
.Pre-merge Checklist