feat: add types for report fields#33034
Conversation
Reviewer Checklist
Screenshots/Videos |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #32994 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
thienlnam
left a comment
There was a problem hiding this comment.
Just a couple comments regarding the types
|
|
||
| /** Type of report field */ | ||
| type: PolicyReportFieldType; | ||
| }; |
There was a problem hiding this comment.
We will need a couple more here
value, and values (for dropdown values)
and then I'm still looking into this but possible required (looking into this today)
There was a problem hiding this comment.
It turns out we'll need the deletable key as well, that will indicate whether or not it is required or not
There was a problem hiding this comment.
@thienlnam Can we rename these in our code? I was thinking that it makes more sense to call it required and options instead of deletable and values?
There was a problem hiding this comment.
I mean we can update them just for the front-end but to modify these keys in the BE it will be more work than it is worth due to updating oldApp as well.
I will update these keys when we re-format them from onyx to be required and options
There was a problem hiding this comment.
Actually thinking about this more, I think this will just end up adding more confusion in the future with the disconnect between the keys
Deletable is also representative of the fields that no longer exist on old reports but no longer on the policy, and I don't know if we should just rename a single key (values is still pretty intuitive)
There was a problem hiding this comment.
Fine by me. I'll change this so that it matches what we have already.
| defaultValue: string; | ||
|
|
||
| /** Unique id of the field */ | ||
| fieldId: string; |
| @@ -0,0 +1,22 @@ | |||
| type PolicyReportFieldType = "text" | "date" | "dropdown"; | |||
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.4.15-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.15-5 🚀
|






Details
Fixed Issues
$ #32994
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop