diff --git a/src/app.rs b/src/app.rs
index 36ff592..9334160 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -196,19 +196,23 @@ fn QuestionView(
}
}
key=|a| a.name.clone()
- children=move |alt: Alternative| {
- view! {
-
+ children={
+ let question_id = question_id.clone();
+ move |alt: Alternative| {
+ view! {
+
+ }
+ .into_any()
}
- .into_any()
}
/>
+
{question
.responsible
.clone()
@@ -219,6 +223,39 @@ fn QuestionView(
.into_any()
}
+/// Every other question the visitor currently qualifies for, as a
+/// small nav - how a concern reaches the people it speaks to without
+/// claiming front-page space (an owner also sees the gated desks here).
+#[component]
+fn QuestionNav(current_id: String) -> impl IntoView {
+ let nav = Resource::new(|| (), |_| list_qualifying_questions());
+ view! {
+
+ {move || {
+ let current_id = current_id.clone();
+ nav.get().and_then(|res| res.ok()).map(|items| {
+ let others: Vec<(String, String)> = items
+ .into_iter()
+ .filter(|(id, _)| *id != current_id)
+ .collect();
+ (!others.is_empty()).then(|| view! {
+
+ })
+ })
+ }}
+
+ }
+}
+
/// "Asked by X — contact them if you get stuck."
/// The mailto address is assembled from `data-user`/`data-domain` on a
/// real mouse event, never baked into the server-rendered `href` -
@@ -463,6 +500,16 @@ fn AlternativeCard(
let has_action = alternative.action.is_some();
let has_requirements = alternative.features.iter().any(|f| !f.requirements.is_empty());
+ // Nothing to submit, nothing to confirm, nothing to record: the
+ // alternative is a gateway to another question, and its button is
+ // just a link (a form submit would be a click that does nothing).
+ let is_gateway = has_action
+ && !has_requirements
+ && alternative.record_as.is_none()
+ && alternative
+ .features
+ .iter()
+ .all(|f| f.resource.as_ref().is_none_or(|r| r.transitions.is_empty()));
// Shared across every resource feature on this alternative: which
// row(s) have a transition selected but not yet confirmed, keyed by
@@ -841,19 +888,30 @@ fn AlternativeCard(
children=move |e| view! {