Skip to content

Use popover from guardian source components - #8116

Open
maloky wants to merge 4 commits into
mainfrom
jc/swap-popover
Open

Use popover from guardian source components#8116
maloky wants to merge 4 commits into
mainfrom
jc/swap-popover

Conversation

@maloky

@maloky maloky commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What are you doing in this PR?

Replace usage of floating-ui tooltip in favor of guardian Popover source component.
Only available on screens from desktop.

Asana Card

Why are you doing this?

floating-ui tooltip had some accessibility issues that are solved in the newly guardian Popover. On top of that we drop a external dependency.

How to test

  1. Go to the three tier landing page
  2. navigate using keyboard only to show/hide popover

Screenshots

Screenshot 2026-07-23 at 09 59 33

@maloky
maloky requested a review from a team as a code owner July 23, 2026 09:00
@github-actions

Copy link
Copy Markdown
Contributor

Size Change: -20.2 kB (-1.12%)

Total Size: 1.78 MB

📦 View Changed
Filename Size Change
support-frontend/public/compiled-assets/javascripts/subscriptionsLandingPage.js 106 kB -10.6 kB (-9.12%)
support-frontend/public/compiled-assets/webpack/119.js 0 B -11.1 kB (removed) 🏆
support-frontend/public/compiled-assets/webpack/131.js 0 B -45.5 kB (removed) 🏆
support-frontend/public/compiled-assets/webpack/132.js 45.5 kB +45.5 kB (new file) 🆕
support-frontend/public/compiled-assets/webpack/148.js 0 B -4.91 kB (removed) 🏆
support-frontend/public/compiled-assets/webpack/161.js 5.15 kB +5.15 kB (new file) 🆕
support-frontend/public/compiled-assets/webpack/581.js 34.7 kB +34.7 kB (new file) 🆕
support-frontend/public/compiled-assets/webpack/631.js 11.1 kB +11.1 kB (new file) 🆕
support-frontend/public/compiled-assets/webpack/645.js 0 B -3.46 kB (removed) 🏆
support-frontend/public/compiled-assets/webpack/657.js 0 B -4.51 kB (removed) 🏆
support-frontend/public/compiled-assets/webpack/761.js 4.51 kB +4.51 kB (new file) 🆕
support-frontend/public/compiled-assets/webpack/832.js 9.11 kB -891 B (-8.91%)
support-frontend/public/compiled-assets/webpack/869.js 0 B -34.6 kB (removed) 🏆
support-frontend/public/compiled-assets/webpack/993.js 3.45 kB -11.7 kB (-77.25%) 🏆
support-frontend/public/compiled-assets/webpack/GuardianAdLiteLanding.js 12.2 kB -673 B (-5.25%)
support-frontend/public/compiled-assets/webpack/LandingPage.js 19.4 kB +3.22 kB (+19.87%) 🚨
support-frontend/public/compiled-assets/webpack/oneTimeCheckout.js 10.5 kB +3.58 kB (+51.71%) 🆘
ℹ️ View Unchanged
Filename Size Change
support-frontend/public/compiled-assets/javascripts/[countryGroupId]/events/router.js 109 kB +100 B (+0.09%)
support-frontend/public/compiled-assets/javascripts/[countryGroupId]/router.js 174 kB +170 B (+0.1%)
support-frontend/public/compiled-assets/javascripts/ausMomentMap.js 108 kB +59 B (+0.05%)
support-frontend/public/compiled-assets/javascripts/downForMaintenancePage.js 86.5 kB +158 B (+0.18%)
support-frontend/public/compiled-assets/javascripts/error404Page.js 86.5 kB +156 B (+0.18%)
support-frontend/public/compiled-assets/javascripts/error500Page.js 86.4 kB +155 B (+0.18%)
support-frontend/public/compiled-assets/javascripts/favicons.js 43 B 0 B
support-frontend/public/compiled-assets/javascripts/paperSubscriptionLandingPage.js 110 kB +161 B (+0.15%)
support-frontend/public/compiled-assets/javascripts/payPalErrorPage.js 84.5 kB +173 B (+0.21%)
support-frontend/public/compiled-assets/javascripts/promotionTerms.js 90.3 kB +167 B (+0.19%)
support-frontend/public/compiled-assets/javascripts/switchesPage.js 28.4 kB -14 B (-0.05%)
support-frontend/public/compiled-assets/javascripts/unsupportedBrowserPage.js 77.3 kB +114 B (+0.15%)
support-frontend/public/compiled-assets/javascripts/weeklySubscriptionLandingPage.js 113 kB +172 B (+0.15%)
support-frontend/public/compiled-assets/webpack/241.js 4.19 kB 0 B
support-frontend/public/compiled-assets/webpack/561.js 23.9 kB +9 B (+0.04%)
support-frontend/public/compiled-assets/webpack/955.js 7.38 kB -14 B (-0.19%)
support-frontend/public/compiled-assets/webpack/checkout.js 32 kB 0 B
support-frontend/public/compiled-assets/webpack/errorPage.js 19.7 kB -1 B (-0.01%)
support-frontend/public/compiled-assets/webpack/sentry.js 109 kB 0 B
support-frontend/public/compiled-assets/webpack/StudentLandingPageGlobalContainer.js 1.74 kB +1 B (+0.06%)
support-frontend/public/compiled-assets/webpack/StudentLandingPageInstitutionContainer.js 720 B 0 B
support-frontend/public/compiled-assets/webpack/ThankYou.js 164 kB -292 B (-0.18%)

compressed-size-action

@maloky maloky added the feature Departmental tracking: work on a new feature label Jul 23, 2026
SvgTickRound,
} from '@guardian/source/react-components';
import Tooltip from 'components/tooltip/Tooltip';
import { useWindowWidth } from 'pages/aus-moment-map/hooks/useWindowWidth';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR necessarily but I wonder whether this should live somewhere other than the Australia moment map?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had the exact same thought. it should totally move out of there 👍

@rupertbates rupertbates left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 nice!

{promptText && <p css={copy}>{promptText}</p>}
<div css={buttonAndTooltipContainer}>
<div>
<div css={popoverStyles}>

@paul-daniel-dempsey paul-daniel-dempsey Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could set the background colour here? ie to stop this white on blue effect ->

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, great spot 👍

)}
<div css={[checkListTextCss, item.maybeGreyedOut]}>
{typeof item.text === 'string' ? (
<span css={checkListTextItemCss}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove associated styling checkListTextItemCss from this file too?

placement="bottom"
desktopOnly={true}
></Tooltip>
{item.toolTip && windowWidthIsGreaterThan('desktop') && (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat 👏

@paul-daniel-dempsey paul-daniel-dempsey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, ooks much simpler with this component.
Thinks there are a few visual colours diffs and possibly some minor cropping diffs too (see below) - all take or leave tbh
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants