Skip to content
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

Pinned post inconsistently handled across logged in/out feeds #16508

Open
aitchiss opened this issue Feb 9, 2022 · 3 comments
Open

Pinned post inconsistently handled across logged in/out feeds #16508

aitchiss opened this issue Feb 9, 2022 · 3 comments
Labels
area: homepage homepage and feed bug always open for contribution

Comments

@aitchiss
Copy link
Contributor

aitchiss commented Feb 9, 2022

Describe the bug

When you view any feed timeframes (other than the "Relevant" tab):

  • If you're logged out, the pinned post remains visible at the top as "pinned", when we expect it not to be.
  • If you're logged in, the pinned post isn't visible as "pinned" but it's also just completely gone from the feed, when we'd expect to fall in it's natural order

To Reproduce

The easiest way to reproduce this would be:

  • Create a new post, and pin it (you'll need to be logged in as an admin)
  • View the home feed and see your post is pinned on the "Relevant" tab
  • Click into e.g. "Latest" and notice even though your post is the latest post, it's not visible
  • Log out and see that across "Latest" / "Top..." the UI for a pinned post is still visible at the top of the feed

Expected behavior

Regardless of whether a user is logged in or out,

  • When on the "Relevant" feed, the pinned post is visible at the top
  • When on any other tab, the pinned post is not 'pinned' to the top, but the post is still in the feed in its natural position

Additional context

The logged-in feed is rendered in Preact, and you can see in Feed.jsx that we splice out the pinned post. splice mutates the original array of feed items, removing it (but we don't always show it separately).

The logged-out feed isn't rendered in the Preact and therefore isn't getting this treatment.

@aitchiss aitchiss added the bug always open for contribution label Feb 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

Thanks for the issue, we will take it into consideration! Our team of engineers is busy working on many types of features, please give us time to get back to you.

Feature requests that require more discussion may be closed. Read more about our feature request process on forem.dev.

To our amazing contributors: issues labeled type: bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @forem/oss. The OSS Community Manager or the engineers on OSS rotation will follow up.

For full info on how to contribute, please check out our contributors guide.

@aitchiss
Copy link
Contributor Author

Update: #16574 has fixed the issue relating to the logged-in feed (thank you @jeferson-sb!). Only the work on the logged-out feed remains.

@citizen428 citizen428 added the area: homepage homepage and feed label Feb 21, 2022
@benhalpern
Copy link
Contributor

I opened up a new issue that has identified a particular inconsistency with the display of the pinned label.

#16675

Maybe it's a dupe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: homepage homepage and feed bug always open for contribution
Projects
None yet
Development

No branches or pull requests

3 participants