Skip to content

Add OlPopover Lit web component#12126

Open
lokesh wants to merge 11 commits intointernetarchive:masterfrom
lokesh:web-component-popover
Open

Add OlPopover Lit web component#12126
lokesh wants to merge 11 commits intointernetarchive:masterfrom
lokesh:web-component-popover

Conversation

@lokesh
Copy link
Collaborator

@lokesh lokesh commented Mar 18, 2026

Adds a reusable popover component.
This component will be utilized in our upcoming inline editing feature. In this PR it is demoed on the developers/design page.

<ol-popover>
    <button slot="trigger">Open</button>
    <div>Popover content here</div>
</ol-popover>

Technical

  • Adds ol-popover, a reusable Lit popover component with fixed positioning, viewport-aware flip/shift, mobile bottom tray w/drag to close support, focus trapping, and animated open/close
  • Adds a popover demo section to the design pattern library page (/developers/design)

Testing

  • Visit /developers/design and verify the popover demos render and open/close correctly
  • Test placement options (bottom-start, top-center) flip when near viewport edges
  • Test on mobile viewport — popover should appear as a bottom tray with backdrop
  • Test keyboard: Escape closes, Tab traps focus inside the popover
  • Make sure the carousel and the read it later dropdown z-index-es render correctly, in particular, test scrolling them under the sticky page header.

Screenshots

popover-desktop.mp4
popover-mobile.mp4

Stakeholders

@mekarpeles @cdrini @jimchamp

lokesh and others added 10 commits March 18, 2026 09:18
Add a reusable popover component (ol-popover) with fixed positioning,
viewport-aware flipping/shifting, mobile bottom tray, focus trapping,
and animated open/close with reduced-motion support. Includes demo
section on the design pattern library page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove flex layout that was causing all design pattern sections to
render side-by-side. Add max-width, overflow handling on code blocks,
and drop the unused .design-pattern__header fixed-width column.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove z-index from #test-body-mobile so fixed-position overlays
(popover backdrop, panels) can render above the sticky header on
mobile. Add isolation:isolate to carousel and dropper components
to contain their internal z-index layers. Adjust popover backdrop
opacity to 0.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts in lit/index.js, design.html, and page-design.css:
- Keep both popover and chip exports
- Integrate popover demo into upstream's redesigned design page layout
- Retain upstream's nav/layout CSS additions

Also update design page: add Popover to side nav, rename to
"Web Component Library", remove Components heading, adjust nav padding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Applies a 2px backdrop-filter blur to the mobile tray overlay,
transitioning alongside opacity for a polished feel. Includes
-webkit-backdrop-filter for iOS Safari support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lokesh lokesh force-pushed the web-component-popover branch from 40d66c5 to 910fcf3 Compare March 23, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants