-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: show pinned posts on individual account page #2779
Conversation
Run & review this pull request in StackBlitz Codeflow. |
✅ Deploy Preview for elk-docs canceled.
|
✅ Deploy Preview for elk-zone ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for adding this! This looks awesome! A few concerns:
|
That's good points.
Probably the first "Show {v} new items" is only shown if a paginator has a bound But I haven't tested the second case "Show origin sites", I'm going to check if it affects the pinned posts (maybe I need to hide that footer in the pinned timeline).
This doesn't look good 😅 Let me try adjusting the position. |
0fa1e7e
to
ec4bdc6
Compare
ec4bdc6
to
5e1a818
Compare
I checked this case but found out I already set The "Show origin sites" text is defined in the
CommonPaginator does not show the slot if engMessage is false : elk/components/common/CommonPaginator.vue Line 113 in 59dda09
|
I think we need this too because I don't see the "see pinned posts" we used to have in the menu when viewing a profile if I remember it correctly.👀 Don't know when we lost that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks like a good PR. I'm no expert when it comes to Vue, however.
I think the paginator should be renamed, but it's a minor quibble. I'm happy to see other people not only agree that pinned posts need to be shown, but that you have the knowledge to implement it and open a PR. I hope @elk-zone approves this or even makes their own implementation.
@elk-zone: Why not approve and merge this PR? It's been waiting for about 7 months.
function reorderAndFilter(items: mastodon.v1.Status[]) { | ||
return reorderedTimeline(items, 'account') | ||
} | ||
const paginator = useMastoClient().v1.accounts.$select(account.id).statuses.list({ limit: 30, excludeReplies: true }) | ||
const pinnedPaginator = useMastoClient().v1.accounts.$select(account.id).statuses.list({ pinned: true }) | ||
const accountPaginator = useMastoClient().v1.accounts.$select(account.id).statuses.list({ limit: 30, excludeReplies: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, I think better names for accountPaginator
would be timelinePaginator
, postPaginator
, or normalPaginator
. Because it's not accounts that are being paginated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for the code review. I agree and updated to the postPaginator
.
✅ Deploy Preview for elk-docs canceled.
|
Sorry for taking too long to update🙏🏻 That's partly because of the limited bandwidth of members who are holding many projects other than Elk. I think it's fine to self-merge this PR at this moment as it's already well-reviewed, and there's no objection to adding support for this feature. |
resolves #305
another attempt inspired by #1921 (by @lazzzis)
Screenshot