-
Notifications
You must be signed in to change notification settings - Fork 295
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
Adjust the CTA and "New" badge positions for widget areas on mobile and tablet viewports. #8863
Comments
This is something that I think needs a little confirmation from @sigal-teller and @techanvil. The CTA button here is attached to the widget area. We can make it show up in the footer of the widget area for mobile breakpoints (this will also apply globally and will impact the KM "Change metrics" CTA as well), but the Audience Segmentation widget area also has an additional InfoNoticeWidget underneath the audience tiles, so the "Change groups" CTA will appear below the InfoNoticeWidget. Is it okay to show it there, or do we want to do something else here? |
Thanks @kelvinballoo and @nfmohit. Showing the CTA below the widget area as per the mockup above looks fine to me. We do have a design in Figma showing the CTA on the same line as the source link: Applying it across the board, i.e. to the KM widget area as well also makes sense - here's how it currently looks at a narrow mobile viewport: Here's a mockup showing how it would look with the CTA below the widget area: As I've said it's all LGTM, but it would be good to get @sigal-teller's thoughts too. |
@techanvil Placing it below the widget LGTM (if we'll have the insight notice it will be placed below like it was mentioned here). In KMW it should also appear below the widget, per Figma design. Thanks! |
Thanks @sigal-teller. Just noting that, as per the Figma design, we'll show the CTA below the widget area up to a breakpoint of 782px, from 783px we'll show it above the widget area (see related comment thread). |
Noting that as discussed on Figma, we'll include the alignment of the "New" badge in this issue as well as the widget area CTA. |
Nice work on the IB here, @benbowler! Please look at my comments below:
I'm not sure we want to do this. For example, currently for a viewport of 784 pixels, Instead, we could do something like what we're doing in
If we do go with directly using
If we do go with directly using
Let's propose a mobile-first approach here, so that the suggested styles are added as default, and overridden on viewports with a min-width of Please let me know what you think, thank you! |
IB ✅ Thanks @benbowler ! |
Noting as per communication with @techanvil that the implementation of this ticket needed a bit more effort and action than the IB stated, mostly due to:
I will update the IB based on this, cc @benbowler @techanvil |
Also noting that due to eslint complexity violations (exceeded by 6 levels of complexity), resulting efforts included the separation of the new badge component into it's own WidgetNewBadge component, accepting a widget area slug as the only parameter. This will be detailed in the IB following updates. |
Bug Description
The 'Change groups' should appear at the bottom of the text
Understand how different visitor groups interact with your site
on mobile and tablet.Currently, it appears at the top.
Steps to reproduce
Screenshots
Implementation:
Figma:
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Widget area CTA position
Widget area "New" badge position
Implementation Brief
assets/js/googlesitekit/widgets/components/WidgetAreaRenderer.js
:useWindowWidth
hook, if the window width is>= 783px
render the CTA component in the widget area header.site-kit-wp/assets/js/googlesitekit/widgets/components/WidgetAreaRenderer.js
Lines 265 to 269 in 2da2d71
<= 782px
, render the CTA within a newCell
in the footerRow
component. Update the conditional block to make sure this row renders the CTA here regardless of if there is a Footer set but to only render the Footer if it exists.site-kit-wp/assets/js/googlesitekit/widgets/components/WidgetAreaRenderer.js
Lines 288 to 297 in 2da2d71
googlesitekit-widget-area-footer__cta
and update the CSS to match designs inassets/sass/widgets/_widget-area.scss
.assets/sass/widgets/_widget-area.scss
:.googlesitekit-widget-area-header__subtitle
, setting:flex-grow: 1
,display: flex
andjustify-content: space-between;
.min-width: $bp-tablet
, settingdisplay: block
to remove the space between flex on larger screens.WidgetNewBadge
, accepting a widgetslug
prop (required)WidgetAreaRenderer
component into said new componentWidgetAreaRenderer
componentTest Coverage
QA Brief
audienceSegmentation
feature flag enabledChangelog entry
The text was updated successfully, but these errors were encountered: