- Notifications
You must be signed in to change notification settings - Fork 0
Fix mobile differential compare action#684
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
14 changes: 10 additions & 4 deletions
14 src/components/clinical-dashboard/master-search-header.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -235,7 +235,7 @@ export function MasterSearchHeader({ | ||
| * search pill sits in the middle of the hero on phones as well as desktop | ||
| * instead of docking to the bottom edge. */ | ||
| desktopHomeComposerSlotId?: string; | ||
| /** Phone-only slot rendered above the bottom search pill for page-specific dock addons. */ | ||
| /** Mobile/tablet slot rendered above the search pill for page-specific composer addons. */ | ||
| mobileBottomSearchAddonSlotId?: string; | ||
| mobileLeadingAction?: "menu" | "back"; | ||
| onMobileBack?: () => void; | ||
| @@ -321,7 +321,9 @@ export function MasterSearchHeader({ | ||
| searchComposerVisible && | ||
| !desktopHomeComposerSlotId && | ||
| (isAnswerFooterComposer || mobileSearchPlacement === "bottom"); | ||
| const bottomComposerScrollHiddenActive = Boolean(hideOnScroll && phoneBottomSearchDockActive); | ||
| const bottomComposerScrollHiddenActive = Boolean( | ||
| hideOnScroll && phoneBottomSearchDockActive && !mobileBottomSearchAddonSlotId, | ||
| ); | ||
| const bottomComposerHidden = | ||
| bottomComposerScrollHiddenActive && | ||
| scrollHidden && | ||
| @@ -1188,7 +1190,11 @@ export function MasterSearchHeader({ | ||
| const ModeIdentityIcon = appModeIcons[searchMode]; | ||
| const hasScopeFooterChip = searchMode === "answer" || searchMode === "documents" || searchMode === "forms"; | ||
| const usesPhoneFooterDock = usesBottomComposerPlacement && usesPhoneSearchLayout; | ||
| const shouldHideBottomOnScroll = Boolean(hideOnScroll && usesPhoneFooterDock); | ||
| // A differential comparison is a persistent batch action: hiding its host | ||
| // dock on downward scroll makes the CTA slide under mobile browser chrome | ||
| // and disables pointer events just when users finish reviewing the list. | ||
| // Keep that dock pinned while the header can still collapse independently. | ||
| const shouldHideBottomOnScroll = Boolean(hideOnScroll && usesPhoneFooterDock && !mobileBottomSearchAddonSlotId); | ||
coderabbitai[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. BigSimmo marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| // Phone submitted non-answer result docks reserve pill-only scroll | ||
| // clearance (ClinicalDashboard <main> margins / global-search-shell | ||
| // mobileComposerReserve), so an extra notice line would push the fixed | ||
| @@ -1237,7 +1243,7 @@ export function MasterSearchHeader({ | ||
| )} | ||
| > | ||
| {usesBottomComposerPlacement ? <div className="answer-footer-search-backdrop" aria-hidden="true" /> : null} | ||
| {usesPhoneFooterDock && mobileBottomSearchAddonSlotId ? ( | ||
| {usesMobileBottomStyle && mobileBottomSearchAddonSlotId ? ( | ||
| <div | ||
| id={mobileBottomSearchAddonSlotId} | ||
| className="differentials-mobile-search-addon relative z-10 w-full empty:hidden" | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| export const modeHomeDesktopComposerSlotId = "mode-home-desktop-composer-slot"; | ||
| /** Phone-only slot in the bottom search dock for differentials compare actions. */ | ||
| /** Mobile/tablet search-composer slot for differentials compare actions. */ | ||
| export const differentialsMobileCompareAddonSlotId = "differentials-mobile-compare-addon-slot"; |
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
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.
Uh oh!
There was an error while loading. Please reload this page.