Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
32ee04b
Data: Add typed function overloads to store access APIs
ObliviousHarmony Mar 9, 2026
bc92f8f
Data: Add typed store name access via StoreRegistry
ObliviousHarmony Mar 9, 2026
9c4fe3b
Added Store String Mappings
ObliviousHarmony Mar 9, 2026
cc520c3
Added changelog
ObliviousHarmony Mar 9, 2026
d24c1c8
Revert "Added Store String Mappings"
ObliviousHarmony Mar 9, 2026
12c15bc
Updated changelog
ObliviousHarmony Mar 9, 2026
f27fb0c
Simplify StoreRegistry types with index signature fallback
ObliviousHarmony Mar 26, 2026
e303afa
Merge branch 'trunk' into add/data/store-named-typed-access
ObliviousHarmony Mar 26, 2026
12f380d
Deprecate Old Types
ObliviousHarmony Mar 31, 2026
dd7c31e
Snackbar: Use surface-width design token for max-width (#76592)
jameskoster Mar 26, 2026
4520308
iAPI Docs: Add client-side navigation compatibility guide (#76242)
DAreRodz Mar 27, 2026
00b582f
Enhance block registration by using blocks-manifest for improved perf…
juanmaguitar Mar 27, 2026
6aeff42
docs(create-block-interactive-template): document available variants …
juanmaguitar Mar 27, 2026
372f7c3
Build: detect version and generate asset.php for vendor scripts (#76811)
jsnajdr Mar 27, 2026
d0c1b9e
Site Editor > Patterns & Parts: generate sidebar from view config (#7…
oandregal Mar 27, 2026
72f1440
Interactivity API: mention `client-side-navigation` scaffold variant …
Copilot Mar 27, 2026
7c369e0
Fields: Add `excerpt` field (#76829)
ntsekouras Mar 27, 2026
94ba92b
Update PHP_CodeSniffer repository link and schema URL (#76816)
rodrigoprimo Mar 27, 2026
8217abc
docs: Fix markdown links and PHP code block in client-side navigation…
Copilot Mar 27, 2026
3882114
Experimental: Add `revisions` panel (#76735)
ntsekouras Mar 27, 2026
9cc4d81
#76478 Boot: Fix black area below content when sidebar is taller than…
sandipmaurya2611 Mar 27, 2026
f071b72
Style Book: Fix missing styles for classic themes in stylebook route …
t-hamano Mar 27, 2026
4a3e2aa
UI/Dialog: Expose initialFocus and finalFocus on Dialog.Popup (#76860)
ciampo Mar 27, 2026
8e67ce1
compose/useDialog: add `stopPropagation()` to Escape handler (#76861)
ciampo Mar 27, 2026
36ffb97
RTC: Add e2e block gauntlet (#76849)
alecgeatches Mar 27, 2026
fb17325
UI: Add AlertDialog primitive (#76847)
ciampo Mar 27, 2026
35d80f8
RTC: Fix stuck "Join" link in post list when lock expires (#76795)
shekharnwagh Mar 27, 2026
b81edd7
Site Editor: simplify sidebar for Pages & Templates (#76868)
oandregal Mar 27, 2026
3929071
Site Editor v2: Add missing menu items to navigation leaf more menu (…
scruffian Mar 28, 2026
44289e2
Navigation: Add a shared helper for font sizes in Navigation Link and…
scruffian Mar 28, 2026
a2cabbb
Reduce specificity of nav link default padding so global styles are a…
tellthemachines Mar 28, 2026
a3a5910
Icon: Fix center alignment in the editor for classic themes (#76878)
t-hamano Mar 28, 2026
1761219
RTC: Fix notes not syncing between collaborative editors (#76873)
pento Mar 30, 2026
39b0315
List Item: Disable edit as HTML support (#76897)
shimotmk Mar 30, 2026
4d5f03b
Block Library: Show fallback label in MediaControl when filename is e…
jigangz Mar 30, 2026
62d1065
Image block media placeholder: remove duotone (#76721)
carolinan Mar 30, 2026
77a546b
Bump plugin version to 22.8.2
gutenbergplugin Mar 30, 2026
82c623e
Update Changelog for 22.8.2
gutenbergplugin Mar 30, 2026
e3d5fce
Latest Comments: Fix v1 deprecated block missing supports (#76877)
t-hamano Mar 30, 2026
345f967
VIPS: ensure single instance (#76780)
sgomes Mar 30, 2026
b427398
React vendor script: avoid warning on createRoot (#76825)
jsnajdr Mar 30, 2026
fca8bd4
Connectors: Add Akismet as a default connector (#76828)
jorgefilipecosta Mar 30, 2026
f96139a
Core Data: remove offset param from stableKey, use pagination logic (…
jsnajdr Mar 30, 2026
2a907a8
Button: hide focus outline on :active for click feedback in forced-co…
ciampo Mar 30, 2026
174ec22
Restore with compaction update (#76872)
chriszarate Mar 30, 2026
51790e6
Theme: Change default control cursor to `pointer` (#76762)
mirka Mar 30, 2026
d404752
E2E Tests: Enable client-side media processing for site editor image …
adamsilverstein Mar 30, 2026
06fe590
ComboboxControl: Fix accessible association of `help` text (#76761)
mirka Mar 30, 2026
d553e92
Add backport for WP_ALLOW_COLLABORATION (#76716)
ingeniumed Mar 30, 2026
6c90694
DataForm: Add `compact` configuration option to the `datetime` contro…
ntsekouras Mar 31, 2026
c579e36
Admin UI: Fix Page Header not rendering with only actions and add sto…
CGastrell Mar 31, 2026
bd4d715
Improve JSDoc for abilities API (#76824)
gziolo Mar 31, 2026
5eec9ef
DOM: Document class wildcard matcher for 'cleanNodeList' (#76920)
Mamaduka Mar 31, 2026
e06c7be
e2e: Add e2e tests for template and template part revisions (#76923)
t-hamano Mar 31, 2026
809892b
react-dom vendor script: remove __esModule flag (#76925)
jsnajdr Mar 31, 2026
3d37ddf
Site Editor: Fix unsupported theme flash on direct URL navigation (#7…
dsas Mar 31, 2026
a4082e6
Icons: Enforce strict name validation in `register` method (#76079)
im3dabasia Mar 31, 2026
a0c44a4
ToggleGroupControl: Fix accessible association of `help` text (#76740)
mirka Mar 31, 2026
dc92d66
Connectors: Replace plugin.slug with plugin.file (#76909)
jorgefilipecosta Mar 31, 2026
d170ed7
UI/Dialog: deprioritize close icon for initial focus (#76910)
ciampo Mar 31, 2026
a3ddf88
Block visibility badge: use canvas iframe for viewport detection (#76…
ramonjd Apr 1, 2026
8ca1121
Fields: Add `sticky` field (#76922)
ntsekouras Apr 1, 2026
b11242f
DOM: Prefer standard `caretPositionFromPoint` over deprecated `caretR…
Mamaduka Apr 1, 2026
b0d396d
Block Supports: Add background gradient support that can combine with…
aaronrobertshaw Apr 1, 2026
5ab02b4
Tab Block: Remove anchor from save function (#76511)
shimotmk Apr 1, 2026
201ef50
CollapsibleCard: Add HeaderDescription subcomponent (#76867)
ciampo Apr 1, 2026
a1eb8ef
element: Make createInterpolateElement TS/type smart (#71513)
manzoorwanijk Apr 1, 2026
7727404
admin-ui: Update README to clarify purpose and distinguish from ui pa…
aduth Apr 1, 2026
3cd7499
Site Editor > Quick Edit: add form config to endpoint (#76953)
oandregal Apr 1, 2026
d1fd6c1
Fields: Tweak `excerpt` field (#76903)
ntsekouras Apr 1, 2026
f901261
Fix: Flaky RichText format e2e test (#76958)
Mamaduka Apr 1, 2026
769d65f
Bump plugin version to 22.9.0-rc.1
gutenbergplugin Apr 1, 2026
f462140
Classify admin-ui and dataviews to components (#76959)
oandregal Apr 1, 2026
6533825
Update Changelog for 22.9.0-rc.1
gutenbergplugin Apr 1, 2026
8d811d1
Update changelog files
gutenbergplugin Apr 1, 2026
67c5771
chore(release): publish
gutenbergplugin Apr 1, 2026
3ffdcb2
Add performance metrics for client-side media processing (#76792)
adamsilverstein Apr 1, 2026
ea007ee
Connectors: Update help text from 'reset' to 'manage' (#76963)
jorgefilipecosta Apr 1, 2026
f0bbfd6
Connectors: Hide Akismet unless already installed (#76962)
jorgefilipecosta Apr 1, 2026
b5d12c0
Merge branch 'trunk' into add/data/store-named-typed-access
ObliviousHarmony Apr 1, 2026
236b7a9
Remove index signature from StoreRegistry interface
ObliviousHarmony Apr 1, 2026
aba0d66
Move deprecated type aliases back into types.ts
ObliviousHarmony Apr 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Added Store String Mappings"
This reverts commit 9c4fe3b. The StoreRegistry augmentations
in individual store packages are contentious; keep only the central
StoreRegistry infrastructure in @wordpress/data for now.
  • Loading branch information
ObliviousHarmony committed Mar 9, 2026
commit d24c1c8219b069a2b937059cd25b457cbd683d05
10 changes: 0 additions & 10 deletions packages/abilities/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,3 @@ export const store = createReduxStore( STORE_NAME, {
} );

register( store );

/**
* Bind the store descriptor to the store name so that string-based
* access (e.g. `select( 'core/abilities' )`) is typed.
*/
declare module '@wordpress/data' {
interface StoreRegistry {
[ STORE_NAME ]: typeof store;
}
}
10 changes: 0 additions & 10 deletions packages/boot/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,3 @@ export const store = createReduxStore( STORE_NAME, {
register( store );

export { STORE_NAME };

/**
* Bind the store descriptor to the store name so that string-based
* access (e.g. `select( 'wordpress/boot' )`) is typed.
*/
declare module '@wordpress/data' {
interface StoreRegistry {
[ STORE_NAME ]: typeof store;
}
}
138 changes: 134 additions & 4 deletions packages/core-data/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,137 @@
// Ensure the StoreRegistry module augmentation is included in the declaration
// output so that consumers get typed access via store name (e.g. select('core')).
/// <reference path="./store-registry.ts" preserve="true" />
export { store } from './store';
/**
* WordPress dependencies
*/
import { createReduxStore, register } from '@wordpress/data';

/**
* Internal dependencies
*/
import reducer from './reducer';
import * as selectors from './selectors';
import * as privateSelectors from './private-selectors';
import * as actions from './actions';
import * as privateActions from './private-actions';
import * as resolvers from './resolvers';
import createLocksActions from './locks/actions';
import {
rootEntitiesConfig,
additionalEntityConfigLoaders,
getMethodName,
} from './entities';
import { STORE_NAME } from './name';
import { unlock } from './lock-unlock';
import { dynamicActions, dynamicSelectors } from './dynamic-entities';
import logEntityDeprecation from './utils/log-entity-deprecation';

// The entity selectors/resolvers and actions are shortcuts to their generic equivalents
// (getEntityRecord, getEntityRecords, updateEntityRecord, updateEntityRecords)
// Instead of getEntityRecord, the consumer could use more user-friendly named selector: getPostType, getTaxonomy...
// The "kind" and the "name" of the entity are combined to generate these shortcuts.
const entitiesConfig = [
...rootEntitiesConfig,
...additionalEntityConfigLoaders.filter( ( config ) => !! config.name ),
];

const entitySelectors = entitiesConfig.reduce( ( result, entity ) => {
const { kind, name, plural } = entity;

const getEntityRecordMethodName = getMethodName( kind, name );
result[ getEntityRecordMethodName ] = ( state, key, query ) => {
logEntityDeprecation( kind, name, getEntityRecordMethodName, {
isShorthandSelector: true,
alternativeFunctionName: 'getEntityRecord',
} );
return selectors.getEntityRecord( state, kind, name, key, query );
};

if ( plural ) {
const getEntityRecordsMethodName = getMethodName( kind, plural, 'get' );
result[ getEntityRecordsMethodName ] = ( state, query ) => {
logEntityDeprecation( kind, name, getEntityRecordsMethodName, {
isShorthandSelector: true,
alternativeFunctionName: 'getEntityRecords',
} );
return selectors.getEntityRecords( state, kind, name, query );
};
}
return result;
}, {} );

const entityResolvers = entitiesConfig.reduce( ( result, entity ) => {
const { kind, name, plural } = entity;
const getEntityRecordMethodName = getMethodName( kind, name );
result[ getEntityRecordMethodName ] = ( key, query ) => {
logEntityDeprecation( kind, name, getEntityRecordMethodName, {
isShorthandSelector: true,
alternativeFunctionName: 'getEntityRecord',
} );
return resolvers.getEntityRecord( kind, name, key, query );
};

if ( plural ) {
const getEntityRecordsMethodName = getMethodName( kind, plural, 'get' );
result[ getEntityRecordsMethodName ] = ( ...args ) => {
logEntityDeprecation( kind, plural, getEntityRecordsMethodName, {
isShorthandSelector: true,
alternativeFunctionName: 'getEntityRecords',
} );
return resolvers.getEntityRecords( kind, name, ...args );
};
result[ getEntityRecordsMethodName ].shouldInvalidate = ( action ) =>
resolvers.getEntityRecords.shouldInvalidate( action, kind, name );
}
return result;
}, {} );

const entityActions = entitiesConfig.reduce( ( result, entity ) => {
const { kind, name } = entity;

const saveEntityRecordMethodName = getMethodName( kind, name, 'save' );
result[ saveEntityRecordMethodName ] = ( record, options ) => {
logEntityDeprecation( kind, name, saveEntityRecordMethodName, {
isShorthandSelector: true,
alternativeFunctionName: 'saveEntityRecord',
} );
return actions.saveEntityRecord( kind, name, record, options );
};

const deleteEntityRecordMethodName = getMethodName( kind, name, 'delete' );
result[ deleteEntityRecordMethodName ] = ( key, query, options ) => {
logEntityDeprecation( kind, name, deleteEntityRecordMethodName, {
isShorthandSelector: true,
alternativeFunctionName: 'deleteEntityRecord',
} );
return actions.deleteEntityRecord( kind, name, key, query, options );
};

return result;
}, {} );

const storeConfig = () => ( {
reducer,
actions: {
...dynamicActions,
...actions,
...entityActions,
...createLocksActions(),
},
selectors: {
...dynamicSelectors,
...selectors,
...entitySelectors,
},
resolvers: { ...resolvers, ...entityResolvers },
} );

/**
* Store definition for the code data namespace.
*
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*/
export const store = createReduxStore( STORE_NAME, storeConfig() );
unlock( store ).registerPrivateSelectors( privateSelectors );
unlock( store ).registerPrivateActions( privateActions );
register( store ); // Register store after unlocking private selectors to allow resolvers to use them.

/**
* Enums cannot be exported private without losing the ability to narrow types
Expand Down
11 changes: 0 additions & 11 deletions packages/core-data/src/store-registry.ts

This file was deleted.

134 changes: 0 additions & 134 deletions packages/core-data/src/store.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/editor/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Ensure the StoreRegistry module augmentation is included in the declaration
// output so that consumers get typed access via store name (e.g. select('core/editor')).
/// <reference path="./store-registry.ts" preserve="true" />

/**
* Internal dependencies
*/
Expand Down
11 changes: 0 additions & 11 deletions packages/editor/src/store-registry.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/notices/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,3 @@ export const store = createReduxStore( 'core/notices', {
} );

register( store );

/**
* Bind the store descriptor to the store name so that string-based
* access (e.g. `select( 'core/notices' )`) is typed.
*/
declare module '@wordpress/data' {
interface StoreRegistry {
'core/notices': typeof store;
}
}
10 changes: 0 additions & 10 deletions packages/preferences/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,3 @@ export const store = createReduxStore<
} );

register( store );

/**
* Bind the store descriptor to the store name so that string-based
* access (e.g. `select( 'core/preferences' )`) is typed.
*/
declare module '@wordpress/data' {
interface StoreRegistry {
[ STORE_NAME ]: typeof store;
}
}
10 changes: 0 additions & 10 deletions packages/upload-media/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,3 @@ if ( ! select( store ) ) {
unlock( store ).registerPrivateActions( privateActions );
// @ts-ignore
unlock( store ).registerPrivateSelectors( privateSelectors );

/**
* Bind the store descriptor to the store name so that string-based
* access (e.g. `select( 'core/upload-media' )`) is typed.
*/
declare module '@wordpress/data' {
interface StoreRegistry {
[ STORE_NAME ]: typeof store;
}
}