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

fix: Add ability to switch to expression when editing an "OpenObjectField" (object with additionalProperties) & only show OpenObjectField when additionalProperties is an object #4600

Merged
merged 7 commits into from
Nov 2, 2020

Conversation

LouisEugeneMSFT
Copy link
Contributor

Description

  • Adding ability to switch to an expression from an OpenObjectField when the schema permits it.
  • Showing OpenObjectField when additionalProperties is an object, not any truthy value.

Task Item

closes #4599

Screenshots

image

@LouisEugeneMSFT LouisEugeneMSFT changed the title Leugene/issue4599 fix: Add ability to switch to expression when editing an "OpenObjectField" (object with additionalProperties) & only show OpenObjectField when additionalProperties is an object Oct 30, 2020
tdurnford
tdurnford previously approved these changes Oct 30, 2020
@cwhitten
Copy link
Member

cwhitten commented Nov 2, 2020

@LouisEugeneMSFT please fix the unit tests:

FAIL packages/adaptive-form/src/utils/tests/resolveFieldWidget.test.ts (6.783 s)
● resolveFieldWidget › type: object › returns OpenObjectField when additional properties are allowed

expect(received).toEqual(expected) // deep equality

Expected: [Function OpenObjectField]
Received: [Function anonymous]

  220 | 
  221 |       const { field: ReturnedField } = resolveFieldWidget({ schema });
> 222 |       expect(ReturnedField).toEqual(DefaultFields.OpenObjectField);
      |                             ^
  223 |     });
  224 |   });
  225 | 

  at Object.toEqual (src/utils/__tests__/resolveFieldWidget.test.ts:222:29)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 55.14% when pulling c0bceb3 on leugene/issue4599 into 8589c32 on main.

@cwhitten cwhitten merged commit 2031750 into main Nov 2, 2020
@cwhitten cwhitten deleted the leugene/issue4599 branch November 2, 2020 19:48
luhan2017 pushed a commit that referenced this pull request Nov 3, 2020
…ield" (object with additionalProperties) & only show OpenObjectField when additionalProperties is an object (#4600)

* fix

* fix

* updating test

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
@cwhitten cwhitten mentioned this pull request Nov 13, 2020
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…ield" (object with additionalProperties) & only show OpenObjectField when additionalProperties is an object (microsoft#4600)

* fix

* fix

* updating test

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants