react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Fix for ui:options label & description

Open newt10 opened this issue 3 years ago • 4 comments

Reasons for making this change

There are many bugs describing the problem with the current code ignoring some settings from uiSchema; namely

  • ui:title,
  • ui:description
  • ui:options
    • label:
    • title:
    • description:

This changeset fixes above problems for all fields, array fields and object fields. Labels are hidden when the ui:options {label: false} is provided as well as title and description fields from ui:options are applied as per the documentation.

If this is related to existing tickets, include links to them as well. Use the syntax fixes #2535 .

Checklist

  • [ ] I'm updating documentation
  • [x] I'm adding or updating code
    • [x] I've added and/or updated tests
    • [ ] I've updated docs if needed
  • [ ] I'm adding a new feature
    • [ ] I've updated the playground with an example use of the feature

Note

  • No documentation updates are required as this is a bug fix and aligns the expected behavior with documented behavior.

Screenshots

uiOptions uiTitle

Tests passing after the code change

uiSchema Tests Passing

Tests failing before code change

https://pastebin.com/QE2a9jqv

newt10 avatar Sep 03 '21 22:09 newt10

@epicfaace I have made the changes based on your review. Let me know if you need anything else in order to merge this.

newt10 avatar Sep 03 '21 23:09 newt10

LGTM

bejito avatar Sep 09 '21 11:09 bejito

@newt10 @bejito What is the status with this ticket?

MilesNorton avatar Mar 22 '22 12:03 MilesNorton

@newt10 With the conversion to typescript in v5, I was wondering if you had time to refactor this onto the latest changes in master?

heath-freenome avatar Sep 07 '22 18:09 heath-freenome