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

Derive field label from its 'name' property in the finder schema #2906

Closed
wants to merge 1 commit into from

Conversation

ChrisBAshton
Copy link
Contributor

@ChrisBAshton ChrisBAshton commented Dec 6, 2024

Whilst developing a finder recently, I was surprised that my 'name' wasn't having any effect on what was showing in the admin UI. I believe until now, the 'name' is only used in finder-frontend itself.

The label was derived from the key instead of the name, but this often wasn't suitable, meaning we had a lot of label: overrides (as keys had to be namespaced, but labels can afford to use more generic language).

I've tweaked the templates to derive the label from the 'name' instead, which is already a curated human-readable name for the thing - so we no longer need to try to guess from the key. We still have the freedom to use explicit label overrides where needed (indeed, I've left several untouched in the _licences.html.erb file, as the name was quite different to what was configured in that view).

Trello: https://trello.com/c/5RZhjdWe/3211-specialist-finder-for-the-data-ethics-guidance


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

Whilst developing a finder recently, I was surprised that my
'name' wasn't having any effect on what was showing in the admin
UI. I believe until now, the 'name' is only used in finder-frontend
itself.

The label was derived from the key instead of the name, but this
often wasn't suitable, meaning we had a lot of `label:` overrides
(as keys had to be namespaced, but labels can afford to use more
generic language).

I've tweaked the templates to derive the label from the 'name'
instead, which is already a curated human-readable name for the
thing - so we no longer need to try to guess from the key.
We still have the freedom to use explicit label overrides where
needed (indeed, I've left several untouched in the _licences.html.erb
file, as the name was quite different to what was configured in
that view).
@ChrisBAshton ChrisBAshton force-pushed the derive-label-from-name branch from f3e88dd to e3e6ed3 Compare December 6, 2024 19:04
@ChrisBAshton
Copy link
Contributor Author

Superseded by 2930.

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.

1 participant