Forem Creators and Builders 🌱

Lee
Lee

Posted on

New sidebar stories feature for smaller Forems now merged

Hey everyone 👋🏼,

I submitted a PR last week to allow smaller Forems to set the expiry times on articles that are counted in the campaign stories sidebar.

Generalise sidebar campaign published article timeframe #12278

What type of PR is this? (check all applicable)

  • [ ] Refactor
  • [x] Feature
  • [ ] Bug Fix
  • [ ] Optimization
  • [ ] Documentation Update

Description

This PR adds a configurable timeframe for showing articles in the campaign sidebar, for smaller communities, the rate of submission will be much lower therefore this allows a Forem admin to adjust the timeframe so more stories show up in the count.

Related Tickets & Documents

This is related to issue #11968

QA Instructions, Screenshots, Recordings

  1. Enabled and create a sidebar campaign in admin/config
  2. Set the required feature tag for articles to show in the count
  3. Enabled the campaign
  4. Set the desired campaign article expiry time
  5. Set the published time for articles within the required tag to before and after the expiry time
  6. Note the change in the Stories count.

UI accessibility concerns?

No

Added tests?

  • [x] Yes
  • [ ] No, and this is why: please replace this line with details on why tests have not been included
  • [ ] I need help with writing tests

Added to documentation?

[optional] Are there any post deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

expire

Here is an example of the sidebar stories campaign on Flowstate, there are currently 2 posts showing as stories because by default it was set to collect only posts from the last 4 weeks, which is fine for Dev due to the volume.

sidebar

There is now an option to change that timeframe in config/campaign here.

campaign

Therefore the post count will be much higher depending on the timeframe (in weeks) that you configure.

It might take a few days for this to be released into hosted Forem.

Top comments (3)

Collapse
 
coffeecraftcode profile image
Christina Gorton • Edited

Nice! Glad to see this was picked up and merged.

Collapse
 
lee profile image
Lee

Thanks!!

Collapse
 
ildi profile image
Ildi

Thank you for making this happen. Will be very useful to new Forem communities!