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

Reorganize frontend files: move wcdl and external-components into components #2722

Merged

Conversation

eason9487
Copy link
Member

@eason9487 eason9487 commented Dec 12, 2024

Changes proposed in this Pull Request:

Closes #195

This PR further reorganizes frontend files within two directories:

  • js/src/wcdl
    • Move all sub-directories to the components directory and delete the README file
    • Rename the SelectControl component to SearchableSelectControl to differentiate it from AppSelectControl
      • AppSelectControl based on SelectControl from @wordpress/components
      • SearchableSelectControl based on SelectControl from @woocommerce/components
    • Rename the prefix wcdl- to gla- for all related CSS classes
  • js/src/external-components
    • Move all sub-directories and files to the components/external directory

💡 I will likely skip code review since this PR only includes developer-facing change.

Screenshots of the directory structure:

📁 js/src/wcdl

BeforeAfter
js/src/wcdl
├── README.md
├── radio-helper-text
├── section
│   └── card
├── select-control
└── subsection
js/src/components
├── radio-helper-text
├── searchable-select-control
├── section
│   └── card
└── subsection

📁 js/src/external-components

BeforeAfter
js/src/external-components
├── README.md
├── woocommerce
│   ├── compare-filter
│   ├── filter-picker
│   └── filters
└── wordpress
    └── guide
js/src/components/external
├── README.md
├── woocommerce
│   ├── compare-filter
│   ├── filter-picker
│   └── filters
└── wordpress
    └── guide

Detailed test instructions:

  1. Confirm npm run dev can build frontend code without errors
  2. Confirm npm run lint:js can pass
  3. Confirm npm run lint:css can pass
  4. Confirm npm run test:js can pass
  5. Confirm E2E tests can pass: https://github.com/woocommerce/google-listings-and-ads/actions/runs/12292309693

Additional details:

Over the past three to four years, the component development of the WooCommerce Design Library has stalled in this project for a long time and has become mismatched with the later evolution of the WooCommerce Design Library, so it may not be necessary to keep the original purpose and the wcdl directory.

See: p1694792606788619-slack-C05BG9S6B96

Changelog entry

@eason9487 eason9487 self-assigned this Dec 12, 2024
@github-actions github-actions bot added the changelog: dev Developer-facing only change. label Dec 12, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.4%. Comparing base (9db814e) to head (b9b2831).
Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
.../src/components/searchable-select-control/index.js 33.3% 2 Missing ⚠️
...bute-mapping/attribute-mapping-category-control.js 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #2722   +/-   ##
=======================================
  Coverage     63.4%   63.4%           
=======================================
  Files          338     338           
  Lines         5203    5203           
  Branches      1274    1274           
=======================================
  Hits          3301    3301           
  Misses        1728    1728           
  Partials       174     174           
Flag Coverage Δ
js-unit-tests 63.4% <62.5%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
js/src/components/account-card/index.js 89.2% <ø> (ø)
js/src/components/conditional-section.js 12.5% <ø> (ø)
...mponents/external/wordpress/guide/finish-button.js 0.0% <ø> (ø)
...s/src/components/external/wordpress/guide/icons.js 50.0% <ø> (ø)
...s/src/components/external/wordpress/guide/index.js 63.0% <ø> (ø)
...omponents/external/wordpress/guide/page-control.js 0.0% <ø> (ø)
...choose-audience-section/choose-audience-section.js 33.3% <ø> (ø)
...onfigure-product-listings/shipping-time-section.js 50.0% <ø> (ø)
...gure-product-listings/shipping-time-setup/index.js 20.0% <ø> (ø)
...ee-listings/configure-product-listings/tax-rate.js 33.3% <ø> (ø)
... and 35 more

@eason9487 eason9487 linked an issue Dec 12, 2024 that may be closed by this pull request
@eason9487 eason9487 force-pushed the dev/195-reorganize-frontend-files-wcdl-and-external branch from 8bf4aa5 to b9b2831 Compare December 13, 2024 01:56
@eason9487 eason9487 merged commit ced654d into develop Dec 13, 2024
7 checks passed
@eason9487 eason9487 deleted the dev/195-reorganize-frontend-files-wcdl-and-external branch December 13, 2024 02:07
@eason9487 eason9487 mentioned this pull request Dec 18, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: dev Developer-facing only change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistencies in frontend Page Struture Reorganize front-end files, to have a dedicated pages folder
1 participant