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

Transform Advanced Templating #13908

Merged
merged 12 commits into from
Feb 7, 2022
Merged

Transform Advanced Templating #13908

merged 12 commits into from
Feb 7, 2022

Conversation

zofskeez
Copy link
Contributor

@zofskeez zofskeez commented Feb 4, 2022

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.

Screenshot from 2022-02-04 12-43-58
Screenshot from 2022-02-04 12-44-42

@zofskeez zofskeez added the ui label Feb 4, 2022
@zofskeez zofskeez added this to the 1.10 milestone Feb 4, 2022
@vercel vercel bot temporarily deployed to Preview – vault February 4, 2022 20:41 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 4, 2022 20:41 Inactive
Copy link
Contributor

@hashishaw hashishaw left a 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.

changelog/13908.txt Outdated Show resolved Hide resolved
ui/app/components/kv-object-editor.js Show resolved Hide resolved
@action
deleteRow(object, index) {
const oldObj = this.kvData.objectAt(index);
assert('object guids match', guidFor(oldObj) === guidFor(object));
Copy link
Contributor

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?

Copy link
Contributor Author

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.

ui/app/models/transform/template.js Outdated Show resolved Hide resolved
Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@zofskeez zofskeez merged commit 5d049f3 into main Feb 7, 2022
@zofskeez zofskeez deleted the ui/transform-capture-groups branch February 7, 2022 20:08
fairclothjm pushed a commit that referenced this pull request Feb 12, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants