Add pinned statuses to profile#32
Merged
Merged
Conversation
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.
Adds pinned-statuses support to profile pages (read-side). Most-recently-pinned post renders as a full
Statuswith a "Pinned" indicator; additional pins (up to 5 total, per Mastodon) appear in a compact row below. Plus two polish fixes toStatus.vuespacing that surfaced during review.Pinned section
Status(readable long-form text). If there are 2–5 pins, the rest appear as small preview cards below. Avoids the 5-stacked-posts scroll problem while respecting user curation.Added
packages/api/src/composables/queries/useAccountData.ts—getAccountPinnedStatuses(acct)callsaccounts.statuses.list({ pinned: true, limit: 5 }).packages/api/src/composables/useAccount.ts— extended mobile composable withpinnedStatusesref, fetched in parallel with recent statuses viaPromise.all.packages/api/src/mock/handlers/accounts.ts— mock handler supports?pinned=true.packages/api/src/mock/fixtures/statuses.ts— jane@ has 3 pins, sarah@ has 1, so overflow-row and single-pin cases are both testable in mock mode.packages/ui/src/components/status/Status.vue—isPinnedprop. Renders a pushpin-icon header row using the same slot as the reblog indicator.packages/ui/src/components/status/PinnedOverflowCard.vue— compact card (~220px) with pushpin micro-label, 3-line content excerpt, media count indicator. Accepts aclassprop so the parent controls width.packages/ui/src/components/status/PinnedSection.vue— coordinates primary + overflow, forwards all Status action events.apps/web/app/components/ProfilePinnedSection.vue— thin wrapper that wiresuseWebActions(mirror ofStatusTimeline.vue's pattern).apps/web/app/pages/@[acct]/index.vue— fetches pinned + chronological in parallel, dedupes, renders both.apps/mobile/src/pages/Profile.vue— dedupe + render; mobile has no tabs so pins sit above the flat list.Polish fixes to Status.vue
Surfaced while staring at the pinned section, but affect every feed:
StatusActions'sButtonActionaddspb-2(8px) for tap-target extension, which meant the visual gap below the action icons was 20px while the gap above the display name was only 12px. Changed the content column frompy-3topt-3 pb-1when actions render (preservedpb-3whenhideActions=truefor thread ancestors). Top and bottom now both visually 12px.hasIndicatoris true, content column's top padding drops frompt-3topt-1(4px), matching Twitter/Bluesky's tight caption-style spacing.Out of scope