You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract the composer's destination checks into useDestinationIssues #415
resources/js/components/posts/composer/PostComposerDialog.vue is about 3,500 lines. The checks that decide whether a destination can be scheduled are plain script with no template, around lines 1309–1487:
destinationIssues(account): media warnings, the Instagram image aspect ratio, text and hashtags over the account's limit, missing required settings, and empty or too long thread replies (with their media).
groupIssues(group) / groupIssueLabel(group): the deduplicated count shown on each network card.
blockingIssue / hasBlockingIssues: what disables the submit button and fills its tooltip.
metaRequirement(account), SET_MEDIA_WARNINGS and setMediaWarning(account).
They depend on composition.resolvedDestination(), props.platformConfigs, and the limit helpers remainingCharacters (~L1032), replyLimit (~L1069) and remainingHashtags (~L1289).
This was left in place on purpose to keep #406 focused.
Proposal
Move these into resources/js/composables/composer/useDestinationIssues.ts, taking the composition and the platform configs as arguments, and move the three limit helpers with them if nothing else in the dialog needs them.
Keep the DestinationIssue type next to the composable.
No behaviour change: the composer browser tests (tests/Browser/PostComposerDialogTest.php, ComposerNetworkCardsTest.php, ComposerChannelSettingsTest.php, ComposerMediaTrayTest.php) must pass untouched.
Activity