|
|
+++
|
|
|
title = "Submit form: remove 'Submit another' link from success screen"
|
|
|
priority = 5
|
|
|
status = "done"
|
|
|
ticket_type = "bug"
|
|
|
dependencies = []
|
|
|
+++
|
|
|
## Bug
|
|
|
|
|
|
After successfully submitting a quote, the success screen (`src/bin/ui/pages/submit.rs`, lines 111–133) offers two actions:
|
|
|
|
|
|
1. "View your quote" (primary button → `/quotes/:id`)
|
|
|
2. "Submit another" (secondary button → `/submit`)
|
|
|
|
|
|
The "Submit another" link pushes users toward submitting more quotes immediately. This is undesirable — the success screen should celebrate the submission and direct the user to view what they just created or browse the collection, not encourage repeat submissions.
|
|
|
|
|
|
## Expected behaviour
|
|
|
|
|
|
Remove the "Submit another" link from the success screen. Replace it with a "Browse all quotes" link (`/browse`) so the user has a natural next step that doesn't push them back to the submit form.
|
|
|
|
|
|
Final success screen actions:
|
|
|
1. "View your quote" (primary, `/quotes/:id`)
|
|
|
2. "Browse all quotes" (secondary, `/browse`)
|
|
|
|
|
|
## How to fix
|
|
|
|
|
|
In `src/bin/ui/pages/submit.rs`, in the success render block (lines 120–130):
|
|
|
|
|
|
```rust
|
|
|
// Before
|
|
|
<div class="page-submit__actions">
|
|
|
<Link<Route>
|
|
|
to={Route::QuoteDetail { id: quote_id.clone() }}
|
|
|
classes="btn btn--primary"
|
|
|
>
|
|
|
{ "View your quote" }
|
|
|
</Link<Route>>
|
|
|
<Link<Route> to={Route::Submit} classes="btn">
|
|
|
{ "Submit another" }
|
|
|
</Link<Route>>
|
|
|
</div>
|
|
|
|
|
|
// After
|
|
|
<div class="page-submit__actions">
|
|
|
<Link<Route>
|
|
|
to={Route::QuoteDetail { id: quote_id.clone() }}
|
|
|
classes="btn btn--primary"
|
|
|
>
|
|
|
{ "View your quote" }
|
|
|
</Link<Route>>
|
|
|
<Link<Route> to={Route::Browse} classes="btn">
|
|
|
{ "Browse all quotes" }
|
|
|
</Link<Route>>
|
|
|
</div>
|
|
|
```
|
|
|
|
|
|
No new imports needed — `Route::Browse` is already defined.
|
|
|
|
|
|
## File
|
|
|
|
|
|
- `src/bin/ui/pages/submit.rs` (lines 120–130)
|
|
|
|
|
|
## Validation
|
|
|
|
|
|
```sh
|
|
|
# From quotesdb/ root
|
|
|
cargo fmt && cargo check && cargo clippy && cargo test
|
|
|
trunk build
|
|
|
```
|
|
|
|
|
|
Manually verify: after submitting a quote, the success screen shows "View your quote" and "Browse all quotes" (not "Submit another").
|
|
|
|
|
|
## Commit scope
|
|
|
|
|
|
`fix(quotesdb): remove submit-another link from success screen` |