@hippo-digital/hippocampus 1.0.0-rc.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +88 -3
- package/README.md +36 -0
- package/assets/dist/hippocampus.css +1 -1
- package/assets/hippocampus.scss +994 -133
- package/assets/javascript/blueprint.js +21 -0
- package/assets/javascript/trace.js +54 -0
- package/bin/hippocampus.js +9 -3
- package/index.js +2 -1
- package/lib/breadcrumb.js +80 -0
- package/lib/create-router.js +246 -6
- package/lib/discover-projects.js +5 -0
- package/lib/filter.js +81 -0
- package/lib/flow-map.js +214 -0
- package/lib/lint-knowledge.js +31 -0
- package/lib/load-knowledge.js +335 -34
- package/lib/record-links.js +51 -0
- package/lib/templates.js +174 -0
- package/package.json +1 -1
- package/scripts/doctor.js +10 -0
- package/scripts/lib/make-blueprint-template.py +107 -0
- package/scripts/smoke-routes.js +19 -0
- package/templates/service-blueprint.xlsx +0 -0
- package/views/hippocampus/_layout.html +116 -3
- package/views/hippocampus/blueprint-classic.html +0 -1
- package/views/hippocampus/blueprint.html +0 -1
- package/views/hippocampus/components/_blueprint-cell.njk +6 -3
- package/views/hippocampus/components/_blueprint-controls.njk +2 -1
- package/views/hippocampus/components/_breadcrumb.njk +29 -0
- package/views/hippocampus/components/_connections.njk +38 -0
- package/views/hippocampus/components/_filters.njk +56 -0
- package/views/hippocampus/components/_journey-step.njk +11 -7
- package/views/hippocampus/components/_screen-preview.njk +41 -0
- package/views/hippocampus/doc.html +0 -1
- package/views/hippocampus/docs.html +67 -6
- package/views/hippocampus/evidence-impact.html +66 -33
- package/views/hippocampus/graph.html +137 -31
- package/views/hippocampus/handover-empty.html +0 -1
- package/views/hippocampus/handover.html +0 -1
- package/views/hippocampus/index.html +102 -13
- package/views/hippocampus/journey-flow.html +0 -1
- package/views/hippocampus/journey.html +21 -6
- package/views/hippocampus/journeys.html +63 -0
- package/views/hippocampus/project.html +19 -2
- package/views/hippocampus/record.html +33 -0
- package/views/hippocampus/research.html +14 -2
- package/views/hippocampus/route-review.html +0 -1
- package/views/hippocampus/scenarios.html +21 -3
- package/views/hippocampus/screens.html +45 -0
- package/views/hippocampus/trace.html +35 -22
- package/views/hippocampus/user-needs.html +55 -19
- package/views/hippocampus/user.html +131 -79
- package/views/hippocampus/users.html +33 -19
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block pageTitle %}Journeys{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<h1>Journeys</h1>
|
|
7
|
+
<p class="nhsuk-lede-text">
|
|
8
|
+
A journey is a scenario walked through end to end. Each one is written once,
|
|
9
|
+
as steps in the source data, and every view below is generated from it.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
{% if not journeys.length %}
|
|
13
|
+
<div class="nhsuk-inset-text">
|
|
14
|
+
<p>No journeys yet. A journey needs a scenario and a set of steps in
|
|
15
|
+
<code>hippocampus/source/journeys.json</code>.</p>
|
|
16
|
+
</div>
|
|
17
|
+
{% endif %}
|
|
18
|
+
|
|
19
|
+
{#
|
|
20
|
+
One block per journey, with its generated views listed underneath rather
|
|
21
|
+
than as cards of their own. Four equal cards - journey, blueprint, flow,
|
|
22
|
+
handover - said they were four artefacts. They are one journey seen four
|
|
23
|
+
ways, and which is which matters when you are deciding where to look.
|
|
24
|
+
#}
|
|
25
|
+
{% for journey in journeys %}
|
|
26
|
+
<section class="knowledge-section">
|
|
27
|
+
<h2 class="nhsuk-heading-m nhsuk-u-margin-bottom-1">
|
|
28
|
+
<a href="{{ basePath }}/journeys/{{ journey.id }}">{{ journey.title }}</a>
|
|
29
|
+
</h2>
|
|
30
|
+
<p class="knowledge-note">
|
|
31
|
+
{{ journey.steps.length }} step{% if journey.steps.length != 1 %}s{% endif %}
|
|
32
|
+
{%- if journey.screenCount %} · {{ journey.screenCount }} screen{% if journey.screenCount != 1 %}s{% endif %}{% endif %}
|
|
33
|
+
{%- if journey.scenario %} · from
|
|
34
|
+
<a href="{{ basePath }}/scenarios">{{ journey.scenario.title }}</a>
|
|
35
|
+
{%- endif %}
|
|
36
|
+
</p>
|
|
37
|
+
<p class="nhsuk-body-s">{{ journey.description }}</p>
|
|
38
|
+
|
|
39
|
+
{% if journey.entryPoint or journey.exitPoint %}
|
|
40
|
+
<p class="knowledge-note">
|
|
41
|
+
{% if journey.entryPoint %}Starts: {{ journey.entryPoint }}{% endif %}
|
|
42
|
+
{%- if journey.entryPoint and journey.exitPoint %} · {% endif %}
|
|
43
|
+
{%- if journey.exitPoint %}Ends: {{ journey.exitPoint }}{% endif %}
|
|
44
|
+
</p>
|
|
45
|
+
{% endif %}
|
|
46
|
+
|
|
47
|
+
<h3 class="nhsuk-heading-xs knowledge-view-list-heading">Generated from it</h3>
|
|
48
|
+
<ul class="knowledge-view-list">
|
|
49
|
+
{% for view in [
|
|
50
|
+
{ href: "/blueprint", text: "Blueprint", detail: "The steps stacked with what is on screen, behind it and where it hurts." },
|
|
51
|
+
{ href: "/blueprint/classic", text: "Blueprint matrix", detail: "The same blueprint as a grid, for printing and workshops." },
|
|
52
|
+
{ href: "/flow", text: "Flow diagram", detail: "The step sequence and its exceptions, drawn." },
|
|
53
|
+
{ href: "/handover", text: "Handover", detail: "Written documentation of the journey and the screens it touches." }
|
|
54
|
+
] %}
|
|
55
|
+
<li>
|
|
56
|
+
<a href="{{ basePath }}/journeys/{{ journey.id }}{{ view.href }}">{{ view.text }}</a>
|
|
57
|
+
<span class="knowledge-note">{{ view.detail }}</span>
|
|
58
|
+
</li>
|
|
59
|
+
{% endfor %}
|
|
60
|
+
</ul>
|
|
61
|
+
</section>
|
|
62
|
+
{% endfor %}
|
|
63
|
+
{% endblock %}
|
|
@@ -25,10 +25,27 @@
|
|
|
25
25
|
{% block pageTitle %}Project context{% endblock %}
|
|
26
26
|
|
|
27
27
|
{% block content %}
|
|
28
|
-
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
{#
|
|
30
|
+
Every other page captions itself with the KIND of page it is - "Journey",
|
|
31
|
+
"Evidence impact", "Stacked service blueprint". This one captioned itself
|
|
32
|
+
with project.name, which is the slice being designed: "NCRS patient search"
|
|
33
|
+
sitting above an h1 of "National Care Records Service". A caption above a
|
|
34
|
+
heading reads as the thing that contains it, and the project contains the
|
|
35
|
+
slice, not the other way round.
|
|
36
|
+
#}
|
|
37
|
+
<span class="nhsuk-caption-l">Project context</span>
|
|
31
38
|
<h1>{{ knowledge.projectContext.title }}</h1>
|
|
39
|
+
{#
|
|
40
|
+
The slice keeps its place, labelled, the same way the landing page carries
|
|
41
|
+
it. This is the page where which slice is being designed is real context;
|
|
42
|
+
it just is not the project's name.
|
|
43
|
+
#}
|
|
44
|
+
{% if knowledge.project.name != knowledge.projectContext.title %}
|
|
45
|
+
<p class="knowledge-card__meta">
|
|
46
|
+
Slice: {{ knowledge.project.name }} · {{ knowledge.project.phase }}
|
|
47
|
+
</p>
|
|
48
|
+
{% endif %}
|
|
32
49
|
<p class="nhsuk-lede-text">{{ knowledge.projectContext.summary }}</p>
|
|
33
50
|
|
|
34
51
|
{% if knowledge.projectContext.purpose or knowledge.projectContext.vision or knowledge.projectContext.problemStatement or knowledge.projectContext.serviceProposition %}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
{% from "hippocampus/components/_connections.njk" import connections %}
|
|
3
|
+
{% from "hippocampus/components/_screen-preview.njk" import screenPreview %}
|
|
4
|
+
|
|
5
|
+
{% block pageTitle %}{{ detail.entity.label }}{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block content %}
|
|
8
|
+
|
|
9
|
+
<span class="nhsuk-caption-l">{{ detail.entity.type }}</span>
|
|
10
|
+
<h1>{{ detail.entity.label }}</h1>
|
|
11
|
+
|
|
12
|
+
{# Only a screen has something to show. The record page is shared by needs and
|
|
13
|
+
insights too, and a preview belongs to the one record type that is a page. #}
|
|
14
|
+
{% if detail.entity.type == "Screen" and detail.record %}
|
|
15
|
+
{{ screenPreview(detail.record, "detail") }}
|
|
16
|
+
{% endif %}
|
|
17
|
+
|
|
18
|
+
{% if facts.length %}
|
|
19
|
+
<dl class="nhsuk-summary-list">
|
|
20
|
+
{% for fact in facts %}
|
|
21
|
+
{% if fact.value %}
|
|
22
|
+
<div class="nhsuk-summary-list__row">
|
|
23
|
+
<dt class="nhsuk-summary-list__key">{{ fact.key }}</dt>
|
|
24
|
+
<dd class="nhsuk-summary-list__value">{{ fact.value }}</dd>
|
|
25
|
+
</div>
|
|
26
|
+
{% endif %}
|
|
27
|
+
{% endfor %}
|
|
28
|
+
</dl>
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
<h2>Connections</h2>
|
|
32
|
+
{{ connections(detail.groups) }}
|
|
33
|
+
{% endblock %}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
{% block pageTitle %}Research{% endblock %}
|
|
4
4
|
|
|
5
5
|
{% block content %}
|
|
6
|
-
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
7
6
|
|
|
8
7
|
<span class="nhsuk-caption-l">Knowledge graph inputs</span>
|
|
9
8
|
<h1>Research</h1>
|
|
@@ -16,11 +15,24 @@
|
|
|
16
15
|
<div><strong>{{ research.designActions.length }}</strong><span>Design actions</span></div>
|
|
17
16
|
</div>
|
|
18
17
|
|
|
18
|
+
{% if research.outstandingTotal %}
|
|
19
|
+
<div class="nhsuk-inset-text nhsuk-u-margin-top-0">
|
|
20
|
+
<p><strong>{{ research.outstandingTotal }} design actions are still open</strong>
|
|
21
|
+
across all rounds. An action is open until a decision resolves it.</p>
|
|
22
|
+
</div>
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
<p class="knowledge-muted nhsuk-body-s">Most recent round first.</p>
|
|
26
|
+
|
|
19
27
|
{% if research.rounds.length %}
|
|
20
28
|
{% for round in research.rounds %}
|
|
21
29
|
<section class="knowledge-section">
|
|
22
30
|
<p class="knowledge-card__meta">{{ round.date }} · {{ round.sourceType }}</p>
|
|
23
31
|
<h2>{{ round.title }}</h2>
|
|
32
|
+
<p class="knowledge-round-status">
|
|
33
|
+
<strong class="nhsuk-tag nhsuk-tag--{{ round.status.tag }}">{{ round.status.label }}</strong>
|
|
34
|
+
<span class="knowledge-muted">{{ round.status.detail }}</span>
|
|
35
|
+
</p>
|
|
24
36
|
<p>{{ round.summary }}</p>
|
|
25
37
|
|
|
26
38
|
<div class="nhsuk-grid-row">
|
|
@@ -38,7 +50,7 @@
|
|
|
38
50
|
<h3 class="nhsuk-heading-s">Insights</h3>
|
|
39
51
|
<ul class="nhsuk-list">
|
|
40
52
|
{% for insight in round.insights %}
|
|
41
|
-
<li>{{ insight.title }}</li>
|
|
53
|
+
<li><a href="{{ basePath }}/insights/{{ insight.id }}">{{ insight.title }}</a></li>
|
|
42
54
|
{% else %}
|
|
43
55
|
<li class="knowledge-muted">None linked</li>
|
|
44
56
|
{% endfor %}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
{% block pageTitle %}{{ screen.title }}{% endblock %}
|
|
4
4
|
|
|
5
5
|
{% block content %}
|
|
6
|
-
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
7
6
|
<span class="nhsuk-caption-l">Fictional design review task</span>
|
|
8
7
|
<h1>{{ screen.title }}</h1>
|
|
9
8
|
<p class="nhsuk-lede-text">{{ screen.purpose }}</p>
|
|
@@ -1,22 +1,40 @@
|
|
|
1
1
|
{% extends "hippocampus/_layout.html" %}
|
|
2
2
|
{% from "hippocampus/components/_list.njk" import bulletList %}
|
|
3
3
|
{% from "hippocampus/components/_empty-state.njk" import emptyState %}
|
|
4
|
+
{% from "hippocampus/components/_filters.njk" import findBar, noMatches %}
|
|
4
5
|
|
|
5
6
|
{% block pageTitle %}Scenarios{% endblock %}
|
|
6
7
|
|
|
7
8
|
{% block content %}
|
|
8
|
-
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
9
9
|
<h1>Scenarios</h1>
|
|
10
|
+
|
|
11
|
+
{% if knowledge.scenarios.length %}
|
|
12
|
+
{{ findBar(basePath + "/scenarios", "Search scenarios",
|
|
13
|
+
"Any words from the title, trigger or context.",
|
|
14
|
+
query, facets, scenarios.length, knowledge.scenarios.length,
|
|
15
|
+
[1] if hasFilters else [], basePath + "/scenarios") }}
|
|
16
|
+
{% if not scenarios.length %}{{ noMatches(basePath + "/scenarios", "scenarios") }}{% endif %}
|
|
17
|
+
{% endif %}
|
|
10
18
|
{% if knowledge.scenarios.length %}
|
|
11
|
-
{% for scenario in
|
|
19
|
+
{% for scenario in scenarios %}
|
|
12
20
|
{% set user = knowledge.index.users[scenario.userId] %}
|
|
13
21
|
<section class="knowledge-section">
|
|
14
22
|
<span class="nhsuk-tag nhsuk-tag--{{ 'red' if scenario.riskLevel == 'high' else 'yellow' }}">{{ scenario.riskLevel }} risk</span>
|
|
15
23
|
<h2>{{ scenario.title }}</h2>
|
|
16
|
-
<p><strong>User:</strong> {{ user.label }}</p>
|
|
24
|
+
<p><strong>User:</strong> <a href="{{ basePath }}/users/{{ user.id }}">{{ user.label }}</a></p>
|
|
17
25
|
<p><strong>Trigger:</strong> {{ scenario.trigger }}</p>
|
|
18
26
|
<p>{{ scenario.context }}</p>
|
|
19
27
|
|
|
28
|
+
{% if scenario.needIds.length %}
|
|
29
|
+
<h3 class="nhsuk-heading-s">Needs this scenario covers</h3>
|
|
30
|
+
<ul class="nhsuk-list nhsuk-list--bullet">
|
|
31
|
+
{% for needId in scenario.needIds %}
|
|
32
|
+
{% set need = knowledge.index.needs[needId] %}
|
|
33
|
+
{% if need %}<li><a href="{{ basePath }}/needs/{{ need.id }}">{{ need.statement }}</a></li>{% endif %}
|
|
34
|
+
{% endfor %}
|
|
35
|
+
</ul>
|
|
36
|
+
{% endif %}
|
|
37
|
+
|
|
20
38
|
{% if scenario.locationSearch %}
|
|
21
39
|
<h3 class="nhsuk-heading-s">Location search</h3>
|
|
22
40
|
<p><strong>Primary intent:</strong> {{ scenario.locationSearch.primaryIntent }}</p>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
{% from "hippocampus/components/_empty-state.njk" import emptyState %}
|
|
3
|
+
{% from "hippocampus/components/_filters.njk" import findBar, noMatches %}
|
|
4
|
+
{% from "hippocampus/components/_screen-preview.njk" import screenPreview %}
|
|
5
|
+
|
|
6
|
+
{% block pageTitle %}Screens{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block content %}
|
|
9
|
+
<h1>Screens</h1>
|
|
10
|
+
<p class="nhsuk-lede-text">Every screen traces back to the needs it addresses.</p>
|
|
11
|
+
|
|
12
|
+
{% if knowledge.screens.length %}
|
|
13
|
+
{{ findBar(basePath + "/screens", "Search screens",
|
|
14
|
+
"Title, route, purpose or component name.",
|
|
15
|
+
query, facets, screens.length, knowledge.screens.length,
|
|
16
|
+
[1] if hasFilters else [], basePath + "/screens") }}
|
|
17
|
+
|
|
18
|
+
{#
|
|
19
|
+
Cards with a preview, rather than a four-column table.
|
|
20
|
+
|
|
21
|
+
A table of titles and routes made you open a screen to find out which one
|
|
22
|
+
it was. Seven screens is a set you should be able to recognise.
|
|
23
|
+
#}
|
|
24
|
+
<div class="knowledge-card-grid knowledge-card-grid--wide knowledge-card-grid--fill">
|
|
25
|
+
{% for screen in screens %}
|
|
26
|
+
<article class="knowledge-card knowledge-card--compact">
|
|
27
|
+
{{ screenPreview(screen) }}
|
|
28
|
+
<h2 class="nhsuk-heading-s nhsuk-u-margin-bottom-1">
|
|
29
|
+
<a href="{{ basePath }}/screens/{{ screen.id }}">{{ screen.title }}</a>
|
|
30
|
+
</h2>
|
|
31
|
+
<p class="nhsuk-body-s">{{ screen.purpose }}</p>
|
|
32
|
+
<p class="knowledge-card__meta nhsuk-u-margin-bottom-0">
|
|
33
|
+
{{ screen.needIds.length }} need{% if screen.needIds.length != 1 %}s{% endif %}
|
|
34
|
+
{%- if screen.components.length %} · {{ screen.components.length }} component{% if screen.components.length != 1 %}s{% endif %}{% endif %}
|
|
35
|
+
</p>
|
|
36
|
+
</article>
|
|
37
|
+
{% endfor %}
|
|
38
|
+
</div>
|
|
39
|
+
{% if not screens.length %}{{ noMatches(basePath + "/screens", "screens") }}{% endif %}
|
|
40
|
+
{% else %}
|
|
41
|
+
{{ emptyState("No screens yet",
|
|
42
|
+
"A screen is a page in the prototype, recorded with the needs it addresses.",
|
|
43
|
+
"Add one with the add-prototype-screen skill.") }}
|
|
44
|
+
{% endif %}
|
|
45
|
+
{% endblock %}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
{% extends "hippocampus/_layout.html" %}
|
|
2
2
|
|
|
3
|
+
{#
|
|
4
|
+
One step of the trace.
|
|
5
|
+
|
|
6
|
+
Each item used to restate the whole relationship as a sentence - "Designer or
|
|
7
|
+
researcher maintaining the prototype has need I need dated screenshot or
|
|
8
|
+
notes-based evidence..." - which repeated this item's own heading and then
|
|
9
|
+
the parent's, unpunctuated, on every row. What a reader needs is the verb:
|
|
10
|
+
they can see both ends already.
|
|
11
|
+
|
|
12
|
+
Leaves also announced "No linked entities in this direction", which is the
|
|
13
|
+
normal case for most of a tree and so said nothing while taking a line each.
|
|
14
|
+
#}
|
|
3
15
|
{% macro renderBranches(branches, direction) %}
|
|
4
16
|
{% if branches.length %}
|
|
5
17
|
<ol class="knowledge-trace-children">
|
|
@@ -7,41 +19,39 @@
|
|
|
7
19
|
<li class="knowledge-trace-item">
|
|
8
20
|
<div class="knowledge-trace-item__marker" aria-hidden="true"></div>
|
|
9
21
|
<div class="knowledge-trace-item__content">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
22
|
+
<p class="knowledge-trace-item__relationship">
|
|
23
|
+
{{ branch.relationship.label }}
|
|
24
|
+
{%- if branch.entity.date %} · {{ branch.entity.date }}{% endif %}
|
|
25
|
+
</p>
|
|
13
26
|
<h3 class="knowledge-trace-item__heading">
|
|
14
27
|
<a href="{{ basePath }}/trace?entity={{ branch.entity.id }}">{{ branch.entity.label }}</a>
|
|
15
28
|
</h3>
|
|
16
|
-
<
|
|
17
|
-
<p class="knowledge-trace-item__relationship">
|
|
18
|
-
{{ branch.relationship.fromLabel }} <strong>{{ branch.relationship.label }}</strong> {{ branch.relationship.toLabel }}
|
|
19
|
-
</p>
|
|
29
|
+
<p class="knowledge-trace-item__type">{{ branch.entity.type }}</p>
|
|
20
30
|
{% if branch.seen %}
|
|
21
|
-
<p class="knowledge-
|
|
31
|
+
<p class="knowledge-note nhsuk-u-margin-bottom-0">Already shown above - this link loops back.</p>
|
|
22
32
|
{% endif %}
|
|
23
33
|
{{ renderBranches(branch.children, direction) }}
|
|
24
34
|
</div>
|
|
25
35
|
</li>
|
|
26
36
|
{% endfor %}
|
|
27
37
|
</ol>
|
|
28
|
-
{% else %}
|
|
29
|
-
<p class="knowledge-muted">No linked entities in this direction.</p>
|
|
30
38
|
{% endif %}
|
|
31
39
|
{% endmacro %}
|
|
32
40
|
|
|
33
41
|
{% block pageTitle %}Trace tree{% endblock %}
|
|
34
42
|
|
|
35
43
|
{% block content %}
|
|
36
|
-
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
37
44
|
|
|
38
45
|
<span class="nhsuk-caption-l">Knowledge graph</span>
|
|
39
46
|
<h1>Trace tree</h1>
|
|
40
47
|
<p class="nhsuk-lede-text">Navigate from old design inputs, through research and insight, into actions, newer design work and content.</p>
|
|
41
48
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
{# The same control bar the list pages use. Two forms doing the same job on
|
|
50
|
+
adjacent pages had no reason to look like two different features. #}
|
|
51
|
+
<form method="get" action="{{ basePath }}/trace"
|
|
52
|
+
class="knowledge-find knowledge-find--compact" role="search"
|
|
53
|
+
data-hippocampus-trace-form>
|
|
54
|
+
<div class="nhsuk-form-group">
|
|
45
55
|
<label class="nhsuk-label" for="type">Type</label>
|
|
46
56
|
<select class="nhsuk-select" id="type" name="type" data-trace-type>
|
|
47
57
|
<option value="">Select type</option>
|
|
@@ -51,7 +61,7 @@
|
|
|
51
61
|
</select>
|
|
52
62
|
</div>
|
|
53
63
|
|
|
54
|
-
<div class="
|
|
64
|
+
<div class="nhsuk-form-group">
|
|
55
65
|
<label class="nhsuk-label" for="entity">Entity</label>
|
|
56
66
|
<select class="nhsuk-select" id="entity" name="entity" data-trace-entity {{ "disabled" if not trace.entityType else "" }}>
|
|
57
67
|
<option value="">Select entity</option>
|
|
@@ -64,9 +74,8 @@
|
|
|
64
74
|
</select>
|
|
65
75
|
</div>
|
|
66
76
|
|
|
67
|
-
<button class="nhsuk-button
|
|
68
|
-
|
|
69
|
-
</section>
|
|
77
|
+
<button class="nhsuk-button nhsuk-u-margin-bottom-3" type="submit">View trace</button>
|
|
78
|
+
</form>
|
|
70
79
|
|
|
71
80
|
{% if trace.selected %}
|
|
72
81
|
<section class="knowledge-section">
|
|
@@ -83,11 +92,12 @@
|
|
|
83
92
|
<li class="knowledge-trace-item knowledge-trace-item--selected">
|
|
84
93
|
<div class="knowledge-trace-item__marker" aria-hidden="true"></div>
|
|
85
94
|
<div class="knowledge-trace-item__content">
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
<p class="knowledge-trace-item__relationship">
|
|
96
|
+
The record you are tracing
|
|
97
|
+
{%- if trace.selected.date %} · {{ trace.selected.date }}{% endif %}
|
|
98
|
+
</p>
|
|
89
99
|
<h3 class="knowledge-trace-item__heading">{{ trace.selected.label }}</h3>
|
|
90
|
-
<
|
|
100
|
+
<p class="knowledge-trace-item__type">{{ trace.selected.type }}</p>
|
|
91
101
|
</div>
|
|
92
102
|
</li>
|
|
93
103
|
|
|
@@ -110,4 +120,7 @@
|
|
|
110
120
|
{% endif %}
|
|
111
121
|
</section>
|
|
112
122
|
{% endif %}
|
|
123
|
+
|
|
124
|
+
{# Enhancement only: the form works without it, one button press at a time. #}
|
|
125
|
+
<script type="module" src="{{ hippocampusAssets }}/trace.js"></script>
|
|
113
126
|
{% endblock %}
|
|
@@ -1,32 +1,68 @@
|
|
|
1
1
|
{% extends "hippocampus/_layout.html" %}
|
|
2
2
|
{% from "hippocampus/components/_empty-state.njk" import emptyState %}
|
|
3
|
+
{% from "hippocampus/components/_filters.njk" import findBar, noMatches %}
|
|
3
4
|
|
|
4
5
|
{% block pageTitle %}User needs{% endblock %}
|
|
5
6
|
|
|
6
7
|
{% block content %}
|
|
7
|
-
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
8
8
|
<h1>User needs</h1>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
|
|
10
|
+
{% if knowledge.needs.length %}
|
|
11
|
+
{{ findBar(
|
|
12
|
+
basePath + "/user-needs",
|
|
13
|
+
"Search user needs",
|
|
14
|
+
"Any words from the need. Searching search postcode finds only needs containing both words.",
|
|
15
|
+
query, facets, needs.length, knowledge.needs.length,
|
|
16
|
+
[1] if hasFilters else [],
|
|
17
|
+
basePath + "/user-needs"
|
|
18
|
+
) }}
|
|
19
|
+
|
|
20
|
+
{#
|
|
21
|
+
The same card the persona pages use, in the same grid.
|
|
22
|
+
|
|
23
|
+
This was 132 full-width blocks in one column - the longest scroll in the
|
|
24
|
+
viewer, and the one page where you are most often looking for a need
|
|
25
|
+
rather than reading one. Three columns of the card that already exists
|
|
26
|
+
elsewhere, so a need looks the same wherever you meet it.
|
|
27
|
+
|
|
28
|
+
Wide columns rather than the narrow grid the users list uses: a need is a
|
|
29
|
+
whole user story, and at four columns it sets as a thin ribbon of text.
|
|
30
|
+
#}
|
|
31
|
+
{% if needs.length %}
|
|
32
|
+
<div class="knowledge-card-grid knowledge-card-grid--wide knowledge-card-grid--fill">
|
|
33
|
+
{% for need in needs %}
|
|
34
|
+
{% set user = knowledge.index.users[need.userId] %}
|
|
35
|
+
<article class="knowledge-card knowledge-card--compact">
|
|
36
|
+
<p class="knowledge-card__meta nhsuk-u-margin-bottom-1">
|
|
37
|
+
<a href="{{ basePath }}/users/{{ user.id }}">{{ user.label }}</a> · {{ need.priority }} priority
|
|
38
|
+
</p>
|
|
39
|
+
<h2 class="knowledge-card__statement">
|
|
40
|
+
<a href="{{ basePath }}/needs/{{ need.id }}">{{ need.statement }}</a>
|
|
41
|
+
</h2>
|
|
42
|
+
{% if need.evidenceIds.length %}
|
|
43
|
+
<ul class="nhsuk-list knowledge-linked-list">
|
|
44
|
+
{% for evidenceId in need.evidenceIds %}
|
|
45
|
+
{% set evidence = knowledge.index.evidence[evidenceId] %}
|
|
46
|
+
{% if evidence %}
|
|
47
|
+
<li>
|
|
48
|
+
<a href="{{ basePath }}/evidence/{{ evidence.id }}/impact">{{ evidence.title }}</a>
|
|
49
|
+
<span class="knowledge-confidence-tag knowledge-confidence-tag--{{ evidence.confidence }}">{{ evidence.confidence }} confidence</span>
|
|
50
|
+
</li>
|
|
51
|
+
{% endif %}
|
|
52
|
+
{% endfor %}
|
|
53
|
+
</ul>
|
|
54
|
+
{% else %}
|
|
55
|
+
<p class="knowledge-card__meta nhsuk-u-margin-bottom-0">No evidence linked</p>
|
|
56
|
+
{% endif %}
|
|
57
|
+
</article>
|
|
58
|
+
{% endfor %}
|
|
59
|
+
</div>
|
|
60
|
+
{% else %}
|
|
61
|
+
{{ noMatches(basePath + "/user-needs", "user needs") }}
|
|
62
|
+
{% endif %}
|
|
25
63
|
{% else %}
|
|
26
64
|
{{ emptyState("No user needs yet",
|
|
27
65
|
"A need says who wants what, and why - the \"so that\" clause is what stops two users' needs being merged into one.",
|
|
28
66
|
"Add them with the add-user-needs skill once there is at least one user.") }}
|
|
29
67
|
{% endif %}
|
|
30
|
-
</div>
|
|
31
68
|
{% endblock %}
|
|
32
|
-
|