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

announcements: add start at edition date #2575

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gaelgoth
Copy link

@gaelgoth gaelgoth commented Jan 24, 2025

Hey, I just made a Pull Request!

I reduce a bit the scope of the issue #2416. This PR adds a start_at field, allowing users to set the date when an announcement occurred. For react components, you can choose to sort announcements by either the creation date or the start date, based on your preference.

plugin-announcements-backend

  • Add a start_at column. In the migration, backfill the start_at column with the value of created_at for existing announcements
  • Introduce new filters: sortBy, which allows fetching announcements sorted by either created_at (default) or start_at. The sort order can be set using the order parameter, with desc (default) or asc.

plugin-announcements

I reworked a bit the New Announcement form to have more room for start at or new other fields in the future:
image

Announcement start_at info is displayed in small label scheduled in 2 days or occured 2 days ago for past events.

image
image

Others changes:

  • I added created_at and start_at columns in admin view table
  • React props to set which order to display announcements

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@backstage-goalie
Copy link
Contributor

backstage-goalie bot commented Jan 24, 2025

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-announcements-backend workspaces/announcements/plugins/announcements-backend minor v0.1.4
@backstage-community/plugin-announcements-common workspaces/announcements/plugins/announcements-common minor v0.1.3
@backstage-community/plugin-announcements-react workspaces/announcements/plugins/announcements-react minor v0.1.3
@backstage-community/plugin-announcements workspaces/announcements/plugins/announcements minor v0.1.4

@backstage-goalie
Copy link
Contributor

Thanks for the contribution!
All commits need to be DCO signed before they are reviewed. Please refer to the the DCO section in CONTRIBUTING.md or the DCO status for more info.

@gaelgoth gaelgoth force-pushed the announcements/add-start-at-edition-date branch from 54488ae to 547e2a9 Compare January 24, 2025 08:15
@gaelgoth gaelgoth marked this pull request as ready for review January 24, 2025 08:16
@gaelgoth gaelgoth requested a review from a team as a code owner January 24, 2025 08:16
@gaelgoth gaelgoth requested a review from nickboldt January 24, 2025 08:16
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.

1 participant