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

Search package: move search dashboard to package ( the base ) (1/2) #21865

Merged
merged 103 commits into from
Nov 26, 2021

Conversation

kangzj
Copy link
Contributor

@kangzj kangzj commented Nov 24, 2021

Changes proposed in this Pull Request:

The PR is a combination of #21840, #21841 and #21842, which includes the dependencies duplicated from Jetpack and a new state store. The PR doesn't touch the Jetpack the plugin (except for a dependency update) and will serve as a base to migrate the search dashboard on.

As the individual PRs were all reviewed by the search team already ( and most the team is on AFK now ), so I'm sending this for crew review straightly.

#21840 (commit)

  • Copied dependencies from Jetpack the plugin with zero change as a base. tests and state are skipped as we'll add new.

#21841 (commit)

  • Added new state store based on @wordpress/data to replace the state store in Jetpack client.

#21842 (commit)

  • Removed unnecessary dependencies from copied components.
  • Added simple tests for components
  • Make form toggle component grid layout compatible

Jetpack product discussion

n/a

Does this pull request change what data or activity we track or use?

no

Testing instructions:

  • Run (cd projects/packages/search && pnpm test)
  • Run (cd projects/packages/search && composer phpunit)
  • Ensure all tests pass
  • Ensure no changes to Jetpack the plugin except for a dependency version bump

@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA labels Nov 24, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: December 7, 2021.
  • Scheduled code freeze: November 30, 2021.

Backup plugin:

  • Next scheduled release: December 7, 2021.
  • Scheduled code freeze: November 29, 2021.

@kangzj kangzj changed the title Search package: move search dashboard to package - the base (1/2) Search package: move search dashboard to package - the base Nov 24, 2021
@kangzj kangzj added this to In progress in Jetpack Search - Standalone Nov 25, 2021
@kangzj kangzj added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] In Progress labels Nov 25, 2021
@kangzj kangzj requested a review from a team November 25, 2021 23:19
@jeherve jeherve added this to the jetpack/10.4 milestone Nov 26, 2021
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

I noted things below, but nothing that cannot be fixed in follow-up PRs so I'm approving so we can move on.

Comment on lines +1 to +4
@import "../../scss/calypso-colors";
@import "../../scss/color-functions";
@import "../../scss/functions/rem";
@import "../../scss/typography";
Copy link
Member

Choose a reason for hiding this comment

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

We'll probably want to move towards using the base-styles package instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will try to use the package in the following PR.

Comment on lines +35 to +38
return successNotice( __( 'Updated settings.' ) );
} catch ( e ) {
yield setJetpackSettings( oldSettings );
return errorNotice( __( 'Error Update settings…' ) );
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return successNotice( __( 'Updated settings.' ) );
} catch ( e ) {
yield setJetpackSettings( oldSettings );
return errorNotice( __( 'Error Update settings…' ) );
return successNotice( __( 'Updated settings.', 'jetpack' ) );
} catch ( e ) {
yield setJetpackSettings( oldSettings );
return errorNotice( __( 'Error Update settings…', 'jetpack' ) );

return setSearchPlanInfo( planInfo );
}
} catch ( e ) {
return errorNotice( __( 'Error fetching search plan…' ) );
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return errorNotice( __( 'Error fetching search plan…' ) );
return errorNotice( __( 'Error fetching search plan…', 'jetpack' ) );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeherve oops, thanks for catching this, will address in the following PR. And will see how to add the check here.

return setJetpackSettings( settings );
}
} catch ( e ) {
return errorNotice( __( 'Error fetching settings…' ) );
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return errorNotice( __( 'Error fetching settings…' ) );
return errorNotice( __( 'Error fetching settings…', 'jetpack' ) );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeherve oops, thanks for catching this, will address in the following PR.

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Nov 26, 2021
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello kangzj! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D70721-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@kangzj kangzj merged commit 8404f65 into master Nov 26, 2021
@kangzj kangzj deleted the feature/move-search-dashboard-to-package branch November 26, 2021 19:29
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Nov 26, 2021
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D70721-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@kangzj kangzj changed the title Search package: move search dashboard to package - the base Search package: move search dashboard to package ( the base ) (1/2) Nov 28, 2021
@kangzj
Copy link
Contributor Author

kangzj commented Nov 29, 2021

🚢 r235709-wpcom

@jsnmoon jsnmoon moved this from In progress to Done in Jetpack Search - Standalone Dec 1, 2021
davidlonjon added a commit that referenced this pull request Dec 2, 2021
* master: (22 commits)
  Update storybook monorepo to v6.4.0 (#21897)
  Refresh the site's modules and settings after successful product activation (#21886)
  Plugin Install: Bump MC stat on success or fail. (#21893)
  Nav Unification: Use correct user capability for the Inbox menu item (#21882)
  Jetpack: Extend disconnection dialog component to handle multiple steps and accept more props (#21048)
  Disable CSSTidy property shorthand optimization in the editor or headstart (#21891)
  Connection UI: Update Composer instructions in README.md (#21890)
  Partner Compatibility: Adding a unique connection screen for customers who receive a coupon from a Jetpack partner (#21813)
  Search package: move search dashboard to package - the base (#21865)
  JITM: wrap CTA below text on small viewports (#21688)
  Licensing JS Package – fix icon positioning and width (#21878)
  JITM: new JS and CSS builder (#21874)
  Support site_intent for `/me/sites` endpoint (#21880)
  Don't render Critical CSS while generating CritCSS. (#21879)
  ConnectScreen: make button full width on small screens (#21683)
  Improve the copy of the license activation banner (#21876)
  Rename Webpack-built files back from `.min.js` and remove hashes (#21748)
  Search: Migrate more helper classes to package (#21751)
  Search: migrate/add search rest API (#21584)
  Add initial state to the connection package (#21864)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Feature] Search For all things related to Search [JS Package] API [JS Package] Connection [JS Package] IDC [JS Package] Licensing [Package] Connection UI [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Backup A plugin that allows users to save every change and get back online quickly with one-click restores. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA Touches WP.com Files
Development

Successfully merging this pull request may close these issues.

None yet

4 participants