Conversation
The toolbar switch treated any direct landing on /edit as an implicit opt-out, clobbering the persisted nx2:ew-user-enabled flag even when Sidekick's Edit button (not the user) put you there. It's now only hidden in that case, and the profile-menu switch stays available so there's always a way to turn the flag off. Fixes adobe/da-live#1289.
The toolbar switch already never renders on /canvas, so the menu switch's extra /canvas path check was redundant.
4 tasks
| if (!this._userEnabled) return nothing; | ||
| } else if (window.location.pathname !== '/edit' || this._userEnabled) { | ||
| return nothing; | ||
| } |
Contributor
There was a problem hiding this comment.
Maybe we can clean it up here slightly since we now have multiple if with different patterns, and all returning nothing
Contributor
Author
There was a problem hiding this comment.
that is already the "short" version. my friend claude came up with more if/else before. will have a look.
Contributor
Author
There was a problem hiding this comment.
Cleaned this up in 6a5bf11 — replaced the mixed if/else-if with two named showMenu/showToolbar conditions and a single guard clause.
Replaces the mixed if/else-if (one nested, one negated condition, both eventually returning nothing) with two explicit showMenu/ showToolbar booleans and a single guard clause.
anfibiacreativa
previously approved these changes
Sep 2, 2026
sharanyavinod
previously approved these changes
Sep 2, 2026
mhaack
dismissed stale reviews from anfibiacreativa and sharanyavinod
via
September 4, 2026 14:30
4a13c0c
anfibiacreativa
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
connectedCallback's implicit-choice sync used to clearnx2:ew-user-enabledwhenever you landed directly on/edit— including when Sidekick's "Edit" button (not the user) put you there. Now only the/canvasopt-in sync remains./editwhen the flag is already on (instead of clearing it), since showing it in a misleading "off" state doesn't make sense once/editredirects away anyway.Companion fix for adobe/da-live#1289 — pair with the da-live redirect PR.
Related Issue
adobe/da-live#1289
How Has This Been Tested?
Combine with the da-live
ewredirbranch via the?nx=togglefixoverride:https://ewredir--da-live--adobe.aem.live/edit?nx=togglefix#/aem-sandbox/block-collection/drafts/shsteimer/testing
/edit, or profile menu on/canvas)./edit#...URL above directly (simulating Sidekick bouncing you back) — the flag stays on and you're redirected straight back to/canvasinstead of landing on the old editor with the switch cleared.Full test suite (96 files) passes locally.