cityofaustin / cityofaustin/techstack
Make notification message content conditional on page type, action
- Dominant language
- No language data
- Stars
- 11
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
### As a content editor, I want save notification message match whether I am updating a draft vs publishing a page.
#### Acceptance Criteria
Notifications should appear when:
- [ ] Saving a draft - Message: "This draft has been saved."
- [ ] Publishing a draft - Language: @desigonz any different from ```Page {page title} published```?
#### Current behavior:
Wagtail has a generic message roughly templated like so:
```
{object name} {page title} has been updated.
```
This is versatile, so that if you update a snippet (like a Contact or map), the template updates with the kind object you are updating.
Really it seems like what we are asking is to have the verb also be modified, so that if it is a draft it has a different verb (saved), vs a page being published.
So we'd want:
```
{object name} {page title} has been {action}.
```
Split off from https://github.com/cityofaustin/techstack/issues/2287
This might be something that could be an improvement in Wagtail itself, though it does have translation/localization aspects that I'd be interested to investigate.
**Is your feature request related to a problem? Please describe.**
Per #2285, we're changing the primary action button on a live page to "update," which will publish out any changes. The language on the green save notification needs to be changed—"updated" there is being used for saving a draft, not publishing. Additionally, we don't need notifications for "share draft" and "preview" because other changes occur ("draft is copied to clipboard" notification; preview opens in new window) to indicate the state change.

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.