WeblateOrg / WeblateOrg/weblate
Dismissable announcements
- Dominant language
- Python
- Stars
- 6.1k
- Forks
- 1.4k
- Avg merge
- 9h 53m
- Merged PRs (30d)
- 395
Description
### Describe the problem
From #19770
> - Translators cannot remove an announcement once they have seen it.
> This means I need to be careful and only add announcements that are very important and can stay through time, or add expiration dates but then new contributors will not see them. If translators were able to hide announcements, I would add some announcements targeted to new contributors, knowing that they will not clutter the interface for recurring translators.
### Solution brainstorm
Add a new boolean "dismissable" to announcements, which is `False` by default.
When it's `True`, render a X in the UI on the announcement, that when clicked
1. hides the element
2. stores the announcement id in client storage (cookies, localstorage, etc)
On subsequent page visits, identify which announcements to hide based the client storage.
### Describe alternatives you have considered
Tracking dismissed announcements in the database: would be more robust, but I find it too much overhead. With client side storage of the dismissal state, clients can "un-dismiss" announcements by clearing their local storage.
### Screenshots
_No response_
### Additional context
Inspred by GitLab's [Broadcast Messages](https://docs.gitlab.com/administration/broadcast_messages/).
Contributor guide
Assessment
This issue has not been assessed yet.