mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-27 10:57:43 +02:00
feat(community,feedback): +5 reward chip + Phase 3.F legacy-cleanup
UI:
- FeedbackQuickModal Success-State + Onboarding-Wish Confirm zeigen
+5-Mana-Reward-Chip mit reward-in-Animation. Sofortiger Sichtbarer
Reziprozitäts-Loop.
Legacy-Cleanup (Phase 3.F):
- @mana/feedback dropped:
- FeedbackPage.svelte, FeedbackCard.svelte, FeedbackList.svelte,
FeedbackForm.svelte, VoteButton.svelte, StatusBadge.svelte
(alles Pre-Reactions-Markup, durch Community-Modul ersetzt)
- vote/unvote/toggleVote/getPublicFeedback service-shims
- VoteResponse, voteCount, userHasVoted Types
- mana-web dropped:
- lib/modules/feedback/ListView.svelte
- routes/(app)/feedback/+page.svelte
- app-registry-Eintrag 'feedback' (nur Bug-Reports — Community macht
das ohnehin besser via /community)
Pre-launch saubere Lösung: keine Backward-Compat-Shims, keine alten
Markup-Reste. ReactionBar bleibt der einzige Voting-Surface, /community
ist die einzige Feedback-Surface.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dbe24acfc4
commit
eecf64c1c6
15 changed files with 90 additions and 1017 deletions
|
|
@ -16,7 +16,6 @@ import type {
|
|||
ReactionResponse,
|
||||
AdminPatchInput,
|
||||
ReactInput,
|
||||
VoteResponse,
|
||||
} from './api';
|
||||
import type { FeedbackServiceConfig } from './types';
|
||||
import type { PublicFeedbackItem, ReactionEmoji } from './feedback';
|
||||
|
|
@ -148,27 +147,6 @@ export function createFeedbackService(config: FeedbackServiceConfig) {
|
|||
});
|
||||
}
|
||||
|
||||
// ── Legacy (back-compat shims) ─────────────────────────────────
|
||||
// Older callers still use vote/unvote — translate to 👍-reaction toggles.
|
||||
|
||||
async function vote(feedbackId: string): Promise<VoteResponse> {
|
||||
const res = await toggleReaction(feedbackId, '👍');
|
||||
return {
|
||||
success: true,
|
||||
newVoteCount: res.reactions['👍'] ?? 0,
|
||||
userHasVoted: res.userHasReacted,
|
||||
};
|
||||
}
|
||||
const unvote = vote; // toggle, semantically idempotent for legacy callers
|
||||
async function toggleVote(feedbackId: string): Promise<VoteResponse> {
|
||||
return vote(feedbackId);
|
||||
}
|
||||
|
||||
async function getPublicFeedback(query?: FeedbackQueryParams): Promise<FeedbackListResponse> {
|
||||
const items = await getPublicFeed(query);
|
||||
return { items: items as unknown as FeedbackListResponse['items'] };
|
||||
}
|
||||
|
||||
return {
|
||||
createFeedback,
|
||||
getPublicFeed,
|
||||
|
|
@ -180,11 +158,6 @@ export function createFeedbackService(config: FeedbackServiceConfig) {
|
|||
deleteFeedback,
|
||||
adminListAll,
|
||||
adminPatch,
|
||||
// Legacy (deprecated):
|
||||
getPublicFeedback,
|
||||
vote,
|
||||
unvote,
|
||||
toggleVote,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue