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

ft/Improve Posts #621

Merged
merged 20 commits into from
Oct 9, 2023
Merged

ft/Improve Posts #621

merged 20 commits into from
Oct 9, 2023

Conversation

kelvinkipruto
Copy link
Contributor

@kelvinkipruto kelvinkipruto commented Oct 3, 2023

Description

This PR implements some improvements on posts

  1. Introduces a posts settings global to control whether to show recent posts on individual pages
  2. Fixes a bug whereby you cannot sort posts by tag
  3. Remove the featured post from the list of posts if it is available.

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

image

image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@kelvinkipruto kelvinkipruto marked this pull request as ready for review October 3, 2023 14:38
@kelvinkipruto kelvinkipruto changed the title Render related posts ft/Related Posts Oct 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Latest updated Preview URL

Name Review
codeforafrica-ui-pr-621 Visit

Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

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

👍🏽

--

  1. Is this block for Projects or Stories
  2. If it's related stories, we'd need a way of relating. One way is making sure they share tags. If it's recent, we need to fetch ordered by publication date descending or something.
  3. How will the content editors add this block in the CMS? We don't have individual pages for projects or stories in the CMS.

@kelvinkipruto kelvinkipruto changed the title ft/Related Posts ft/Recent Stories Oct 4, 2023
@kelvinkipruto kelvinkipruto changed the title ft/Recent Stories ft/Improve Posts Oct 6, 2023
@kelvinkipruto
Copy link
Contributor Author

@kilemensi @koechkevin This is now ready.

Copy link
Member

@kilemensi kilemensi left a comment

Choose a reason for hiding this comment

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

My quick review on this @kelvinkipruto

We should change website/settings to be:

  • Settings
    • Site
    • Publication
    • Users

Site: This is the current Settings global, just a rename i.e. All site-wide settings will be here.
Publication: This settings will cover everything under Publication. For now we can have just have Posts (as a tab) and under that, we can have Recent Stores, show recent stories checkbox and if checked, allow editors to set title for recent stories. Similar for Recent Opportunities.
Users: Remain as is.

@kilemensi
Copy link
Member

Does my comment make sense @kelvinkipruto?

@kelvinkipruto
Copy link
Contributor Author

@kilemensi Yes. Currently updating it.

Copy link
Contributor

@koechkevin koechkevin left a comment

Choose a reason for hiding this comment

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

@kelvinkipruto are we planning to add migrations since we are changing slug and production data already exists?

@kelvinkipruto
Copy link
Contributor Author

are we planning to add migrations since we are changing slug and production data already exists?

@koechkevin I have backed up the JSON data currently in use. We will use it when we merge this.

@kelvinkipruto kelvinkipruto merged commit 5bd16dd into develop Oct 9, 2023
4 checks passed
@kelvinkipruto kelvinkipruto deleted the ft/recent-posts branch October 9, 2023 11:39
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