Repository navigation
Commit e1b0865
iAPI Router: Support new styles and script modules on client-side navigation (WordPress#70353)
* Revert "Remove the iAPI full-page experiment entirely (WordPress#70228)"
This reverts commit f693991.
* Reapply "iAPI Router: Handle styles assets on region-based navigation (WordPress#67826)"
This reverts commit 0a5be06.
* Reapply "iAPI Router: Fix CSS rule order in some constructed style sheets (WordPress#68923)"
This reverts commit a53bb20.
* Clone style elements and enable/disable them
* Combine `media` and `disabled`
* Add prefetch callback to style tests
* Remove `async` from `applyStyles`
* Add basic error handling
* Rename `baseUrl` to `url`
* Improve comment wrappers around new styles sheets
* Minor fixes
* Use a SCS algorithm to add new style sheets
* Refactor and document `updateStylesWithSCS`
* Fix promises returned by `updateStylesWithSCS`
* First unit tests (claude)
* Test improvements (claude)
* Tests for shortestCommonSupersequence (claude)
* Move scs tests a folder up
* Refactor scs tests a bit
* Refactor `updateStylesWithSCS` and `applyStyles` unit tests
* Add new test for media attributes
* Fix last appended elements
* Rename and document `areStylesEqual`
* Improve `areStyleEqual` TSDoc
* Add more TSDocs
* Add TSDoc for `shortestCommonSupersequence`
* Test stylesheet loading fails
* Wrap `url` with `getPagePath`
* Make `url` param mandatory in `prepareStyles`
* Replace wrong `prefetch` words with `preload`
* Fix failed to load message
* Clarify the `element.sheet` check.
* Wrap unit tests inside an additional `describe`
* Remove unnecesary comment
* Add TSDocs for helpers in styles.test.ts
* Add missing periods in test comments
* Normalize elements before calling `shortestCommonSupersequence`
* Refactor `normalizeMedia`
* Handle script modules
* Install dynamic-importmap
* Try with dynamic-importmap
* Try ignore originally imported modules
* Use a local copy of dynamic-importmap
* Make it work
* Cleaning up WIP
* Add test files
* Add an initial simple test
* Partially fix pattern to intercept js requests
* Add missing asset.php files
* Try adding a module dependency
* Disable module preloading
* WIP Attempt code reorganization
* WIP type Load objects
* WIP Refactor types and add functions for preloading
* Update router code
* Add prefetch action to tests
* Fix modules not being imported
* Refactor script file and add TSDocs
* Improve types and comments a bit
* Improve types and TSDocs a little bit more
* Add static dependencies to test modules
* Make prefetch action asynchronous
* Add failing test
* Fix media preload when the target style list is empty
* Update more tests
* Fix how initial style sheets are detected
* Detect first if the link has started prefetching
* Add a failing test
* Only enable/disable sheets that are ready
* Improve failing test
* Move styles and module preload to `regionsToVdom`
* Add more comments
* Remove try..catch around renderRegions call
* Rename `prepareStyles` to `preloadStyles`
* Start replacing modules term with script modules
* Replace modules term with script modules in test files
* Remove unnecessary promise around lexer.init
* Remove old import fix from edge
See https://github.com/guybedford/es-module-shims/pull/450/files#diff-d9f5f5cf3b132cd3d457a02a9202af63e78eb6b8b3284097e5d1cfd28b181e8eR351.
* Remove unnecessary fetch pool
* Simplify error messages in `fetchModule`
* Do not add module type in `fetchModule`
* Remove unused code
* Catch `regionsToVdom` errors in `fetchPage`
* Remove support for `import.meta`
* Update package-lock
* Ensure CSN checkers are hidden by default
* Resolve inconsistencies and rename `markScriptModuleAsResolved`
* Reset clientSideNavigation prop when navigation starts
* Reapply "Remove the iAPI full-page experiment entirely (WordPress#70228)"
This reverts commit 9cfe7ec.
* WIP Move full-page logic to its own module
* Fix interactivity-router TS with sub-packages
* Needs to be composite project
* Add empty files for good measure
* Add package.json export
* Remove extra whitespace
* Remove exports property
* Add full-page client-side navigation support
* Import script modules before render
* Turn php logic into a class
* Change default mode priority to 9
* Fix init action in WP_Interactivity_API_Full_Page_Navigation
* Prevent warning accessing to clientNavigationMode
* Change body router region ID to core/body
* Remove unnecessary `body` prop inside `regions`
* Add a filter to enable/disable the experimental feature
* Use `wp_body_open` instead of `wp_footer`
* Move the experiment filter to `set_default_mode`
* Remove full-page unlock
* Only add the client navigation mode when full page is enabled
* Move Full Page class to experimental folder
* End buffer on `wp_footer` instead of `wp_body_open`
* Enable the full-page CSN with a gutenberg experiment
* Rename WP to Gutenberg in full-page CSN class
* Remove "since" tag
* Update changelog
* Rename regionsToVdom and renderRegions to preparePage and renderPage
* Make url param mandatori in preparePage
* Remove unnecessary full-page mode from JS
* Remove unnecessary full-page mode from PHP
* Mention original code creators
* Add descriptive names to props in ModuleLoad
* Fix wrong JSON
* Use Interactivity API instead of iAPI in experiment label
* Avoid error messages in tests
* Check the page title after navigation
* Prevent warning about missing disable_server_directive_processing
* Fix remaining ModuleLoad prop names
* Simplify resolve function and remove unnecessary code
---------
Co-authored-by: DAreRodz <darerodz@git.wordpress.org>
Co-authored-by: luisherranz <luisherranz@git.wordpress.org>
Co-authored-by: sirreal <jonsurrell@git.wordpress.org>1 parent 39a550c commit e1b0865
70 files changed
Lines changed: 3840 additions & 54 deletions
File tree
- lib
- experimental/interactivity-api
- packages
- e2e-tests/plugins
- interactive-blocks
- router-script-modules-alpha
- router-script-modules-bravo
- router-script-modules-charlie
- router-script-modules-wrapper
- router-styles-blue
- assets
- router-styles-green
- assets
- router-styles-red
- assets
- router-styles-wrapper
- store-tag
- interactivity-router
- src
- assets
- dynamic-importmap
- test
- test/e2e/specs/interactivity
- __snapshots__
- fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
226 | 238 | | |
227 | 239 | | |
228 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments