From 9603d421b6b15dafe3d66176f27ee9aeb3f4c72c Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 13 Apr 2026 11:45:32 -0700 Subject: [PATCH] feat: community publish modals -- focus traps, aria-live, plan + outcome forms --- .../src/components/CommunityFeedPanel.vue | 34 ++ .../src/components/PublishOutcomeModal.vue | 363 ++++++++++++++++++ frontend/src/components/PublishPlanModal.vue | 306 +++++++++++++++ frontend/src/stores/community.ts | 20 + 4 files changed, 723 insertions(+) create mode 100644 frontend/src/components/PublishOutcomeModal.vue create mode 100644 frontend/src/components/PublishPlanModal.vue diff --git a/frontend/src/components/CommunityFeedPanel.vue b/frontend/src/components/CommunityFeedPanel.vue index e941e8c..4b9db11 100644 --- a/frontend/src/components/CommunityFeedPanel.vue +++ b/frontend/src/components/CommunityFeedPanel.vue @@ -15,6 +15,17 @@ >{{ f.label }} + +
+ +
+
+ + +
@@ -91,6 +110,7 @@ import { ref, onMounted } from 'vue' import { useCommunityStore } from '../stores/community' import CommunityPostCard from './CommunityPostCard.vue' +import PublishPlanModal from './PublishPlanModal.vue' const emit = defineEmits<{ 'plan-forked': [payload: { plan_id: number; week_start: string }] @@ -99,6 +119,7 @@ const emit = defineEmits<{ const store = useCommunityStore() const activeFilter = ref('all') +const showPublishPlan = ref(false) const filters = [ { id: 'all', label: 'All' }, @@ -160,6 +181,11 @@ async function handleFork(slug: string) { } } +function onPlanPublished(_payload: { slug: string }) { + showPublishPlan.value = false + store.fetchPosts(activeFilter.value === 'all' ? undefined : activeFilter.value) +} + onMounted(async () => { if (store.posts.length === 0) { await store.fetchPosts() @@ -182,6 +208,14 @@ onMounted(async () => { border-bottom: none; } +.action-row { + padding: var(--spacing-xs) 0; +} + +.share-plan-btn { + font-size: var(--font-size-xs); +} + /* Loading skeletons */ .skeleton-card { background: var(--color-bg-card); diff --git a/frontend/src/components/PublishOutcomeModal.vue b/frontend/src/components/PublishOutcomeModal.vue new file mode 100644 index 0000000..b1810d1 --- /dev/null +++ b/frontend/src/components/PublishOutcomeModal.vue @@ -0,0 +1,363 @@ +