-
Notifications
You must be signed in to change notification settings - Fork 121
[CIAB] Hide Blaze and Payments from hub menu #16096
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
[CIAB] Hide Blaze and Payments from hub menu #16096
Conversation
|
|
8240073 to
97b5f1d
Compare
97b5f1d to
c85ccdf
Compare
itsmeichigo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and confirmed that Blaze and Payments are only available for non-CIAB sites.
I'm confused that Blaze is also hidden from dashboard, while that seems to be part of a draft PR. Could this be an issue with splitting code from a bigger change?
I left some nit-picking in the comments.
| guard | ||
| site.isAdmin, | ||
| site.canBlaze, | ||
| siteCIABEligibilityChecker.isFeatureSupported(.blaze, for: site) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please consider adding unit tests to check for this condition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in c337898
| stores: StoresManager = ServiceLocator.stores, | ||
| generalAppSettings: GeneralAppSettingsStorage = ServiceLocator.generalAppSettings, | ||
| inboxEligibilityChecker: InboxEligibilityChecker = InboxEligibilityUseCase(), | ||
| blazeEligibilityChecker: BlazeEligibilityCheckerProtocol = BlazeEligibilityChecker(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we inject CIABEligibilityChecker to this checker too?
| blazeEligibilityChecker: BlazeEligibilityCheckerProtocol = BlazeEligibilityChecker(), | |
| blazeEligibilityChecker: BlazeEligibilityCheckerProtocol? = nil, |
then inside init:
self.blazeEligibilityChecker = blazeEligibilityChecker ?? BlazeEligibilityChecker(siteCIABEligibilityChecker: siteCIABEligibilityChecker)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for the attention here.
I'd still prefer to leave it. If we make a fallback to BlazeEligibilityChecker(...) for the nil blazeEligibilityChecker argument and them purposely (for whatever reason) pass nil - it will be neglected and overridden by the ?? operator.
Currently the BlazeEligibilityChecker() initializer already has a default value for the siteCIABEligibilityChecker so we should be good. Even if there are different CIABEligibilityChecker instances - they can work independently and show correct results.
@itsmeichigo Thx for the review. That's true. After starting the work on the dashboard cards hiding I also got confused because there was no Blaze card. Turned out to be a bug where the default site was nil upon check in In that draft PR I reworked it and bound to reactive |

WOOMOB-1272
Description
Utilizes
CIABEligibilityCheckerand conditionally removes "Payments" and "Blaze" options from Hub Menu. Also InjectsCIABEligibilityCheckerintoBlazeEligibilityChecker.BlazeEligibilityCheckernow takes into account if the site is CIAB.Non-CIAB site testing case (default behaviour)
CIAB site testing case
Testing Info
Tested the above steps on iPhone Simulator 18.4
RELEASE-NOTES.txtif necessary.