Skip to content

Comments

feat: disable Update Pages button while a deployment is in progress#1057

Open
jwartofsky-yext wants to merge 15 commits intomainfrom
disableUpdatePublishDuringDeployment
Open

feat: disable Update Pages button while a deployment is in progress#1057
jwartofsky-yext wants to merge 15 commits intomainfrom
disableUpdatePublishDuringDeployment

Conversation

@jwartofsky-yext
Copy link
Contributor

@jwartofsky-yext jwartofsky-yext commented Feb 23, 2026

Disables the update pages button while a deployment is in progress.

image

Disables the update pages button while a deployment is in progress.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functionality to disable the "Update Pages" button when a deployment is in progress, preventing users from attempting updates during active deployments.

Changes:

  • Added deploymentInProgress boolean field to the TemplateMetadata type
  • Updated LayoutHeader component to check deployment status and disable the publish button with an appropriate tooltip message
  • Added translations for the deployment-in-progress message across all 25 supported locales

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

File Description
packages/visual-editor/src/internal/types/templateMetadata.ts Added deploymentInProgress boolean field to TemplateMetadata type and its generator function
packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx Updated publish button logic to check deployment status, refactored tooltip/disabled logic to handle both error and deployment states
packages/visual-editor/locales/platform/*/visual-editor.json Added publishBlocked.deploymentInProgress translation key for all 25 supported locales

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a boolean deploymentInProgress to TemplateMetadata, propagates it to ThemeHeader/LayoutHeader and InternalThemeEditor, and uses it to disable the publish/update control. When deploymentInProgress is true the update control is disabled and a tooltip shows a localized publishBlocked.deploymentInProgress message. Also updates capitalization of several publishError messages and adds publishBlocked.deploymentInProgress entries across multiple platform locale files. No existing behavior is removed.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as ThemeHeader / LayoutHeader
    participant Metadata as TemplateMetadata (store)
    participant I18n as Localization

    User->>UI: hover or click "Update"/"Publish"
    UI->>Metadata: read deploymentInProgress
    alt deploymentInProgress == true
        UI->>I18n: request publishBlocked.deploymentInProgress
        I18n-->>UI: localized deployment-in-progress message
        UI-->>User: disabled control + show tooltip message
    else deploymentInProgress == false
        UI->>UI: compute publishDisabled (histories/errors)
        alt publishDisabled == true
            UI->>I18n: request relevant publishError message
            I18n-->>UI: localized error message
            UI-->>User: disabled control + show tooltip
        else
            UI-->>User: enabled publish action
        end
    end
Loading

Possibly related PRs

Suggested labels

create-dev-release

Suggested reviewers

  • mkilpatrick
  • briantstephan
  • benlife5
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main feature: disabling the Update Pages button during deployment, which aligns perfectly with the changeset's core functionality.
Description check ✅ Passed The PR description clearly describes the feature: disabling the Update Pages button during deployment, supported by a relevant screenshot showing the disabled state and tooltip message.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch disableUpdatePublishDuringDeployment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/visual-editor/locales/platform/de/visual-editor.json`:
- Around line 552-554: Update the translation for the key
publishBlocked.deploymentInProgress so it explicitly references the "Seite
aktualisieren" action (e.g., "Die Aktion 'Seite aktualisieren' ist während der
Bereitstellung deaktiviert" or "Die Schaltfläche 'Seite aktualisieren' ist
während der Bereitstellung deaktiviert") to match the UI label; modify the value
for publishBlocked.deploymentInProgress in visual-editor.json accordingly.

In `@packages/visual-editor/locales/platform/et/visual-editor.json`:
- Around line 552-554: The key "publishBlocked"."deploymentInProgress" must be
updated to sentence case and plural to match UI copy: replace the current value
with a sentence-case plural string such as "Värskendused on juurutamise ajal
keelatud." and confirm with a native speaker/localization team; locate the
"publishBlocked" object and its "deploymentInProgress" property in the
visual-editor.json and apply this replacement.

In `@packages/visual-editor/locales/platform/lv/visual-editor.json`:
- Around line 557-559: The translation for publishBlocked.deploymentInProgress
uses the singular "atjauninājums" but should convey updates/publishing in
general; update the string value for the "publishBlocked" ->
"deploymentInProgress" key to use a plural or abstract form (e.g.,
"atjauninājumi ir atspējoti, kamēr notiek izvietošana" or "atjaunināšana ir
atspējota, kamēr notiek izvietošana") and confirm whether the first letter
should be capitalized depending on where the string is rendered in the UI.

In `@packages/visual-editor/locales/platform/nl/visual-editor.json`:
- Around line 552-554: The JSON string for publishBlocked.deploymentInProgress
uses lowercase and the word "implementatie"; change it to sentence case and use
the same term as the "Update Pages" button label (e.g., replace "update" with
the button's verb and "implementatie" with "uitrol" or the project's chosen
term) so the message reads like "Bijwerken is uitgeschakeld terwijl de uitrol
bezig is" or the equivalent that matches the existing button wording; update the
value for the "deploymentInProgress" key under "publishBlocked" accordingly.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b77e21 and fc36164.

📒 Files selected for processing (27)
  • packages/visual-editor/locales/platform/cs/visual-editor.json
  • packages/visual-editor/locales/platform/da/visual-editor.json
  • packages/visual-editor/locales/platform/de/visual-editor.json
  • packages/visual-editor/locales/platform/en-GB/visual-editor.json
  • packages/visual-editor/locales/platform/en/visual-editor.json
  • packages/visual-editor/locales/platform/es/visual-editor.json
  • packages/visual-editor/locales/platform/et/visual-editor.json
  • packages/visual-editor/locales/platform/fi/visual-editor.json
  • packages/visual-editor/locales/platform/fr/visual-editor.json
  • packages/visual-editor/locales/platform/hr/visual-editor.json
  • packages/visual-editor/locales/platform/hu/visual-editor.json
  • packages/visual-editor/locales/platform/it/visual-editor.json
  • packages/visual-editor/locales/platform/ja/visual-editor.json
  • packages/visual-editor/locales/platform/lt/visual-editor.json
  • packages/visual-editor/locales/platform/lv/visual-editor.json
  • packages/visual-editor/locales/platform/nb/visual-editor.json
  • packages/visual-editor/locales/platform/nl/visual-editor.json
  • packages/visual-editor/locales/platform/pl/visual-editor.json
  • packages/visual-editor/locales/platform/pt/visual-editor.json
  • packages/visual-editor/locales/platform/ro/visual-editor.json
  • packages/visual-editor/locales/platform/sk/visual-editor.json
  • packages/visual-editor/locales/platform/sv/visual-editor.json
  • packages/visual-editor/locales/platform/tr/visual-editor.json
  • packages/visual-editor/locales/platform/zh-TW/visual-editor.json
  • packages/visual-editor/locales/platform/zh/visual-editor.json
  • packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx
  • packages/visual-editor/src/internal/types/templateMetadata.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 27 out of 27 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx:281

  • publishDisabled can be true when histories.length === 1, but TooltipContent is only rendered when publishTooltipMessage is truthy. In the histories.length === 1 case this makes the wrapper <span> keyboard-focusable (tabIndex=0) and styled as disabled without providing any tooltip/explanation. Consider driving tabIndex/disabled cursor styling from !!publishTooltipMessage (or adding a tooltip message for the no-changes state) so keyboard users don’t land on a focusable element with no feedback.
                  <span
                    tabIndex={publishDisabled ? 0 : -1}
                    className={publishDisabled ? "ve-cursor-not-allowed" : ""}
                  >
                    <Button

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx`:
- Around line 207-235: The wrapper <span> around the Button needs accessibility
semantics when publishDisabled is true; update the element in ThemeHeader.tsx to
include role="button" and aria-disabled={publishDisabled} so assistive tech
knows it’s disabled, and correct the tabIndex logic so the span is focusable
only when it should be (use tabIndex={!publishDisabled ? 0 : -1}) or remove the
focusable span entirely and let <Button> handle focus; locate the span near the
TooltipTrigger and the onPublishTheme/Button code to apply these changes.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 40a561c and 7b246cf.

📒 Files selected for processing (2)
  • packages/visual-editor/src/internal/components/InternalThemeEditor.tsx
  • packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx

benlife5
benlife5 previously approved these changes Feb 23, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx:137

  • The tooltip message prioritizes deployment status over validation errors. When both deploymentInProgress is true and hasErrors is true, users will only see the deployment message and won't be informed about validation errors. Consider showing both messages or prioritizing validation errors since users can address those immediately, whereas they must wait for deployment to complete. This could lead to confusion when deployment finishes but the button remains disabled due to unresolved validation errors.
  const publishTooltipMessage = deploymentInProgress
    ? pt(
        "publishBlocked.deploymentInProgress",
        "update is disabled while deployment is in progress"
      )
    : hasErrors
      ? getPublishErrorMessage(errorSources, errorDetails)
      : undefined;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx (1)

207-235: ⚠️ Potential issue | 🟡 Minor

Focusable wrapper span still missing accessibility semantics.

When publishDisabled is true, keyboard focus lands on the <span> (the <Button> is unreachable), but the span carries no semantic role or aria-disabled signal. Assistive technology users will encounter a focusable element with no announced purpose.

♿ Suggested fix
 <span
   tabIndex={publishDisabled ? 0 : -1}
+  role={publishDisabled ? "button" : undefined}
+  aria-disabled={publishDisabled || undefined}
   className={publishDisabled ? "ve-cursor-not-allowed" : ""}
 >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx` around
lines 207 - 235, The focusable wrapper <span> in ThemeHeader that becomes
focusable when publishDisabled is true lacks accessibility semantics; update
that span (inside ThemeHeader near the TooltipTrigger/Button block) to include
role="button" and aria-disabled={publishDisabled} (and an appropriate aria-label
if the button text isn't sufficient) so assistive tech recognizes it as a
disabled control, keeping the existing tabIndex logic and visual classes
(ve-cursor-not-allowed / ve-pointer-events-none).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx`:
- Around line 207-235: The focusable wrapper <span> in ThemeHeader that becomes
focusable when publishDisabled is true lacks accessibility semantics; update
that span (inside ThemeHeader near the TooltipTrigger/Button block) to include
role="button" and aria-disabled={publishDisabled} (and an appropriate aria-label
if the button text isn't sufficient) so assistive tech recognizes it as a
disabled control, keeping the existing tabIndex logic and visual classes
(ve-cursor-not-allowed / ve-pointer-events-none).

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b246cf and c896f2b.

📒 Files selected for processing (27)
  • packages/visual-editor/locales/platform/cs/visual-editor.json
  • packages/visual-editor/locales/platform/da/visual-editor.json
  • packages/visual-editor/locales/platform/de/visual-editor.json
  • packages/visual-editor/locales/platform/en-GB/visual-editor.json
  • packages/visual-editor/locales/platform/en/visual-editor.json
  • packages/visual-editor/locales/platform/es/visual-editor.json
  • packages/visual-editor/locales/platform/et/visual-editor.json
  • packages/visual-editor/locales/platform/fi/visual-editor.json
  • packages/visual-editor/locales/platform/fr/visual-editor.json
  • packages/visual-editor/locales/platform/hr/visual-editor.json
  • packages/visual-editor/locales/platform/hu/visual-editor.json
  • packages/visual-editor/locales/platform/it/visual-editor.json
  • packages/visual-editor/locales/platform/ja/visual-editor.json
  • packages/visual-editor/locales/platform/lt/visual-editor.json
  • packages/visual-editor/locales/platform/lv/visual-editor.json
  • packages/visual-editor/locales/platform/nb/visual-editor.json
  • packages/visual-editor/locales/platform/nl/visual-editor.json
  • packages/visual-editor/locales/platform/pl/visual-editor.json
  • packages/visual-editor/locales/platform/pt/visual-editor.json
  • packages/visual-editor/locales/platform/ro/visual-editor.json
  • packages/visual-editor/locales/platform/sk/visual-editor.json
  • packages/visual-editor/locales/platform/sv/visual-editor.json
  • packages/visual-editor/locales/platform/tr/visual-editor.json
  • packages/visual-editor/locales/platform/zh-TW/visual-editor.json
  • packages/visual-editor/locales/platform/zh/visual-editor.json
  • packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx
  • packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/visual-editor/locales/platform/hu/visual-editor.json
  • packages/visual-editor/locales/platform/pl/visual-editor.json
  • packages/visual-editor/locales/platform/it/visual-editor.json
  • packages/visual-editor/locales/platform/pt/visual-editor.json
  • packages/visual-editor/locales/platform/lv/visual-editor.json
  • packages/visual-editor/locales/platform/sk/visual-editor.json
  • packages/visual-editor/locales/platform/tr/visual-editor.json
  • packages/visual-editor/locales/platform/nb/visual-editor.json
  • packages/visual-editor/locales/platform/nl/visual-editor.json
  • packages/visual-editor/locales/platform/es/visual-editor.json
  • packages/visual-editor/locales/platform/ro/visual-editor.json
  • packages/visual-editor/locales/platform/ja/visual-editor.json
  • packages/visual-editor/locales/platform/da/visual-editor.json
  • packages/visual-editor/locales/platform/en-GB/visual-editor.json
  • packages/visual-editor/locales/platform/sv/visual-editor.json
  • packages/visual-editor/locales/platform/lt/visual-editor.json
  • packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx

@mkilpatrick
Copy link
Collaborator

Can you add a screenshot of the button/message and resolve/address all comments

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/visual-editor/locales/platform/lv/visual-editor.json (1)

557-563: ⚠️ Potential issue | 🟡 Minor

Consider using a plural/abstract form for “updates” in Latvian.
Line 558 uses singular Atjauninājums; the UI intent is that updates/publishing are generally disabled.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/locales/platform/lv/visual-editor.json` around lines
557 - 563, The Latvian string for publishBlocked.deploymentInProgress uses the
singular "Atjauninājums"; replace it with a plural/abstract form to match the UI
intent (updates/publishing generally disabled). Locate the JSON key
"publishBlocked" -> "deploymentInProgress" and update its value from
"Atjauninājums ir atspējots, kamēr notiek izvietošana" to a plural/abstract
phrasing such as "Atjauninājumi ir atspējoti, kamēr notiek izvietošana" (or an
equivalent Latvian plural/abstract translation).
🧹 Nitpick comments (1)
packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx (1)

278-298: Optional: avoid a “dead” tab stop when there’s no tooltip text.

When publish is disabled solely due to no changes, publishTooltipMessage is undefined but the wrapper still becomes focusable. Consider gating the wrapper focus/role on the tooltip text so keyboard users don’t land on an inert control.

💡 Possible tweak
-                    tabIndex={publishDisabled ? 0 : -1}
+                    tabIndex={publishTooltipMessage ? 0 : -1}
                     className={publishDisabled ? "ve-cursor-not-allowed" : ""}
-                    role={publishDisabled ? "button" : undefined}
+                    role={publishTooltipMessage ? "button" : undefined}
                     aria-disabled={publishDisabled || undefined}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx` around
lines 278 - 298, The wrapper span currently becomes a focusable/inert control
even when publishTooltipMessage is undefined; update the focus/role/aria
attributes and styling in LayoutHeader (the span that wraps
TooltipTrigger/Button) to only make it focusable and present a disabled role
when there is actual tooltip text: change tabIndex, role, and aria-disabled (and
any classes like "ve-cursor-not-allowed" / "ve-pointer-events-none") to be
conditional on (publishTooltipMessage && publishDisabled) instead of only
publishDisabled so keyboard users won’t land on a dead tab stop when there’s no
tooltip to show.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/visual-editor/locales/platform/lv/visual-editor.json`:
- Around line 557-563: The Latvian string for
publishBlocked.deploymentInProgress uses the singular "Atjauninājums"; replace
it with a plural/abstract form to match the UI intent (updates/publishing
generally disabled). Locate the JSON key "publishBlocked" ->
"deploymentInProgress" and update its value from "Atjauninājums ir atspējots,
kamēr notiek izvietošana" to a plural/abstract phrasing such as "Atjauninājumi
ir atspējoti, kamēr notiek izvietošana" (or an equivalent Latvian
plural/abstract translation).

---

Nitpick comments:
In `@packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx`:
- Around line 278-298: The wrapper span currently becomes a focusable/inert
control even when publishTooltipMessage is undefined; update the focus/role/aria
attributes and styling in LayoutHeader (the span that wraps
TooltipTrigger/Button) to only make it focusable and present a disabled role
when there is actual tooltip text: change tabIndex, role, and aria-disabled (and
any classes like "ve-cursor-not-allowed" / "ve-pointer-events-none") to be
conditional on (publishTooltipMessage && publishDisabled) instead of only
publishDisabled so keyboard users won’t land on a dead tab stop when there’s no
tooltip to show.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c896f2b and 57ec912.

📒 Files selected for processing (24)
  • packages/visual-editor/locales/platform/cs/visual-editor.json
  • packages/visual-editor/locales/platform/da/visual-editor.json
  • packages/visual-editor/locales/platform/en-GB/visual-editor.json
  • packages/visual-editor/locales/platform/en/visual-editor.json
  • packages/visual-editor/locales/platform/es/visual-editor.json
  • packages/visual-editor/locales/platform/et/visual-editor.json
  • packages/visual-editor/locales/platform/fi/visual-editor.json
  • packages/visual-editor/locales/platform/fr/visual-editor.json
  • packages/visual-editor/locales/platform/hr/visual-editor.json
  • packages/visual-editor/locales/platform/hu/visual-editor.json
  • packages/visual-editor/locales/platform/it/visual-editor.json
  • packages/visual-editor/locales/platform/lt/visual-editor.json
  • packages/visual-editor/locales/platform/lv/visual-editor.json
  • packages/visual-editor/locales/platform/nb/visual-editor.json
  • packages/visual-editor/locales/platform/nl/visual-editor.json
  • packages/visual-editor/locales/platform/pl/visual-editor.json
  • packages/visual-editor/locales/platform/pt/visual-editor.json
  • packages/visual-editor/locales/platform/ro/visual-editor.json
  • packages/visual-editor/locales/platform/sk/visual-editor.json
  • packages/visual-editor/locales/platform/sv/visual-editor.json
  • packages/visual-editor/locales/platform/tr/visual-editor.json
  • packages/visual-editor/src/internal/puck/components/LayoutHeader.tsx
  • packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx
  • packages/visual-editor/src/utils/publishErrors.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/visual-editor/src/internal/puck/components/ThemeHeader.tsx
  • packages/visual-editor/locales/platform/it/visual-editor.json
  • packages/visual-editor/locales/platform/tr/visual-editor.json
  • packages/visual-editor/locales/platform/fr/visual-editor.json

Copy link
Collaborator

@mkilpatrick mkilpatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests, otherwise lgtm

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.

4 participants