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

Add support for shrinking form responses #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rjcorwin
Copy link
Contributor

@rjcorwin rjcorwin commented Mar 5, 2021

This PR adds support for getting a shrunk Tangy Form Response and automatic detection when a shrunk Tangy Form Response is set on a Tangy Form. It shrink by abbreviating common property names on inputs as well as removing unnecessary properties such as label.

Example of an input, big vs. shrunk:

image

@chrisekelley
Copy link
Member

chrisekelley commented Mar 5, 2021

This makes so much sense! If we are able to modify these property names, could we go even further? For example, these are state conditions that have little to do with the data that is used server-side (except for things like completed or disabled). Could we remove most of these - the things that don't change, such as label, and add them when rendered on client? We've already got that info in TangyFormsInfoService.getFormsInfo().

@chrisekelley
Copy link
Member

Thought a bit more about this - tangy-form already knows the form schema - doesn't it? There is the getMeta() function that stores the form metadata. Maybe we could handle this similar to how unlocking a form feeds this metadata to the 'UNLOCK' function in tangyform-reducer?

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