site-kit-wp
site-kit-wp copied to clipboard
Remove terms "page dashboard" and "dashboard details" from plugin in favor of "entity dashboard"
The terms "page dashboard" and "dashboard details" both denote the same thing, but now are both "deprecated" in favor of finally having a canonical term "entity dashboard". The codebase should eventually reflect that (at the latest, once the unifiedDashboard
becomes the only version of the dashboard available).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Any mentions of "page dashboard" or "dashboard details" should be replaced with the new term "entity dashboard" across the plugin codebase (including docs, file names etc.). For example:
- The
VIEW_CONTEXT_PAGE_DASHBOARD
should be renamed toVIEW_CONTEXT_ENTITY_DASHBOARD
. - Its value should become
entityDashboard
. - The CSS class
googlesitekit-navigation--pageDashboard
should be renamed accordingly. - Any mentions of the old terms in e.g. code comments etc should also be replaced with the new term.
- The
- The
VIEW_CONTEXT_DASHBOARD
should be renamed toVIEW_CONTEXT_MAIN_DASHBOARD
and its value accordingly tomainDashboard
. - The following assets (both the files and PHP handles, also the JS render target IDs, etc.) should be renamed:
-
googlesitekit-dashboard.js
-->googlesitekit-main-dashboard.js
-
googlesitekit-dashboard-details.js
-->googlesitekit-entity-dashboard.js
-
googlesitekit-dashboard-splash.js
-->googlesitekit-splash.js
-
- The only thing that should not be changed for any of the above is any URL relevant aspects (e.g.
googlesitekit-dashboard
andgooglesitekit-splash
should remain as is in terms of URLs).
Implementation Brief
- Search and replace all instances of the following constants across the codebase (case-sensitive):
-
VIEW_CONTEXT_DASHBOARD
->VIEW_CONTEXT_MAIN_DASHBOARD
-
VIEW_CONTEXT_DASHBOARD_VIEW_ONLY
->VIEW_CONTEXT_MAIN_DASHBOARD_VIEW_ONLY
-
VIEW_CONTEXT_PAGE_DASHBOARD
->VIEW_CONTEXT_ENTITY_DASHBOARD
-
VIEW_CONTEXT_PAGE_DASHBOARD_VIEW_ONLY
->VIEW_CONTEXT_ENTITY_DASHBOARD_VIEW_ONLY
-
VIEW_CONTEXT_DASHBOARD_SPLASH
->VIEW_CONTEXT_SPLASH
-
- In
assets/js/googlesitekit/constants.js
:- Update the value of the following constants:
-
VIEW_CONTEXT_MAIN_DASHBOARD
tomainDashboard
-
VIEW_CONTEXT_MAIN_DASHBOARD_VIEW_ONLY
tomainDashboardViewOnly
-
VIEW_CONTEXT_ENTITY_DASHBOARD
toentityDashsboard
-
VIEW_CONTEXT_ENTITY_DASHBOARD_VIEW_ONLY
toentityDashboardViewOnly
-
- Update the value of the following constants:
- In
assets/sass/components/global/_googlesitekit-dashboard-navigation.scss
:- Update the
.googlesitekit-navigation--pageDashboard
CSS class to be.googlesitekit-navigation--entityDashboard
.
- Update the
- Search and replace all instances of the following strings across the codebase (case-insensitive):
-
page dashboard
->entity dashboard
-
dashboard details
->entity dashboard
-
- Replace file names and handles:
- Make the following replacements:
-
googlesitekit-dashboard
->googlesitekit-main-dashboard
-
googlesitekit-dashboard-details
->googlesitekit-entity-dashboard.
-
googlesitekit-dashboard-splash
->googlesitekit-splash
-
- Look up the
.js
files with the above file names and rename them accordingly. - Inside the above files, update the
id
in therenderTarget
variable inside thedomReady
function to reflect the above terminology change. - In
webpack.config.js
, update the respectiveentry
points to reflect the above changes. - In
includes/Core/Assets/Assets.php
, make the above replacements for handles and file names in theget_assets()
method. - In
includes/Core/Admin/Screens.php
, make the above replacements for the handles passed toAssets::enqueue_asset()
method calls and the<div>
id
s (e.g.<div id="js-googlesitekit-dashboard-splash" ...
). They can be found in theget_screens()
method.
- Make the following replacements:
Test Coverage
- Reflect the above terminology changes in relevant tests.
- Fix any failing test.
QA Brief
- Setup SiteKit from scratch and ensure that everything works fine. (Authentication, viewing the main dashboard and the entity dashboard)
- Verify GA events which include the dashboard type in the event name are correctly updated based on the updates in the AC.
- Smoke test old feature tours (like Idea hub, unified dashboard) which will also be affected by these updates.
Changelog entry
- N/A
IB ✔️
@felixarntz Just wanted to flag the change of our internal GA tracking events which heavily rely on the renamed constants. I guess that was considered and won't be an issue when we make our internal reports going further?
I've removed the QA:Eng
label on this ticket because I feel we should be able to complete the testing based on QAB. This will have gone through CR and MR review.
QA Update ⚠️
@wpdarren I tested all functionalities and changes as per QAB and AC except Idea Hub feature tour. I'm not able to generate Idea hub feature tour using both oi.ie and elasticpress.io site may be due to permission denied error I'm getting. Can you please verify Idea hub feature tour at your end.
- Verified on dev.
- Verified site kit setup, widget data, disconnect and reset site kit functionality.
- Verified main and entity dashboard.
- Verified Chip navigation tour, Widget navigation tour and dashboard sharing tour.
- Verified file name and JS name changes as per AC.
- Verified GA events category name changes as per AC.
QA Update: ✅
@mohitwp the feature tours for Idea hub works as expected. Screencast / Screenshot below. I've assigned back to you in case you wanted to do any final checks before approving.
- The idea hub feature tour appears within the Site Kit Dashboard and also on the pages screen.
Details
https://user-images.githubusercontent.com/73545194/196634900-2c2f5a4f-e7ff-434c-8ae4-d365d2e0052b.mp4
QA Update
Thank you @wpdarren
- Verified on dev.
- Verified site kit setup, widget data, disconnect and reset site kit functionality.
- Verified main and entity dashboard.
- Verified Chip navigation tour, Widget navigation tour, dashboard sharing tour and Idea hub tour.
- Verified file name and JS name changes as per AC.
- Verified GA events category name changes as per AC.
https://user-images.githubusercontent.com/73545194/196634900-2c2f5a4f-e7ff-434c-8ae4-d365d2e0052b.mp4
Approval ✅
@asvinb @jimmymadon @tofumatt I found a few minor other remainders of old terms, but since those were not part of the ACs, let's handle them in a new issue #6038.