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

feat: document transformers feature #17

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

jiangmengyu0409
Copy link
Contributor

@jiangmengyu0409 jiangmengyu0409 commented Jun 21, 2024

Issues:

Status:

  • add description for usage in readme
  • add the test code for the transformer feature

README.md Outdated

### Clone

`clone` type allows the user to copy value from one fieldname to the specified fieldname with the following limitations:
Copy link
Member

Choose a reason for hiding this comment

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

the original field is not removed is the a limitation, it's by design,

maybe you can reword it to rules

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit.

README.md Outdated
constant: { customField: 'custom-value' },
},
{
clone: { originalField: 'customField' },
Copy link
Member

Choose a reason for hiding this comment

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

this is confusing,
does it mean the clone makes the previous constant useless?
as it's overriding the customField

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, fixed in the latest commit.

}
```

## Transformers Option

![image](./docs/images/transformers-workflow.png)
Copy link
Member

Choose a reason for hiding this comment

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

does it mean the transformers have to be in the order of constant -> clone -> map?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good point, we don't have such rules for orders, and let me redraw the picture to make it more accurate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit.

Copy link
Member

@xavierchow xavierchow left a comment

Choose a reason for hiding this comment

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

thx, LGTM

@jiangmengyu0409 jiangmengyu0409 merged commit 3983b46 into master Jun 25, 2024
1 check passed
@jiangmengyu0409 jiangmengyu0409 deleted the feat-document-transform-features branch June 25, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants