From 701790878ad06ee6d542a4dff339ad8292bec585 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Thu, 5 Feb 2026 15:21:30 +0100 Subject: [PATCH 1/6] ci: force npm oidc config --- .github/workflows/publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 098b9a5e..62d49cb9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,9 +35,14 @@ jobs: run: yarn install --immutable - name: Build packages run: yarn build + - name: Prepare npmrc for OIDC + run: | + echo "@reflag:registry=https://registry.npmjs.org/" > "${RUNNER_TEMP}/.npmrc" - name: Publish run: yarn lerna publish from-package --no-private --yes env: + NPM_CONFIG_USERCONFIG: "${{ runner.temp }}/.npmrc" + NODE_AUTH_TOKEN: "" NPM_CONFIG_PROVENANCE: "true" NPM_CONFIG_ACCESS: "public" - name: Build docs From a0188527f6778174d23a4ca72784d7d6dbfaaf7d Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Thu, 5 Feb 2026 15:22:40 +0100 Subject: [PATCH 2/6] Revert "ci: force npm oidc config" This reverts commit 701790878ad06ee6d542a4dff339ad8292bec585. --- .github/workflows/publish.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 62d49cb9..098b9a5e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,14 +35,9 @@ jobs: run: yarn install --immutable - name: Build packages run: yarn build - - name: Prepare npmrc for OIDC - run: | - echo "@reflag:registry=https://registry.npmjs.org/" > "${RUNNER_TEMP}/.npmrc" - name: Publish run: yarn lerna publish from-package --no-private --yes env: - NPM_CONFIG_USERCONFIG: "${{ runner.temp }}/.npmrc" - NODE_AUTH_TOKEN: "" NPM_CONFIG_PROVENANCE: "true" NPM_CONFIG_ACCESS: "public" - name: Build docs From 1bdd5d5a5bbc5227e789274569fbeaa9261efa8a Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Thu, 5 Feb 2026 15:22:52 +0100 Subject: [PATCH 3/6] ci: clear NODE_AUTH_TOKEN for npm publish --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 098b9a5e..2db6b40b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,6 +38,7 @@ jobs: - name: Publish run: yarn lerna publish from-package --no-private --yes env: + NODE_AUTH_TOKEN: "" NPM_CONFIG_PROVENANCE: "true" NPM_CONFIG_ACCESS: "public" - name: Build docs From 96c57cc17efcbe839a6c9cbb5beceaa721de4865 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Mon, 9 Feb 2026 21:01:57 +0100 Subject: [PATCH 4/6] Adjust dialog open styles --- .../src/feedback/ui/FeedbackDialog.css | 1 + packages/browser-sdk/src/ui/Dialog.css | 6 +- packages/browser-sdk/src/ui/Dialog.tsx | 94 ++++++++++++++----- .../test/e2e/feedback-widget.browser.spec.ts | 92 ++++++++++++++++-- 4 files changed, 161 insertions(+), 32 deletions(-) diff --git a/packages/browser-sdk/src/feedback/ui/FeedbackDialog.css b/packages/browser-sdk/src/feedback/ui/FeedbackDialog.css index 0de0c6a4..117aa074 100644 --- a/packages/browser-sdk/src/feedback/ui/FeedbackDialog.css +++ b/packages/browser-sdk/src/feedback/ui/FeedbackDialog.css @@ -1,6 +1,7 @@ .dialog { position: fixed; width: 210px; + overflow: visible; padding: 16px 22px 10px; font-size: var(--reflag-feedback-dialog-font-size, 1rem); font-family: var( diff --git a/packages/browser-sdk/src/ui/Dialog.css b/packages/browser-sdk/src/ui/Dialog.css index e88767f8..c979e1d1 100644 --- a/packages/browser-sdk/src/ui/Dialog.css +++ b/packages/browser-sdk/src/ui/Dialog.css @@ -42,7 +42,7 @@ margin: auto; margin-top: 4rem; - &[open] { + &.open { animation: /* easeOutQuint */ scale 100ms cubic-bezier(0.22, 1, 0.36, 1), fade 100ms cubic-bezier(0.22, 1, 0.36, 1); @@ -59,7 +59,7 @@ position: absolute; margin: 0; - &[open] { + &.open { animation: /* easeOutQuint */ scale 100ms cubic-bezier(0.22, 1, 0.36, 1), fade 100ms cubic-bezier(0.22, 1, 0.36, 1); @@ -92,7 +92,7 @@ /* Unanchored */ -.dialog[open].unanchored { +.dialog.open.unanchored { &.unanchored-bottom-left, &.unanchored-bottom-right { animation: /* easeOutQuint */ diff --git a/packages/browser-sdk/src/ui/Dialog.tsx b/packages/browser-sdk/src/ui/Dialog.tsx index 83bd1ee9..64b0b85b 100644 --- a/packages/browser-sdk/src/ui/Dialog.tsx +++ b/packages/browser-sdk/src/ui/Dialog.tsx @@ -81,7 +81,7 @@ export const Dialog: FunctionComponent = ({ showArrow = true, }) => { const arrowRef = useRef(null); - const dialogRef = useRef(null); + const dialogRef = useRef(null); const anchor = position.type === "POPOVER" ? position.anchor : null; const placement = @@ -173,23 +173,56 @@ export const Dialog: FunctionComponent = ({ // eslint-disable-next-line react-hooks/exhaustive-deps -- anchor only exists in popover }, [position.type, close, (position as any).anchor, dismiss, containerId]); - function setDiagRef(node: HTMLDialogElement | null) { + function setDiagRef(node: HTMLElement | null) { refs.setFloating(node); dialogRef.current = node; } useEffect(() => { if (!dialogRef.current) return; - if (isOpen && !dialogRef.current.hasAttribute("open")) { - dialogRef.current[position.type === "MODAL" ? "showModal" : "show"](); + + const isPopoverOpen = () => { + try { + return dialogRef.current?.matches(":popover-open") ?? false; + } catch { + return false; + } + }; + + const isModalOpen = + dialogRef.current instanceof HTMLDialogElement && + dialogRef.current.hasAttribute("open"); + + if ( + isOpen && + ((position.type === "MODAL" && !isModalOpen) || + (position.type !== "MODAL" && !isPopoverOpen())) + ) { + if ( + position.type === "MODAL" && + dialogRef.current instanceof HTMLDialogElement + ) { + dialogRef.current.showModal(); + } else { + dialogRef.current.showPopover(); + } } - if (!isOpen && dialogRef.current.hasAttribute("open")) { - dialogRef.current.close(); + if (!isOpen) { + if ( + position.type === "MODAL" && + dialogRef.current instanceof HTMLDialogElement && + dialogRef.current.hasAttribute("open") + ) { + dialogRef.current.close(); + } else if (position.type !== "MODAL" && isPopoverOpen()) { + dialogRef.current.hidePopover(); + } } }, [dialogRef, isOpen, position.type]); const classes = [ "dialog", + isOpen ? "open" : "", position.type === "MODAL" ? "modal" : position.type === "POPOVER" @@ -201,21 +234,40 @@ export const Dialog: FunctionComponent = ({ return ( <>