You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Site Health widget: route the body's review link through the host #82065
The Site Health widget body links "Review N items" to the classic site-health.php screen (widgets/site-health/render.tsx), while its Details action already targets the dashboard's Site Health page (#81729) and navigates client-side through the host links capability (#81740).
The body link should target the same page and use the same capability: the first widget body consuming useWidgetHost().
Why
The two affordances lead to different screens for the same content.
A widget body is the consumer the host seam exists for. The render contract is attributes / setAttributes only, and widgets depend on @wordpress/widget-primitives, never on the dashboard package, so a host capability can only reach a body ambiently. The concrete consumer was asked for in review: Dashboard Widgets: let the host decide which component renders an action link #81740 (comment)
How
widgets/site-health/render.tsx: the review link targets the dashboard page href; when useWidgetHost().links recognizes it, mount the host link through the render prop, otherwise keep the plain anchor with the same href.
widgets/site-health/package.json: depend on @wordpress/widget-primitives.
Tasks
Body link targets the dashboard's Site Health page and mounts the host link when matched
Plain anchor with the same href when no host provides links
Verify client-side navigation on the dashboard and the full page load elsewhere
Activity