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

Modify components empty state #47487

Merged
merged 12 commits into from
May 21, 2024
Merged

Conversation

octaedro
Copy link
Contributor

@octaedro octaedro commented May 14, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR creates an EmptyState component for multiple uses. This abstraction was meant to be used under the Variations, Attributes, and Custom Fields sections.

Screenshot 2024-05-15 at 1 40 13 PM

Closes #47293.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Make sure the New product editor is enabled under /wp-admin/admin.php?page=wc-settings&tab=advanced&section=features.
  2. Go to Products > Organization.
  3. The Attributes section should show the empty state

Screenshot 2024-05-15 at 1 50 14 PM

  1. Press the Show custom fields toggle.
  2. The empty state for the Custom fields should be visible.

Screenshot 2024-05-15 at 1 40 13 PM

  1. Go to the Variations tab.
  2. The empty state for the Variations should be visible as well.

Screenshot 2024-05-15 at 1 49 24 PM

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@octaedro octaedro self-assigned this May 14, 2024
@octaedro octaedro added focus: new product ux revamped product management experience team: Mothra labels May 14, 2024
@octaedro octaedro changed the title Dev/47293 modify attributes empty state Modify Attributes empty state May 14, 2024
@octaedro octaedro changed the title Modify Attributes empty state Modify components empty state May 15, 2024
Copy link
Contributor

github-actions bot commented May 15, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

Comment on lines +25 to +29
{ name === '' ? (
<div className="woocommerce-product-empty-state__name" />
) : (
<div>{ name }</div>
) }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To make this more defensive, when the name is an empty string we use a grey block.

@octaedro octaedro requested a review from a team May 15, 2024 16:58
@octaedro octaedro marked this pull request as ready for review May 15, 2024 16:58
Copy link
Contributor

github-actions bot commented May 15, 2024

Hi @louwie17, @woocommerce/mothra

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@louwie17 louwie17 self-requested a review May 21, 2024 12:03
Copy link
Contributor

@louwie17 louwie17 left a comment

Choose a reason for hiding this comment

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

Tested well and code looks good, nice work @octaedro

@octaedro octaedro merged commit bf7204f into trunk May 21, 2024
26 checks passed
@octaedro octaedro deleted the dev/47293_modify_attributes_empty_state branch May 21, 2024 13:07
@github-actions github-actions bot added this to the 9.0.0 milestone May 21, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label May 21, 2024
@rodelgc rodelgc added status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels May 22, 2024
@rodelgc rodelgc added the needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: new product ux revamped product management experience needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris team: Mothra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Modify Attributes empty state
3 participants