announcements: add start at edition date #2575
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
start_at
column. In the migration, backfill thestart_at
column with the value ofcreated_at
for existing announcementssortBy
, which allows fetching announcements sorted by eithercreated_at
(default) orstart_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:Announcement
start_at
info is displayed in small labelscheduled in 2 days
oroccured 2 days ago
for past events.Others changes:
created_at
andstart_at
columns in admin view table✔️ Checklist
Signed-off-by
line in the message. (more info)