Repository navigation
Add Refresh and Back to the onboarding "No workspaces yet" screen - #2216
subodhr258 wants to merge 6 commits into
Conversation
An account with no workspaces landed on a screen whose only control was the "create one" link. After creating a workspace in the GoDAM app the user had to reload wp-admin and sign in again, because a reload resets the onboarding to its first screen. The screen now has: - Refresh: asks for the workspace list again (the sign-in session is still held server-side) and moves to the workspace picker once one exists. If nothing is found yet it says so; if the request fails it shows the server message. - Back: returns to the first screen, same as the close button on the picker. - A Contact support link. The picker now defaults to the first workspace in the list as it stands, so it opens with a workspace selected after a Refresh finds the first one.
…e screen Back leaves the screen while a Refresh may still be waiting on the GoDAM service. The late answer used to set its notice on the first screen the user had gone back to. The screen now drops an answer that arrives after it has gone, and the tests cover that case and the Checking state.
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
620 |
WordPress.DB.SlowDBQuery.slow_db_query_meta_key | Detected usage of meta_key, possible slow query. |
📁 readme.txt (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
mismatched_plugin_name | Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM". |
0 |
trademarked_term | The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name. |
📁 inc/classes/class-video-sitemap-core-provider.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
73 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "wp_sitemaps_index_entry". |
📁 assets/build/css/main.css (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedStylesScope | This style is being loaded in all contexts. |
📁 assets/src/libs/analytics.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/10/20/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
📁 assets/build/js/main.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/10/20/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
Regenerated with a production build and `composer pot`: the new Refresh, Checking…, Contact support and "Still no workspaces" strings, the reworded empty-state sentence, and the moved source references.
…workspaces-dead-end # Conflicts: # languages/godam.pot
# Conflicts: # languages/godam.pot
Code reviewVerdict: LGTM — a clean, well-tested UX fix. The two load-bearing bits are both right:
I also confirmed the dependencies this leans on all exist: Two polish-level notes, neither blocking: 1. Redundant
|
When Refresh still finds none, the notice was cleared and set again in the same tick; now only the info notice is set. Addresses review: #2216 (comment)
|
Thanks Kuldip.
|
Fixes #2221
Review packet
In one line: The onboarding screen "No workspaces yet" now has Refresh and Back, so a new user who creates a workspace in the GoDAM app can carry on without reloading wp-admin and signing in again. Fixes #2221.
1. Criteria and proof
2. Before and after
Both recordings run the same flow on the same site (
godam-dev) with the sign-in and workspace-list calls of the GoDAM service stubbed in the browser, so nothing is sent to app.godam.io. Left pane: the site admin in wp-admin. Right pane: the stubbed GoDAM service, showing the workspaces on the account and every onboarding request the page sent. The email and password typed are placeholders that only reach the stub.Before (develop): no way forward. The screen has no Refresh, Back or Close. After the workspace is created the screen does not ask again, the only way on is to reload wp-admin, which starts the onboarding over, and the admin signs in a second time.
After (this branch): Refresh lands on the workspace picker. Refresh before a workspace exists says so and stays. After the workspace is created, Refresh opens the picker with it selected: no reload, no second sign-in.
Also checked on the same site, not filmed: a failed Refresh, a double click sends 1 request, the button reads "Checking…" and is disabled while loading, the Contact support link opens in a new tab, and at 390 px wide Back and Refresh stay inside the screen.
3. Tests
pages/onboarding/components/screens/WorkspaceScreen.test.js(8 tests). They mount the screen with the real store and slice and mock only the two request hooks. They assert: the empty screen shows Back, Refresh, the create-workspace link and the support link; Refresh finding a workspace opens the picker with it selected and Continue enabled; Refresh finding nothing sets an info notice and stays; a failed Refresh sets the error notice with the service's message; a successful Refresh clears an earlier notice; the button reads "Checking…" and is disabled while loading; a late answer after Back leaves the first screen untouched; Back returns to the first screen.Expected substring: "Acme Videos", Received string: "▾"(an empty selection). With only the late-answer guard reverted, "an answer that arrives after Back…" fails because the "Still no workspaces…" notice appears on the first screen.4. Risk flags
No risk flags fired on #2216. Nothing in the diff touched the watched areas.
5. Independent review
A separate review pass saw only the task and the diff. Its findings, checked against the code:
WorkspaceScreen.jsxhandleRefresh: a Refresh answer that arrives after Back writes its notice into the reset statelanguages/godam.potwas stale, so the translation-template check failsbuild:prodandcomposer pot. The file is no longer part of this PR: develop now runs the POT check only on PRs into main (#2188)disabledwhile loading, and the button unmounts on success, so keyboard focus can drop to the pageReview comment from KMchaudhary (LGTM, two polish notes): the redundant
clearNotice()on the empty path was removed in af8458c. The focus note describes the same pattern Continue and Sign in already have across this onboarding, so no change here.6. Not verified
list_my_organizationsanswer, and whether the service caches an empty list for a short time, were not exercised.7. Scope
One string reworded: the empty-state sentence now ends "then come back here and select Refresh." Added a Contact support link on the same screen, and
SUPPORT_URLinpages/onboarding/utils/constants.js. The picker now defaults to the first workspace of the current list, which is what lets it open with a workspace selected after a Refresh. Nothing else.