-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Transform Advanced Templating #13908
Conversation
…d adds capture groups support
…named capture groups
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.
👏 👏 👏 Great work here! A couple rather minor things -- definitely want to make sure the template saves the alphabet correctly before approving.
@action | ||
deleteRow(object, index) { | ||
const oldObj = this.kvData.objectAt(index); | ||
assert('object guids match', guidFor(oldObj) === guidFor(object)); |
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.
Do we want to keep this in here?
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.
I left most of the logic as is when glimmerizing to avoid breaking anything but this doesn't seem useful to me. I think it would be fine to remove as well as the guidFor(newObj)
on line 58.
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.
👏
* updates regex-validator component to optionally show pattern input and adds capture groups support * adds form-field-label component * adds autocomplete-input component * updates kv-object-editor component to yield block for value and glimmerizes * updates transform template model * adds transform-advanced-templating component * updates form-field with child component changes * updates transform template serializer to handle differences in regex named capture groups * fixes regex-validator test * adds changelog entry * updates for pr review feedback * reverts kv-object-editor guidFor removal
This PR adds the ability to define the encode and decode formats of a transform template. To assist the user, a sample input to test the pattern was added that will display the capture groups when there is a match. An autocomplete input component was also created that allows the user to select capture groups when defining encode/decode formats which is triggered when the user inputs the
$
character.