site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Remove terms "page dashboard" and "dashboard details" from plugin in favor of "entity dashboard"

Open felixarntz opened this issue 3 years ago • 6 comments

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 to VIEW_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 VIEW_CONTEXT_DASHBOARD should be renamed to VIEW_CONTEXT_MAIN_DASHBOARD and its value accordingly to mainDashboard.
  • 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 and googlesitekit-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 to mainDashboard
      • VIEW_CONTEXT_MAIN_DASHBOARD_VIEW_ONLY to mainDashboardViewOnly
      • VIEW_CONTEXT_ENTITY_DASHBOARD to entityDashsboard
      • VIEW_CONTEXT_ENTITY_DASHBOARD_VIEW_ONLY to entityDashboardViewOnly
  • In assets/sass/components/global/_googlesitekit-dashboard-navigation.scss:
    • Update the .googlesitekit-navigation--pageDashboard CSS class to be .googlesitekit-navigation--entityDashboard.
  • 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 the renderTarget variable inside the domReady function to reflect the above terminology change.
    • In webpack.config.js, update the respective entry points to reflect the above changes.
    • In includes/Core/Assets/Assets.php, make the above replacements for handles and file names in the get_assets() method.
    • In includes/Core/Admin/Screens.php, make the above replacements for the handles passed to Assets::enqueue_asset() method calls and the <div> ids (e.g. <div id="js-googlesitekit-dashboard-splash" ...). They can be found in the get_screens() method.

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

felixarntz avatar Sep 29 '21 15:09 felixarntz

IB ✔️

eugene-manuilov avatar Sep 23 '22 10:09 eugene-manuilov

@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?

jimmymadon avatar Oct 09 '22 17:10 jimmymadon

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.

wpdarren avatar Oct 12 '22 00:10 wpdarren

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.

image

  • 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.

image

image

image

image

image

image

image

image

image

image

image

image

image

mohitwp avatar Oct 19 '22 06:10 mohitwp

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

image

wpdarren avatar Oct 19 '22 08:10 wpdarren

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.

image

image

image

image

image

image

image

image

image

image

image

image

image

https://user-images.githubusercontent.com/73545194/196634900-2c2f5a4f-e7ff-434c-8ae4-d365d2e0052b.mp4

image

mohitwp avatar Oct 19 '22 09:10 mohitwp

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.

felixarntz avatar Oct 20 '22 16:10 felixarntz