-
Notifications
You must be signed in to change notification settings - Fork 7
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
CLDC-3740: Replace you didn't answer text with link to question #2836
base: main
Are you sure you want to change the base?
Conversation
Created review app at https://review.submit-social-housing-data.communities.gov.uk/2836 |
…er-with-link' into CLDC-3740-Replace-you-didnt-answer-with-link
This reverts commit 40bee28
# Conflicts: # app/helpers/merge_requests_helper.rb
<% else %> | ||
<% row.with_action %> |
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.
Does this need an else?
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.
Oh so, this is just to place something in place of no action. It's done elsewhere in similar tables with action rows, but not everywhere. It's not needed at all but I thought might be worth adding to keep the structure the same. Again, makes no difference, can also just be removed.
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.
Whatever makes sense, if we do it elsewhere it might be fine. Up to you!
# Conflicts: # config/locales/forms/2025/lettings/household_characteristics.en.yml
This PR aims to change how we show users that a question needs to be answered from a text and "Change" button like this...
... to now present a link with an appropriate prompt to answer the question:
Features
By default, it generates the link text for log questions based on their question type. Support users can customise this text by setting a value in the translation file for each question’s
check_answer_prompt
(it will have to be the full link text, not just the prefix). If no custom text is provided, it will add a prefix to the first available option in the following order:error_label
,check_answer_label
,header
, orid
. Note thatquestion_text
is intentionally excluded from this list. For questions with types checkbox, radio, or select, the default prefix is “Select”; for date types, it is “Set”; and for all other types, it is “Enter”.In this example we have a few custom set link text:
check_answer_prompt
would default to that of the first question "Address line 1"Non log pages
Unlike for logs where we have many questions, which can be changed by support users, other pages are set by us and as such I have for the most part written the link texts per attribute, with a default "Enter" prefix should anything change in the future but is in most places unused.
Schemes example
For some of these pages, it is not possible to create a resource without answering at least some of the questions. For example, when creating a scheme, you cannot complete the step and progress to the next page without answering the visible questions shown in the screenshot above. Therefore, I have not changed the behavior of those questions. The changes only apply to the questions you could skip in the initial stages.
No permission to change values
We only need to show the link to enter a value if the user has the necessary permissions to make those changes. Therefore, it is still necessary to display a message indicating that the value has not been entered. The example below shows the view of a data provider when viewing an incomplete scheme.