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

Display user-friendly field names for auto-generated forms #275

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

dabreegster
Copy link
Contributor

Closes #273
https://acteng.github.io/atip/capitalize_auto_form/scheme.html?authority=Adur&schema=v2

Screenshot from 2023-07-14 14-52-43

An incremental improvement. It'd also be nice to apply these to radio buttons, so we don't see SchoolCrossing. But we need to be careful with https://github.com/sindresorhus/humanize-string, because it mangles the dash in "20 - 30 mph"

@Pete-Y-CS
Copy link
Contributor

Looks good, only question is if it mangles one of our strings, maybe we want to manually write something since it's probably not much effort and it can be good to avoid adding too many package

@Pete-Y-CS
Copy link
Contributor

Looks good, only question is if it mangles one of our strings, maybe we want to manually write something since it's probably not much effort and it can be good to avoid adding too many package

As with other things, it's easier to fix after Monday if we want this for when you're in the office, though

@dabreegster
Copy link
Contributor Author

Manually writing might be better long-term. It'd make it harder to initially write schemas, if the human-visible label is required. Imagine adding something to everything in schemas/*.json... maybe it can be optional, and by default the actual value we stick in JSON can match the label. Thoughts?

@dabreegster
Copy link
Contributor Author

Yeah, agreed, thanks -- let's treat this as a tiny step forward and revisit next week

@Pete-Y-CS
Copy link
Contributor

Manually writing might be better long-term. It'd make it harder to initially write schemas, if the human-visible label is required. Imagine adding something to everything in schemas/*.json... maybe it can be optional, and by default the actual value we stick in JSON can match the label. Thoughts?

I was actually thinking writing our own string tidier, but adding an optional human-friendly-label to the schema might not be a bad idea

@dabreegster dabreegster merged commit 15df8d7 into main Jul 14, 2023
2 checks passed
@dabreegster dabreegster deleted the capitalize_auto_form branch July 14, 2023 14:06
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.

Capital letters for attribute addition panel headings
2 participants