Yamuna | FBE - 22 | Implementation of form conditions Editor#4
Yamuna | FBE - 22 | Implementation of form conditions Editor#4yamunachukka wants to merge 32 commits intomasterfrom
Conversation
… using ref form uuid
…f preview form is clicked
…eflect only Obs without events
| import { connect } from 'react-redux'; | ||
| import { setChangedProperty } from '../actions/control'; | ||
|
|
||
| export class FormConditionsContainer extends Component { |
There was a problem hiding this comment.
Yes.Forgot to delete.Deleted Now
| @@ -0,0 +1,91 @@ | |||
| import React, { Component } from 'react'; | |||
There was a problem hiding this comment.
I see it has a lot of code similar to ScriptEditorModal, can we bring out a common component?
There was a problem hiding this comment.
ObsControlScriptEditorModal has 2 different points from ScriptEditorModal.
- CodeMirror property : example: readonly , autofocus
- componentDidUpdate to support dynamic loading of codemirror text based on obs control
We can write in a single component with some conditions, but i felt it will make one file clumsy
| ); | ||
| return cloneDeep(store); | ||
| case 'FORM_LOAD': | ||
| return Object.assign({}, store, { allControls: |
There was a problem hiding this comment.
Should the property be called allControlEvents?
There was a problem hiding this comment.
I renamed it to allObsControlEvents
| import { JSHINT } from 'jshint'; | ||
| import ObsControlScriptEditorModal from 'form-builder/components/ObsControlScriptEditorModal'; | ||
|
|
||
| window.JSHINT = JSHINT; |
There was a problem hiding this comment.
is this required here? ObsControlScriptEditorModal has it already?
| /* it('should call FormDetail with appropriate controls', () => { | ||
| sinon.stub(httpInterceptor, 'get').callsFake(() => Promise.resolve(formData)); | ||
| const dispatch = sinon.spy(); | ||
| const wrapper = shallow( |
There was a problem hiding this comment.
If this is not required, please remove it.
| .withArgs(formEventUpdate(script))); | ||
| sinon.assert.callCount(store.dispatch, 0); | ||
| // sinon.assert.calledOnce(store.dispatch | ||
| // .withArgs(formEventUpdate(script))); |
There was a problem hiding this comment.
please remove all unwanted comment lines
…nd fixing unit tests
…ormDetailContainer
No description provided.