Repository navigation
feat(keystatic): support configurable post-save publish notice in UI config (#1643) - #1659
Open
thinhnx128 wants to merge 1 commit into
Open
thinhnx128 wants to merge 1 commit into
thinhnx128 wants to merge 1 commit into
Conversation
…allback (Thinkmill#1643) Signed-off-by: Xuan Thinh <thinhnx128@users.noreply.github.com>
🦋 Changeset detectedLatest commit: d981685 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This branch has not been deployed
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
Adds an optional
ui.publishNoticeconfiguration in@keystatic/core(packages/keystatic/src/config.tsx) and renders a dismissibleNoticebanner inpackages/keystatic/src/app/updating.tsxafter an entry is saved.Root Cause
Projects using Keystatic with CI/CD pipelines (such as GitHub Actions or scheduled static builds) had no built-in way to inform editors after clicking Save that their changes require a background deployment before appearing on the live site.
Changes
packages/keystatic/src/config.tsx: add optionalpublishNotice(string | { message: string; tone?: "info" | "caution" | "positive" }) toUserInterfaceConfig.packages/keystatic/src/app/updating.tsx: addresolvePublishNoticehelper and render the configured notice whenstate.kind === "updated".packages/keystatic/src/app/updating.test.ts: add unit tests covering string, object, empty, and undefinedpublishNoticeconfigurations..changeset/post-save-publish-notice.md: include patch changeset for@keystatic/core.Testing
pnpm --filter @keystatic/core test packages/keystatic/src/app/updating.test.tsFixes #1643