== Goal ==
* Ask users to provide sources before they start writing.
* Help users understand what counts as a good source.
* Use community-defined lists of recommended and discouraged sources.
{F72393942 size=full}
States shown left to right:
1. Empty: input field, tips expanded, Continue enabled
2. URL pasted: checking source against community lists
3. Source approved: green checkmark, source title shown
4. Discouraged URL pasted: checking
5. Source not recommended: warning shown, tips collapsed
6. Source not recommended + tips expanded: shows what works and what doesn't
== When to show ==
This step appears after the notability check (T415485). If the user passed all community checks, they land here. The user can add links to sources that support their topic. By default this step is optional, the user can skip it and add sources later while writing. If the article type carries the sources flag (defined in T415485), this step becomes mandatory, the user must provide sources before they can continue.
== Core flow ==
# User sees a prompt explaining why sources matter.
# User pastes one or more URLs.
# System may show feedback based on community source lists.
# User continues to next step.
== Entry points ==
| From | When |
| --- | --- |
| T415485 — Notability check | User passed all community checks|
| T415483 — Article type selection | Direct flow (if notability check is not configured for this wiki)|
== Exit conditions ==
| Outcome | What happens next |
| --- | --- |
| User clicks Continue (with or without sources) | Proceeds to T415486 — Content guidance |
| User clicks back | Returns to previous step |
== Designs ==
{F72481681 size=full}
* **Header**: Back arrow + "New article" title. Same pattern as T414902.
* **Title block**: Topic confirmed from T414902 shown as read-only text. Type shown as `CdxInfoChip` (`--color-notice--subtle`). Pencil icon (`CdxIcon`) opens title as `CdxTextInput` for editing. Editing title does not change the topic.
* **Source input**: `CdxTextInput` — placeholder "Paste a link to a source". Heading: "Add sources". Subtitle: "Sources helps readers check the facts and shows why this topic matters."
* **Tips accordion**: `CdxAccordion` this is community-defined content, expanded by default. Auto-expands when a source is not recommended.
* **Actions**: `CdxButton` (primary progressive) "Continue". Helper text below: "You can add sources while you write."
=== States ===
Tips content (what makes a good source, what to avoid) is community-defined via community source lists.
=== State 1: Empty ===
{F72481777 width=600}
Input field visible. Tips section expanded showing what makes a good source. Continue button enabled. For mandatory mode behavior, see T418373.
=== State 2: URL pasted (checking) ===
{F72481775 width=600}
User pastes a URL into the input. System checks it against community source lists. `CdxProgressIndicator` shown inline with "Checking this source..." text. Input disabled during check.
=== State 3: Source approved ===
{F72481771 width=600}
`CdxMessage` (type: success) source looks usable. Domain name extracted from URL (e.g., "reuters.com"). Approved source moves below the input field with a close icon (`CdxButton` quiet) to remove it. Input clears and is ready for the next URL.
=== State 4: Discouraged URL (checking) ===
Same checking behavior as State 2. Progress indicator shown while system checks the URL.
=== State 5: Source not recommended ===
{F72481763 width=600}
Warning message shown. Tips section expands, showing what works and what doesn't as guidance. User can still continue, the warning is informational, not blocking.
== Edge cases ==
* **Invalid URL**: Inline validation error below the input: "Enter a valid URL". `--color-error`, `--font-size-small`.
* **Duplicate URL**: Inline validation error below the input: "This source has already been added". `--color-error`, `--font-size-small`.