Repository navigation
feat: add a spinner status bar whileing creating a comment - #1704
webmagic123 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3f149ef to
1a18a48
Compare
There was a problem hiding this comment.
Pull request overview
Adds a fixed “publishing” status bar with a spinner during comment create/edit actions in the web comments UI, and tightens related pointer/blur handling.
Changes:
- Import and render a fixed bottom status bar with
Spinnerwhile a comment is being created/edited. - Track whether the current publish operation is a create vs edit via
publishKind. - Improve
relatedTargethandling inbranchPointerBlurPropsby guarding withinstanceof Node.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| aria-busy | ||
| > | ||
| <Spinner /> | ||
| <span className="pointer-events-auto">{publishKind === 'edit' ? 'Saving changes…' : 'Comment publishing'}</span> |
There was a problem hiding this comment.
The create-case status text reads "Comment publishing" while the edit-case uses a full phrase with an ellipsis. For consistency and clearer screen-reader output, update this to a complete phrase (e.g. "Publishing comment…"), and consider adding the ellipsis here as well.
| <span className="pointer-events-auto">{publishKind === 'edit' ? 'Saving changes…' : 'Comment publishing'}</span> | |
| <span className="pointer-events-auto">{publishKind === 'edit' ? 'Saving changes…' : 'Publishing comment…'}</span> |
| const [publishKind, setPublishKind] = React.useState<null | 'create' | 'edit'>(null); | ||
|
|
||
| React.useEffect(() => { | ||
| if (!isCreating && publishKind !== null) { | ||
| setPublishKind(null); | ||
| } | ||
| }, [isCreating, publishKind]); | ||
|
|
||
| const handleCreateComment = (text: string, ancestorComments?: Array<{ id: string; spaceId: string }>) => { | ||
| createComment({ | ||
| setPublishKind('create'); | ||
| void createComment({ | ||
| text, |
There was a problem hiding this comment.
publishKind is set before calling createComment/editComment, but those functions can return early (e.g., wallet not connected / onboarding required) without ever setting isCreating to true. That will cause the fixed-bottom status bar to flash briefly even though no publish is happening. Consider only rendering the status bar when isCreating is true (or set publishKind only after the mutation actually starts).
|
Note this PR is no longer needed due to #1700 |
|
Closing as part of a sweep of the open-PR queue. Not a judgement on the work — reopen if you still want it and I will help get it current. Opened 2026-04-21 and now conflicting with master. At this distance a rebase is usually more work than redoing the change against current code, and the surrounding code has moved a long way underneath "feat: add a spinner status bar whileing creating a comment". @webmagic123 — if the idea still stands but the branch does not, a fresh PR or a ticket is probably a better route than reviving this one. Nothing is discarded: the branch and its history remain, and reopening costs a click. Context: 74 PRs were open, 25 older than two months, the oldest from February. The point is to make the queue mean something so genuinely ready work is visible rather than buried — #2449 sat ready for three days this week partly because of the noise. Only non-draft, conflicting PRs are in scope; drafts and anything still mergeable are being left alone. |
No description provided.