-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Teal bug fixes #13593
Teal bug fixes #13593
Conversation
…ld break event context in further actions
…a link datasource
…a data provider as a source
…noying drag-outside closing actions
@@ -92,7 +92,8 @@ | |||
} | |||
|
|||
const addStep = () => { | |||
value = value.toSpliced($currentStep + 1, 0, {}) | |||
const newInstance = componentStore.createInstance(componentType) | |||
value = value.toSpliced($currentStep + 1, 0, newInstance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using an empty object, we now create a fake component instance for each form step. This is how we usually handle these settings, and makes it easier to use later with generic utilities because we have a real component type saved for which we can lookup the definition and settings.
_id: Helpers.uuid(), | ||
_component: componentType, | ||
_id: savedInstance._id || Helpers.uuid(), | ||
_component: savedInstance._component || componentType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just re-using the saved properties since they will exist for all new steps after this change. Makes no difference but is how it would be written if we had always saved them.
}} | ||
/> | ||
</AbsTooltip> | ||
<AbsTooltip text="Next step" noWrap> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapping all of these in an AbsTooltip rather than the native tooltip prop of the action button so that the tooltips are rendered on top.
packages/builder/src/dataBinding.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All nested types are now handled in a single generic way. The old code handled all of these cases apart from fieldConfiguration
, and was also very duplicated. This is a single generic way to do this now for all these types of settings.
resolve(typeof next === "function" ? await next() : true) | ||
if (typeof next === "function") { | ||
// Pass the event context back into the new action chain | ||
resolve(await next(eventContext)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were just missing the event context param here to the following button actions. The rest is just moving around some code to make it more readable.
@@ -124,6 +124,7 @@ | |||
const fieldSchema = schemaFields.find(x => x.name === filter.field) | |||
filter.type = fieldSchema?.type | |||
filter.subtype = fieldSchema?.subtype | |||
filter.formulaType = fieldSchema?.formulaType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formula type was missing from the structure we pass into the lucene utils in shared core, which resulted in us being unable to detect static formulae.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! So many great fixes in here 🚀
Description
This PR is a collection of fixes for issues discovered during building our app.
Fixes
Improvements
root
key to our configAddresses