Skip to content

feat: panel refinements - toggles, no WCs, persistence#315

Open
auniverseaway wants to merge 1 commit intoew-panelsfrom
nx2fixes
Open

feat: panel refinements - toggles, no WCs, persistence#315
auniverseaway wants to merge 1 commit intoew-panelsfrom
nx2fixes

Conversation

@auniverseaway
Copy link
Copy Markdown
Member

@auniverseaway auniverseaway commented Apr 4, 2026

  • Remove Lit-based nx-panel block (panel.js/panel.css) in favor of
    utils/panel.js with plain DOM createPanel/showPanel/hidePanel functions
  • Move panel styles from shadow DOM CSS to global styles.css
  • Add action-button block to toggle before/after panels via fragments
  • Extract api.js with daFetch (auth-aware), ping, source, list, signout
  • Rewrite utils.js: environment-aware DA service origins via getEnv,
    improved parseWindowPath (returns null for invalid, strips /index)
  • CSS: replace JS-added classes (spectrum-edge, app-frame) with
    meta-content attribute selectors
  • Simplify profile color scheme toggle, import signout from api.js
  • Add unit tests for utils (parseWindowPath, getEnv, loadStyle) and
    test mocks (IMS, CSS)
  • Panel-aware default-content max-width when side panels are visible

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Panels

https://nx2fixes--da-nx--adobe.aem.page/drafts/cmillar/panels

DA.LIVE prod + this NX2 PR + NX1

https://main--da-live--adobe.aem.live/?nx=nx2fixes
Expectation: this works E2E

DA.LIVE stage + this NX2 PR + NX2

https://dasites--da-live--adobe.aem.page/?nx=nx2fixes&nxver=2
Expectation: only da homepage works, but is correctly styled

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync bot commented Apr 4, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@auniverseaway auniverseaway changed the base branch from main to ew-panels April 5, 2026 05:42
@auniverseaway auniverseaway changed the title refactor: nx2 env config, API layer, CSS selectors, and tests feat: replace panel web component with plain DOM utils, extract API layer Apr 5, 2026
@auniverseaway
Copy link
Copy Markdown
Member Author

auniverseaway commented Apr 5, 2026

@hannessolo I really love the approach to panels. Two things about this PR:

  1. I made some small tweaks to the panel implementation...
    1. You can trigger by link (i.e. button)
    2. I think this is a base-level feature, so moved the styles into styles.css.
    3. I moved us away from the web component as it seemed a bit redundant and I'm worried that we'll get into shadow dom query selector hell later down the road.
  2. I'm combining this my other relatively foundational PR. I removed the unrelated changes. This is now only the updates required for the panels.

Hopefully this works for you!

@auniverseaway auniverseaway changed the title feat: replace panel web component with plain DOM utils, extract API layer feat: panel refinements - toggles, no WCs, persistence Apr 6, 2026
@auniverseaway
Copy link
Copy Markdown
Member Author

Some non-critical open questions / comments:

We could easily ditch the fragments in favor of just loading a block directly. We would lose flexibility in that we could associate different blocks in authoring without a release, but I'm not sure we would actually use this. We may want to slice this differently anyway...

It seems like we pretty much know what we want each panel to always be:

  1. left panel - chat
  2. right panel - auxilary features (browse, recents, etc.)

I think this is good for now. Later down the road we may want to allow different views to determine what panels they get. This will be especially true if the auxilery panel becomes a nightmare to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant