backstage-plugin-announcements
backstage-plugin-announcements copied to clipboard
🚀 Feature: Ability to set a replacement for "Announcement" button in AnnouncementsPage Props
🔖 Feature description
The plugin currently allows for the customization of the title, subtitle and categories on AnnouncementsPageProps.
It would be nice if we can modify what the button would say.
🎤 Context
In our case, we're using multiple routes to serve certain announcements - for instance - "Training", "Team Lunch" etc...
Currently, button says "New Announcement" - but it would be cool to override this with New - $thing
. Would probably look to the Categories for inspiration, but even then things may not align.
✌️ Possible Implementation
No response
👀 Have you spent some time to check if this feature request has been raised before?
- [X] I checked and didn't find similar issue
Are you willing to submit PR?
Yes I am willing to submit a PR!
Hey @billabongrob, this change is fine, but it has me thinking. The functionality missing here is the ability to manage and create announcements from any page of your choice. Therefore, it sounds like you are importing many versions of the <AnnouncementsPage />
, overwriting the button name, and doing some filtering. Does that sound right?
If so, this seems like a stopgap when we should decouple announcements so you can create and display them anywhere.
Right now, I've created routes for each. I've used the <AnnouncementsPage />
within them. Then just added them as a Nav bars on the side. Here's an example of what my use case looks like.
Right now, I've created routes for each. I've used the
<AnnouncementsPage />
within them. Then just added them as a Nav bars on the side. Here's an example of what my use case looks like.
This is an interesting use of the plugins. My one concern is that you will continue to need to override to fit your unique use case.
My approach for this would be to create some training plugin (plugin-training
) where different options (plugin-training-module-*
)s need to show announcements based on a category. Use the AnnouncementsApi.announcements
from announcements-react
to get the announcements for said training module. You would then supply your own <Button />
that is wired up to AnnouncementsApi.createAnnouncement
.
Or, make it slightly easier and we could provide additional components such as <AnnouncementsGrid />
and/or <AnnouncementsList />
.
@billabongrob are we good to close this?
All good @kurtaking Thanks!