[NO QA] Disable the switch when there is accounting connection#39895
Conversation
|
NAB: but for the state where the toggle has the lock, are we calling that "disabled" in the code? I would think "locked" is a better term for that. |
It is disabled though? Basing this comment on props found here (so take this with a grain of salt), but wouldn't these props look something like this? Locked, Switched on Locked, Switched off Not locked, Switched on Not locked, Switched off 🤷♂️ |
|
Hmm you do make some great points, you are right that it is technically disabled. I guess the difference between a disabled toggle and a disabled button feels a bit odd - in one case we just show a lock icon, but in another case we show reduced opacity. BUT that's neither here nor there - let's carry on with disabled as the proper name. Thanks for hearing me out! |
I 1,000,000% agree that this is WEIRD. Not saying we should discuss it/decide it/whatever it here, but I do think we need to establish better disabled states across components. I originally suggested a reduced opacity toggle for this situation (to show that it's disabled) but the pushback I always get when suggesting the reduced opacity disabled pattern for anything (to mimic our buttons) is that it looks too much like the offline state. So that needs to be figured out. Anyways thanks for hearing me out! We'll tackle this in some other spot that is neither here nor there! |
|
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@hayata-suenaga You need to connect the disabled prop to the |
|
removing the hold off the PR as this PR was merged |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
@hayata-suenaga Please add NoQA here. |
|
@yuwenmemon Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
mountiny
left a comment
There was a problem hiding this comment.
@hayata-suenaga small changes requested
mountiny
left a comment
There was a problem hiding this comment.
Thank you! Looks good now
|
@hayata-suenaga will you add the note about auto-enabling the features when integration is set up somewhere so we dont forget to do that later? Thanks! |
|
|
✋ 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/mountiny in version: 1.4.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
When the accounting integration feature is enabled, force enable
categoriesandtagsfeatures and prevent the user from disabling these two features.When the accounting integration feature is enabled and the user configure to sync tax data with the connected accounting software, force enable the
taxfeature and prevent the user from disabling it.Fixed Issues
$ #39724
PROPOSAL: N/A
Tests
There is no good way to test this as the code to connect to the accounting software has not merged yet. This PR will be tested in the PR that adds the code to connect to accounting software.
Offline tests
N/A
QA Steps
NO QA
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAs there is no good way to test this right now, I just confirmed that the changes in this PR didn't break anything by running the web app. You can find the screenshot of it in the web section
toggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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