Uh oh!
There was an error while loading. Please reload this page.
OUT-4156: disable settings section for non-US QBO portals - #285
Open
SandipBajracharya wants to merge 1 commit into
Open
OUT-4156: disable settings section for non-US QBO portals#285SandipBajracharya wants to merge 1 commit into
SandipBajracharya wants to merge 1 commit into
Conversation
Non-US QBO portals cannot sync, but the settings section stayed interactive. Reuse the disconnected-state overlay (opacity + click capture) and add `inert` so pointer and keyboard/AT users alike are blocked while connected to a non-US account or during the country check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR disables the dashboard settings surface while disconnected, while the QuickBooks company-country check is running, or when a non-US company is detected.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable issue identified. The settings wrapper remains mounted while disabled, preserves local drafts, and consistently applies the expanded connection and country-state interaction guard. Important Files Changed
Reviews (1): Last reviewed commit: "fix(OUT-4156): disable settings section ..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
OUT-4156
When an IU connects to a non-US QBO account the integration can't sync, so the app already shows an error callout and disables the "Enable app" button. But the settings section stayed fully interactive — IUs could still expand accordions and edit/save service, account, and invoice mappings that would never take effect.
This disables the whole settings section for non-US portals.
Approach
settingsDisabled = !portalConnectionStatus || nonUsCompanyChecking || nonUsCompany, extending the existing disconnected-state gate to also cover non-US portals and the in-flight country check.opacity-25+ a full-coverz-10click-capture div) rather than threading adisabledprop throughSettingAccordion→Accordion→ three sub-sections (DRY).inerton the wrapper so keyboard / screen-reader users are blocked too, not just the mouse. Applied via a conditional spread ({...(settingsDisabled ? { inert: true } : {})}) so the attribute is fully absent when enabled.Behaviour
catchleavesnonUsCompanyfalsy, so majority US portals are never locked out of their settings.useAppBridge), outside this block.Notes
inertaddition closes the a11y gap it flagged.@types/reactis v19 (types expectinert: boolean) while runtime is React 18; the conditional-spread form is correct for both.src/components/dashboard/Main.tsx. No test exists for this component; happy to add one if desired.🤖 Generated with Claude Code