Repository navigation
Builder: labels for all 39 field types - #301
Merged
Merged
Conversation
builder.ft had labels for 24 of the 39 field types, and the builder falls back to the raw key for the rest. A form imported with discord_user, country, steam_hex, ranking or one of the other eleven showed keys like "steam_hex" in the outline and the type picker. All 15 missing labels are added in the seven languages, and a test checks that every type in FIELD_TYPES has a label in every dictionary, so a new field type can't ship without one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The builder shows a field's type through
builder.ft, and falls back to the raw key when there's no label.ftcovered 24 of the 39 types inFIELD_TYPES, so an imported form withdiscord_user,country,steam_hexorranking(the four that were reported) showed those keys in the outline and the editor. The same went forpassword,multi_select,time,datetime,address,fivem_id,age_check,captcha,section_break,image_blockandspacer.Fix
i18n/field-type-labels.test.tschecks every type ofFIELD_TYPESagainst every dictionary, so a new field type can't ship without a label.Checked
mainfor all seven languages and passes with the labels.pnpm --filter @msk-forms/web typecheck, eslint and prettier on the changed files.