Skip to content

feat: add a spinner status bar whileing creating a comment - #1704

Closed
webmagic123 wants to merge 1 commit into
masterfrom
feat/add-a-loading-state-while-comment-is-publishing
Closed

webmagic123 wants to merge 1 commit into
masterfrom
feat/add-a-loading-state-while-comment-is-publishing

Conversation

@webmagic123

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Apr 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
geogenesis Ready Ready Preview Apr 21, 2026 7:10pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Spinner while a comment is being created/edited.
  • Track whether the current publish operation is a create vs edit via publishKind.
  • Improve relatedTarget handling in branchPointerBlurProps by guarding with instanceof 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>

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
<span className="pointer-events-auto">{publishKind === 'edit' ? 'Saving changes…' : 'Comment publishing'}</span>
<span className="pointer-events-auto">{publishKind === 'edit' ? 'Saving changes…' : 'Publishing comment…'}</span>

Copilot uses AI. Check for mistakes.
Comment on lines +179 to 190
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,

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
@jwalkingjew

Copy link
Copy Markdown
Collaborator

Note this PR is no longer needed due to #1700

@ohohoreilly

Copy link
Copy Markdown
Contributor

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.

This branch was successfully deployed

1 active deployment
Preview — 1a18a486 Deployed Apr 21, 2026 by vercel[bot]
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