Show error on single URL details view if no entity is matched #2001
Comments
|
@felixarntz perhaps the message shouldn't contain the URL itself as it is linked below (assuming the message goes where the title was). Do you think the message should be rendered as an |
|
@aaemnnosttv I think we should entirely replace the |
|
@felixarntz on second thought, I think the I'm not saying we should steal this exactly, but a few ideas we could borrow:
What do you think? |
|
@aaemnnosttv That's fair, let's not use error appearance. I still think we should show the full URL because someone could manually add a For the robot image, probably no because it would require some extra whatever license hassle, so |
|
@felixarntz IB updated |
|
IB |




Before we implemented proper entity detection in Site Kit (see #174), the single URL details view worked for any URL part of the site, or even URLs not part of the site for certain services that don't incorporate permission management (such as PageSpeed Insights).
However, now the single URL details view relies on entity detection to find out more information of the "entity" based on the given URL. This means that, if a single URL details view is accessed, it can and should only provide meaningful results if an entity is detected.
This issue should modify the single URL details view accordingly so that, if no current entity is available, a corresponding message is displayed, instead of still attempting to show data (for the new widgets, doing so would fall back to showing site-wide data, which would be just as irrelevant on that screen).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
getCurrentEntityURLselector of thecore/sitestore returnsnull), the screen should show a corresponding message instead of all the regular UI:%sshould be the URL taken from thepermaLinkquery parameter)Implementation Brief
DashboardDetailsAppinto a newDashboardDetailsEntityViewcomponent inassets/js/components/dashboard-details/divcontaining<DateRangeSelector /><DashboardDetailsModules />, inclusiveDashboardDetailsEntityNotFoundViewcomponent as a variant (but not copy of) ofDashboardDetailsEntityViewsite-kit-wp/assets/js/components/dashboard-details/dashboard-details-app.js
Lines 85 to 109 in f244c63
h3andLinkcomponents should be replaced by the message in the AC rendered as plain text (i.e.<p>):It looks like the URL %s is not part of this site [...]
permaLinkquery parameter ofglobal.location.hrefDashboardDetailsAppto conditionally render the appropriate component based on the value ofgetCurrentEntityURLnull, render theDashboardDetailsEntityNotFoundViewDashboardDetailsEntityViewTests
DashboardDetailsAppwith stories for bothThere are no stories for this view yet, so create a
stories/dashboard-details.stories.jsmodule for themQA Brief
/wp-admin/admin.php?page=googlesitekit-dashboard&permaLink=%2F404-pageChangelog entry
The text was updated successfully, but these errors were encountered: