Skip to content

Commit

Permalink
Jetpack Boost: Bare bones React DataSync Prototype (#33657)
Browse files Browse the repository at this point in the history
* Prototype

* Rollup Limitation Workaround: TypeScript Failure

Rollup is failing to compile typescript - so for now distribute this as JavaScript

* Unused config

* Debugging messages

* Add react data sync client in Jetpack Boost

* Migrate MinifyMeta component to React

* Update property name

* Update MinifyMeta component structure

* Revert "Update MinifyMeta component structure"

This reverts commit c1042bcc73f0238500e5df0d19726ac405501fd6.

* optionKey -> datasyncKey

* Address any complaints

* Add todos

* Whoops, forgot to migrate optionKey -> datasyncKey to usage

This is what you get for not having typescript checks (afaik not possible with ReactComponent at the moment)

* Clean up data sync entry adapter type

* Subscribe to an interface

The design here was flawed - datasync requested Schema even though it actually needs something that subscribes to the Parser contract.

This is called the "code to interface, not the implementation" principle.

This gets rid of quite a few phpStorm inspection warnings in wp-js-data-sync.php in boost

* Add "Any" type to DataSync Parser

* Add Data_Sync_Readonly

* Export all DataSyncHooks

* Readonly hook

* SWR already de-dupes requests, no need for signals

* Expose SWR config on DataSync hooks

* Prevent revalidating on Mount

window already has the data

* Disable debug inspection

* plugins_dir_path for the pencil

* Add @todo

* To-done

* Use react-query

* Upgrade react-query to latest-ish version

* Refactor swr to react-query

* We need signals in DataSync once again

This reverts commit 51eb7dc8b101cad6802bbd8b6effb24270736155.

* Use signals in GET

* Improve variable naming

* Update lock file

* Add changelogs

* Update pencil location and color

* Remove unused statements

* Update wp-js-data-sync version

* Remove (svelte) MinifyMeta component

* Replace unused minify svelte store with react version

* Fix dependency exports

* Add babel config

---------

Co-authored-by: Peter Petrov <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6742350122
  • Loading branch information
ouikhuan authored and matticbot committed Nov 3, 2023
1 parent a141a04 commit 2e0d32c
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 2e0d32c

Please sign in to comment.