Skip to content
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

feat: Description text for map schema date input #3816

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

ianjon3s
Copy link
Contributor

@ianjon3s ianjon3s commented Oct 16, 2024

What does this PR do?

  • Adds a description/hint text to map date inputs For example, 16 04 2027, in line with GOV.UK example.

Identified in user-research, 2/5 householder participants tried to enter months using text (i.e. "Nov").

A first instinct was to add a script to insert an example date [for example] 6 months in the future, so that the suggested date would be relevant(ish) and never "expire". Seems like something that can be solved by setting a date well into the future to save unnecessary functionality. Interested to hear other opinions on this.

Preview:
image

Copy link

github-actions bot commented Oct 16, 2024

Removed vultr server and associated DNS entries

@ianjon3s ianjon3s marked this pull request as ready for review October 16, 2024 16:12
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

We could take this a step further by either making the description field required, or setting a default value.

If we wanted to use a default value we could set this in DateFieldInput.tsx.

To make it required (in List/Schema contexts) we'd need to update the DateField type in /Schema/model.ts, something like -

export type DateField = {
  type: "date";
  data: DateInput & { fn: string, description: string };
};

@ianjon3s ianjon3s closed this Oct 17, 2024
@ianjon3s ianjon3s deleted the ian/map-schema-date-description branch October 17, 2024 13:41
@ianjon3s ianjon3s restored the ian/map-schema-date-description branch October 17, 2024 13:42
@ianjon3s ianjon3s reopened this Oct 17, 2024
@ianjon3s
Copy link
Contributor Author

PR was closed in error by accidentally deleting branch.

@ianjon3s ianjon3s force-pushed the ian/map-schema-date-description branch from e56387d to afc1c2e Compare October 25, 2024 11:29
@jessicamcinchak
Copy link
Member

Merging this one as-is - will make a new Trello ticket to further discuss "required" placeholders for Date Inputs 👍

@jessicamcinchak jessicamcinchak merged commit 8dfbc77 into main Oct 30, 2024
12 checks passed
@jessicamcinchak jessicamcinchak deleted the ian/map-schema-date-description branch October 30, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants