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

Add Launch Your Store settings section #45402

Merged
merged 17 commits into from Mar 8, 2024

Conversation

moon0326
Copy link
Contributor

@moon0326 moon0326 commented Mar 7, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes #45107

This PR adds a new setting section for Launch Your Store site visibility under WooCommerce -> Settings -> General.

Things to do -- these items can be updated in a separate PR once the values and requirements are ready.

  1. Add store pages link.
  2. Add Editor link
  3. Add Share your site with a private link feature.

Screen Shot 2024-03-07 at 1 18 56 PM

How to test the changes in this Pull Request:

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

  1. Checkout this branch and enable launch-your-store feature flag.
  2. Go to WooCommerce -> Settings
  3. Confirm Site visibility section loads.
  4. Change values and click on Save changes button.
  5. Confirm the changes persist.

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

Add Launch Your Store settings section

Comment

@moon0326 moon0326 requested review from a team, adrianduffell and rjchow March 7, 2024 21:17
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 7, 2024
Copy link
Contributor

github-actions bot commented Mar 7, 2024

Hi @adrianduffell, @rjchow, @woocommerce/ghidorah

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

Copy link
Contributor

github-actions bot commented Mar 7, 2024

Test Results Summary

Commit SHA: 438d631

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests332001903517m 49s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

Copy link
Contributor

@psealock psealock left a comment

Choose a reason for hiding this comment

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

Thanks @moon0326 this is looking good.

There should be some consensus on the names of the options created here and the ones @chihsuan is creating in #45306. I like a combination of the two such as woocommerce_lys_coming_soon.

I'm also working on a UI component that makes use of these options and thought a useLaunchYourStore helper function would be useful. What do you think?

https://github.com/woocommerce/woocommerce/blob/7a988796839ca0fc7f6e3e0ce54ebec1ae810ab7/plugins/woocommerce-admin/client/header/launch-your-store/use-launch-your-store.js

I've got it in the header but its better suited to the folders you created here, plugins/woocommerce-admin/client/launch-your-store.

{
id: 'wc_settings_general_site_visibility_slotfill',
scope: 'woocommerce-site-visibility-settings',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to see this getting used!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice! useLaunchYourStore looks fantastic! I'll update this PR to use it 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@psealock Could you also return comingSoon, storePagesOnly, privateLink, and shareKey from the function?

@adrianduffell
Copy link
Contributor

Nice work on this @moon0326, I agree I think we just need to align on the names.

There should be some consensus on the names of the options created here and the ones @chihsuan is creating in #45306. I like a combination of the two such as woocommerce_lys_coming_soon.

I'll throw in a suggestion for:

  • woocommerce_coming_soon
  • woocommerce_coming_soon_store_pages_only
  • woocommerce_coming_soon_private_link

I think it might be better not to reference "Launch Your Store" in the option names. I see the site visibility / coming soon settings as a new platform feature for WooCommerce. The Launch Your Store task is just one feature that will utilize it. Potentially other features like CYS could make use of it in the future too.

@moon0326
Copy link
Contributor Author

moon0326 commented Mar 8, 2024

@psealock @adrianduffell Updated option names in 48fdf30

@psealock I think we can update the code to use useLaunchYourStore in a follow-up PR. What do you think?

Copy link
Contributor

@adrianduffell adrianduffell left a comment

Choose a reason for hiding this comment

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

Thanks @moon0326, this is great! With the updated option names it LGTM 🚀

I'll create new issues for the items you mentioned in the description.

  • Add store pages link.
  • Add Editor link
  • Add Share your site with a private link feature.

Copy link
Contributor

@psealock psealock left a comment

Choose a reason for hiding this comment

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

@psealock I think we can update the code to use useLaunchYourStore in a follow-up PR. What do you think?

Sounds good. Once this is merged I can move my compenent to the folder

@@ -18,6 +18,10 @@ export const possiblyRenderSettingsSlots = () => {
},
{ id: 'wc_tax_settings_slotfill', scope: 'woocommerce-tax-settings' },
{ id: 'wc_settings_slotfill', scope: 'woocommerce-settings' },
{
id: 'wc_settings_general_site_visibility_slotfill',
scope: 'woocommerce-site-visibility-settings',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should use the same scope woocommerce-settings here. The reason this exists is so that we're not loading all of the app's Fills, just the ones that match the current scope. woocommerce-settings is already on the page so may as well use it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good @psealock 👍 Updated in Use woocommerce-settings scope

@moon0326 moon0326 enabled auto-merge (squash) March 8, 2024 03:42
@moon0326 moon0326 merged commit 1f914c7 into trunk Mar 8, 2024
33 checks passed
@moon0326 moon0326 deleted the add/45107-lys-settings-screen-page branch March 8, 2024 04:11
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 8, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 8, 2024
@Stojdza Stojdza added 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 and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 8, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* Support div setting type

* Add wc_settings_general_site_visibility_slotfill slotfill

* Add site visibility setting section

* Add placeholder

* Rename div to slotfill_placeholder

* Add comment

* Fix component name

* Add changefile(s) from automation for the following project(s): woocommerce

* Use unique id

* Rename option names

* Put LYS settings behind launch-your-store flag

* Move Site Visibility header to component

* Lint fixes

* Lint fixes

* Use woocommerce-settings scope

* lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Launch Your Store] Settings Screen
4 participants