guardian / guardian/notifications-tooling
US-21 — Default and select a notification topic
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 0
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 108
Description
## User story
As a notification author, I want Breaking News to be selected as the default topic while still being able to choose another available topic so that notifications are categorised correctly.
### Acceptance criteria
- [ ] Breaking News is the initial and default topic.
- [ ] Only one topic is selected for a notification at a time, unless multi-topic support is deliberately introduced later.
- [ ] Additional configured topics appear as selectable options.
- [ ] Changing the topic replaces Breaking News as the selected topic.
- [ ] The selected topic is stored and displayed in the notification list.
- [ ] Existing notifications retain their original topic if the available topic configuration changes.
### Acceptance scenarios
```gherkin
Feature: Select a notification topic
Background:
Given the author is composing a notification
Scenario: Breaking News is selected by default
When the compose page is opened
Then "Breaking News" should be selected as the notification topic
Scenario: Save a notification using the default topic
Given the author has not changed the notification topic
When the notification is saved
Then its topic should be stored as "Breaking News"
Scenario: Dispatch a notification using the default topic
Given the author has not changed the notification topic
And all mandatory notification fields are complete
When the notification is dispatched
Then its topic should be recorded as "Breaking News"
Scenario: Display additional configured topics
Given an additional notification topic has been configured
When the author views the topic field
Then "Breaking News" should be available
And the additional topic should be available for selection
Scenario: Select another notification topic
Given an additional topic named "Sport" is available
When the author selects "Sport"
Then "Sport" should be shown as selected
And "Breaking News" should no longer be selected
Scenario: Return to Breaking News
Given the author has selected another notification topic
When the author selects "Breaking News"
Then "Breaking News" should be shown as selected
And the previously selected topic should no longer be selected
Scenario: Store the selected topic
Given the author has selected an available notification topic
When the notification is saved
Then the selected topic should be stored against the notification
Scenario: Display the topic in the notification list
Given a notification has been saved with the topic "Breaking News"
When the notification list is displayed
Then its topic should be shown as "Breaking News"
Scenario: Filter notifications by an additional topic
Given notifications exist for different topics
And an additional topic named "Sport" is available
When the author selects "Sport" from the Topic filter
Then only notifications with the topic "Sport" should be displayed
Scenario: Preserve the topic when editing a notification
Given a notification was saved with an additional topic
When the author opens the notification for editing
Then its previously selected topic should be displayed
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the notification compose page, notification storage and dispatch entry points, notification list, and Topic filter described in the acceptance scenarios. Trace how a topic is selected, saved, edited, displayed, and filtered. Done means Breaking News defaults correctly, configured alternatives are selectable one at a time, and existing notifications retain their stored topics when configuration changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100