initial notifications prototype [copilot]
Resolves JIRA: NA
NOTE - Does not currently work correctly on homepages
Summary
This PR demonstrates a simple prototype where a 'news catch up' notification can be shown (probably once per week). In production it would likey contact a JSON endpoint per service to get the latest news and show it in a notification.
Where a user has never clicked the 'follow' button they see this in header:
Once they click the button they get the browser permission modal:
If they click allow the folow button changes to this:
It will also look as above on subsequent visits with notifications permitted
If they click 'Block' the button disappears, you can only get the button back if you change the notification settings in the browser for the site, there is no programatic way to ask again
The PR also enables a hardcoded notification to show the latest news to catch up on; the code sets an interval of a minute but browsers limit this interval to a day to prevent malicious use.
If you follow the instructions here you can trigger the notification using the tag get-latest-news.
Code changes
- A bullet point list of key code changes that have been made.
Developer Checklist
- [ ] UX
- [ ] UX Criteria met (visual UX & screenreader UX)
- [ ] Accessibility
- [ ] Accessibility Acceptance Criteria met
- [ ] Accessibility swarm completed
- [ ] Component Health updated
- [ ] P1 accessibility bugs resolved
- [ ] P2/P3 accessibility bugs planned (if not resolved)
- [ ] Security
- [ ] Security issues addressed
- [ ] Threat Model updated
- [ ] Documentation
- [ ] Docs updated (runbook, READMEs)
- [ ] Testing
- [ ] Feature tested on relevant environments
- [ ] Comms
- [ ] Relevant parties notified of changes
Testing
- [ ] Manual Testing required?
- [ ] Local (
Ready-For-Test, Local) - [ ] Test (
Ready-For-Test, Test) - [ ] Preview (
Ready-For-Test, Preview) - [ ] Live (
Ready-For-Test, Live)
- [ ] Local (
- [ ] Manual Testing complete?
- [ ] Local
- [ ] Test
- [ ] Preview
- [ ] Live
Additional Testing Steps
- List the steps required to test this PR.
Useful Links
- Coding Standards
- Repository use guidelines
- Add Links to useful resources related to this PR if applicable.