Skip to content

Conversation

@yafred
Copy link
Contributor

@yafred yafred commented Jan 6, 2025

This is a proposition for issue #15995 where changes are minimum

  • an optional boolean field in ublog_post collection
  • no change in the way recent posts are displayed (just a decoration for the sticky posts)

Toggle 'Sticky post' in your blog post

image

And your post will appear first in your profile

image

and in your coach page (if you are a coach)

image

@yafred yafred marked this pull request as ready for review January 6, 2025 18:43
@schlawg
Copy link
Contributor

schlawg commented Jan 10, 2025

i like it. could it be confusing mixing sticky ones into the recency list without any visual clarification tho?

@yafred
Copy link
Contributor Author

yafred commented Jan 10, 2025

i like it. could it be confusing mixing sticky ones into the recency list without any visual clarification tho?

I agree, I went for something very simple (the green border) that was already available to me.
I thought it would be better to add a icon to the top right of the card showing a pin.
Before going there I wanted to test the water.
If the idea of mixing the sticky posts and the recent posts is acceptable, we just have to find the best way to make it extra clear to the user.
Let me think a bit more ... all suggestions are welcome

Note that, in my opinion, the visual clarification is mainly for the author of the post. I don't think the users visiting the profile will care about it: they will see the posts in the order the author decided.

@yafred
Copy link
Contributor Author

yafred commented Jan 10, 2025

I suggest to use a star positioned where the author's link is (as the author link is not shown on the posts when you look at their profile).

The star + the green border should make the sticky post stand out

image

@schlawg
Copy link
Contributor

schlawg commented Jan 12, 2025

it looks like github removed the :lgtm: jesus emoji. 😭

0 0 20px $c-link;
}

&--sticky {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know it's everywhere in our code, but using parent selector to glue names is bad for searchability, which means it is just bad.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's just an opinion, i'm not suggesting you rewrite all of our scss here! 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap, I just copied the &--link above

I think I'll leave it like that for the time being.
Is there a discussion somewhere about the best practices to adopt when working with scss ?

@ornicar ornicar merged commit 8d76689 into lichess-org:master Jan 13, 2025
5 checks passed
@yafred yafred deleted the feature-15995-pinned-posts branch January 13, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants