-
Notifications
You must be signed in to change notification settings - Fork 5
Empty states for image reading #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |||||||||
|
|
||||||||||
| {% set currentUserId = data.currentUser.id %} | ||||||||||
| {% set defaultSessionSize = data.settings.reading.defaultSessionSize or 25 %} | ||||||||||
| {% set sessionProgressById = sessionProgressById or {} %} | ||||||||||
|
|
||||||||||
| {# | ||||||||||
| Build a list of the current user's sessions, most-recent first. | ||||||||||
|
|
@@ -24,7 +25,8 @@ | |||||||||
| {% endif %} | ||||||||||
| {% endfor %} | ||||||||||
| {% if userReadCount > 0 %} | ||||||||||
| {% set targetSize = session.targetSize or session.eventIds | length %} | ||||||||||
| {% set progress = sessionProgressById[session.id] %} | ||||||||||
| {% set targetSize = progress.effectiveTargetSize if progress else (session.targetSize or session.eventIds | length) %} | ||||||||||
| {% set userSessions = userSessions | push({ | ||||||||||
| id: session.id, | ||||||||||
| createdAt: session.createdAt, | ||||||||||
|
|
@@ -100,11 +102,17 @@ | |||||||||
| {% set urgentBacklog = backlogEvents | filterEventsByDayRange(data.config.reading.urgentThreshold) | length %} | ||||||||||
| {% set priorityBacklog = backlogEvents | filterEventsByDayRange(data.config.reading.priorityThreshold, data.config.reading.urgentThreshold - 1) | length %} | ||||||||||
|
|
||||||||||
| {# Cases the current user can actually read — used to gate the start button #} | ||||||||||
| {% set userReadableTotal = data.events | ||||||||||
| | filterEventsByEligibleForReading | ||||||||||
| | filterEventsByUserCanRead(currentUserId) | ||||||||||
| | length %} | ||||||||||
|
|
||||||||||
| {% block pageContent %} | ||||||||||
| <div class="nhsuk-grid-row"> | ||||||||||
| <div class="nhsuk-grid-column-two-thirds"> | ||||||||||
| <h1>{{ pageHeading }}</h1> | ||||||||||
| <p>{{ backlogTotal }} cases require reading</p> | ||||||||||
| <p>{{ userReadableTotal }} {{ "case" | pluralise(userReadableTotal) }} available to read</p> | ||||||||||
|
|
||||||||||
| {% if inProgressSession %} | ||||||||||
|
|
||||||||||
|
|
@@ -117,10 +125,20 @@ <h2>Resume image reading</h2> | |||||||||
| href: "/reading/session/" + inProgressSession.id + "/resume" | ||||||||||
| }) }} | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest moving this below the start button to avoid lots of text paragraphs (similar suggestion made on the regular start page) |
||||||||||
|
|
||||||||||
| {% elif userReadableTotal == 0 %} | ||||||||||
|
|
||||||||||
| <h2>There are no cases to read</h2> | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. avoiding duplicating 'read' and 'read' in heading and text |
||||||||||
| <p>All cases have been read.</p> | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
|
||||||||||
| {{ button({ | ||||||||||
| text: "Start now", | ||||||||||
| disabled: true | ||||||||||
| }) }} | ||||||||||
|
|
||||||||||
| {% else %} | ||||||||||
|
|
||||||||||
| <h2>Start image reading</h2> | ||||||||||
| <p>Give your opinion on the next {{ defaultSessionSize }} cases due for reading.</p> | ||||||||||
| <p>Give your opinion on cases due for reading (up to {{ defaultSessionSize }}).</p> | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing mentions of any case numbers in this sentence as it doesn't flow well - suggest secondary text below the button to clarify what they session size is |
||||||||||
|
|
||||||||||
| {{ button({ | ||||||||||
| text: "Start now", | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,32 @@ | ||||||
| {# /app/views/reading/no-more-cases.html #} | ||||||
|
|
||||||
| {% extends 'layout-reading.html' %} | ||||||
|
|
||||||
| {% set isReadingWorkflow = true %} | ||||||
| {% set hideStatusBar = true %} | ||||||
| {% set hideBackLink = true %} | ||||||
|
|
||||||
| {% set pageHeading = "No more cases to read" %} | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| {% block pageContent %} | ||||||
|
|
||||||
| <div class="nhsuk-grid-row"> | ||||||
| <div class="nhsuk-grid-column-two-thirds"> | ||||||
|
|
||||||
| <span class="nhsuk-caption-l">Image reading</span> | ||||||
| <h1 class="nhsuk-heading-l">{{ pageHeading }}</h1> | ||||||
|
|
||||||
| <p>All eligible cases in this session have been read.</p> | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| <div class="nhsuk-button-group"> | ||||||
| {{ button({ | ||||||
| text: "Review session outcomes", | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| href: "/reading/session/" + sessionId | ||||||
| }) }} | ||||||
| <a href="/reading" class="nhsuk-link nhsuk-button-group__item">Exit reading</a> | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| </div> | ||||||
|
|
||||||
| </div> | ||||||
| </div> | ||||||
|
|
||||||
| {% endblock %} | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related issue https://nhsd-jira.digital.nhs.uk/browse/DTOSS-13222
This distinguishes all reads from those available to the user to read - ie, "awaiting an outcome" could cover 1st or 2nd reads, in arbitration, awaiting priors, deferred, etc
Also, have suggested some visual distinction for this paragraph - lots of similar looking lines of text on the page currently