Call the last create-flow action Publish so it reads as putting a rule on the web, not locking it forever.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -593,7 +593,7 @@ function CreateFlowLayoutContent({
|
||||
key: "publish",
|
||||
status: "danger" as const,
|
||||
title:
|
||||
messages.create.reviewAndComplete.publish.finalizeBannerTitle,
|
||||
messages.create.reviewAndComplete.publish.publishBannerTitle,
|
||||
description: publishBannerMessage,
|
||||
onClose: () => setPublishBannerMessage(null),
|
||||
}
|
||||
@@ -956,8 +956,8 @@ function CreateFlowLayoutContent({
|
||||
{isFinalReviewLike
|
||||
? isPublishing
|
||||
? messages.create.reviewAndComplete.publish
|
||||
.finalizeButtonPublishing
|
||||
: footer.finalizeCommunityRule
|
||||
.publishButtonPublishing
|
||||
: footer.publishCommunityRule
|
||||
: getDefaultFooterLabel(currentStep, footer)}
|
||||
</Button>
|
||||
) : null
|
||||
|
||||
@@ -47,7 +47,7 @@ export function useCreateFlowFinalize({
|
||||
/** Session gate return path (`?syncDraft=1`) — differs for `/create/edit-rule` vs `/create/final-review`. */
|
||||
loginReturnPath: string;
|
||||
/**
|
||||
* `undefined` while `/api/auth/session` is in flight — finalize is a no-op
|
||||
* `undefined` while `/api/auth/session` is in flight — publish is a no-op
|
||||
* until it resolves. `null` is a guest (anonymous publish).
|
||||
*/
|
||||
sessionUser: SessionUser | null | undefined;
|
||||
|
||||
@@ -222,7 +222,7 @@ export interface CreateFlowState {
|
||||
*/
|
||||
templateReviewEntryFromCreateFlow?: boolean;
|
||||
/**
|
||||
* When set, **Finalize** and signed-in **Save & Exit** update this published
|
||||
* When set, **Publish** and signed-in **Save & Exit** update this published
|
||||
* rule (PATCH) instead of POSTing a new rule or only saving a draft.
|
||||
*/
|
||||
editingPublishedRuleId?: string;
|
||||
|
||||
@@ -10,8 +10,8 @@ type FooterMessages = typeof footerMessages;
|
||||
* from this map fall back to `footer.next`.
|
||||
*
|
||||
* `final-review` is handled separately by the caller because its label
|
||||
* also depends on the in-flight publish flag (`finalizeButtonPublishing`
|
||||
* vs `finalizeCommunityRule`).
|
||||
* also depends on the in-flight publish flag (`publishButtonPublishing`
|
||||
* vs `publishCommunityRule`).
|
||||
*/
|
||||
const DEFAULT_FOOTER_LABEL_BY_STEP: ReadonlyMap<
|
||||
CreateFlowStep,
|
||||
|
||||
@@ -202,7 +202,7 @@ export const TEMPLATE_REVIEW_FROM_CREATE_FLOW_VALUE = "1" as const;
|
||||
export const TEMPLATES_FACET_RECOMMEND_QUERY = "recommendTemplates" as const;
|
||||
export const TEMPLATES_FACET_RECOMMEND_VALUE = "1" as const;
|
||||
|
||||
/** `/create/completed?celebrate=1` — post-finalize toast; set only after **initial** POST publish, not PATCH updates. */
|
||||
/** `/create/completed?celebrate=1` — post-publish toast; set only after **initial** POST publish, not PATCH updates. */
|
||||
export const CREATE_FLOW_COMPLETED_CELEBRATE_QUERY = "celebrate" as const;
|
||||
export const CREATE_FLOW_COMPLETED_CELEBRATE_VALUE = "1" as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user