fix(posts): drop redundant 'publishing' toast on publish#40
Merged
Conversation
Show.vue already renders a full-screen overlay with spinner + the same 'post is being published' messaging while post.status === 'publishing'. The flash toast was saying the same thing transiently — duplicate UX that also contributed to the visual noise as Echo events triggered partial reloads. - Remove session()->flash() for the Publishing action in PostController - Drop the now-orphan 'flash.publishing' key from en/pt-BR/es Scheduled-action flash kept (Show.vue has no equivalent overlay for it).
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.
Why
When you publish a post, you land on Show.vue which already renders a full-screen overlay (`isPublishing` block — spinner + 'Seu post está sendo publicado' + subtitle) while `post.status === 'publishing'`. The flash toast was saying the same thing transiently, adding visual noise.
Compounding this: each platform job emits 2+ Echo broadcasts during publish (`PostPlatformStatusUpdated`), and Show.vue's listener does `router.visit({ only: ['post'] })` per event. Multiple partial reloads make the page feel busy. Removing the toast won't fix the over-broadcasting (that's a separate concern — see below), but it removes the redundant signal that was the visible irritation.
Changes
Follow-up (not in this PR)
The over-broadcasting in `PublishToSocialPlatform` (6 `broadcastStatus()` call sites, ~2 broadcasts per platform in the happy path) causes N partial reloads on the frontend per publish. Fix ideas:
Notifications module is already gated to fire once per post (only when all platforms finish — see `PublishToSocialPlatform::updatePostStatus` lines 217-219), so that part is fine.
Test plan