question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Icons overlapping idea title.

See original GitHub issue

Bug Description

When the browser is resized to 960px, upon hovering an idea, the icons are displayed on top of the idea name.

Steps to reproduce

  1. Go to Site Kit dashboard
  2. Scroll down to Idea Hub widget
  3. Resize browser to 960px
  4. Hover a suggested idea.
  5. See error

Screenshots

Additional Context

  • Browser: Chrome

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • For viewports where the Idea Hub widget appears in a narrow state (even if this viewport is technically not “mobile”), the buttons on each idea should appear below the idea rather than on the right of the idea, similar to how it is in the current mobile layout.

Implementation Brief

Using assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/Idea.js and assets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss:

  • Replace the grid layout with normal divs:
    • Replace the <Grid> and <Cell> with <div>s with the same className attributes (.googlesitekit-idea-hub__idea--actions and .googlesitekit-idea-hub__idea--details respectively).
    • The <Row> can be replaced with a div with a suitable className (div.googlesitekit-idea-hub__idea--wrapper for example).
    • Remove any mdc-layout-grid-* CSS that is now redundant.
  • Refactor the layout CSS:
    • For viewports below $bp-xlarge (1280), use a display: block-based layout, such that the .googlesitekit-idea-hub__idea--actions wraps underneath the .googlesitekit-idea-hub__idea--details.
    • For viewports above $bp-xlarge, switch to a flex-based layout, such that the two divs are inline
    • The media query which adds a display: none rule to the .googlesitekit-idea-hub__actions--delete, .googlesitekit-idea-hub__actions--pin and .googlesitekit-idea-hub__actions--unpin should be updated so that it applies to viewports above $bp-xlarge. This means that the action buttons are all visible when they wrap.
    • Similarly, the media query that applies justify-content: flex-end; to .googlesitekit-idea-hub__actions should be updated to apply to viewports above $bp-xlarge, so that the action buttons are left-aligned when they wrap.

Here is a gist:

	// Replace grid layout with normal divs
	return (
		<div className="googlesitekit-idea-hub__idea--single">
			<div className="example-css">
				<div className="googlesitekit-idea-hub__idea--details"> ... </div>
				<div className="googlesitekit-idea-hub__idea--actions"> ... </p>
			</div>
		</div>

@media (min-width: $bp-xlarge) {
	/* Use a flex layout above 1200 */
	.example-css {
		display: flex;
		padding: 12px 24px; /* use variables, this is just to illustrate */
		justify-content: space-between;
	}

	/* The following action buttons are hidden above 1200 */
	.googlesitekit-idea-hub__actions--delete,
	.googlesitekit-idea-hub__actions--pin,
	.googlesitekit-idea-hub__actions--unpin {
			display: none;
	}

	/* The  actions are right-aligned */
	.googlesitekit-idea-hub__idea--actions {
		justify-content: flex-end;
	}
}

And an example screenshot:

Below 1200 Above 1200
Screenshot 2021-08-18 at 16 09 40 Screenshot 2021-08-18 at 16 15 23

Test Coverage

  • No new tests required.

Visual Regression Changes

  • Images dealing with the Idea Hub Dashboard widget might need to be updated.

QA Brief

  • Check that the icons in the Idea Hub dashboard widget does not overlap the text content across all breakpoints.

Changelog entry

  • Ensure the icon buttons in the Idea Hub widget do not overlap idea labels.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
aaemnnosttvcommented, Aug 26, 2021

@eclarke1 I don’t think we can implement the suggested changes without more definition. Ideally we should establish some secondary ACs and design to work from in which case it might make more sense to address in a follow up issue. Cc: @felixarntz

1reaction
johnPhillipscommented, Aug 31, 2021

I’ve created a little demo of @alex-moulin’s idea hidden menu idea here.

https://google.github.io/site-kit-wp/storybook/pull/3966/?path=/story/modules-idea-hub-widgets-dashboardideaswidget--ready

Smaller screen Larger screen
Screenshot 2021-08-31 at 13 32 58 Screenshot 2021-08-31 at 13 33 18

Notes:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: How to handle visual header overlap title
Solved: Hi guys, Want to ask how usually we handle the visual header which sometime overlap its visual title, basically when title is...
Read more >
36+ Best Overlapping Logo Images, Photos & Ideas - 99Designs
Overlapping logo ideas? We've collected some amazing examples of overlapping logos, ... Overlapping logo with the title 'pin + play button overlap concept'....
Read more >
Icons Overlap on Resize - HTML & CSS - SitePoint Forums
I've created a sidebar containing some icons - some top-aligned, some bottom aligned. When the browser is resized the icons overlap and I'd ......
Read more >
ICONs overlapping on desktop - Microsoft Community
I have all of my ICONs are pasted over the top of each other. when you go to click on a ICON it...
Read more >
Overlapping of icons in status bar whilst on home screen
Title : Overlapping of icons in status bar whilst on home screenDevice: OnePlus7TSoftware Version: O2 OBT 201019Probablility of occurance: 5_100%Topic: Bug ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found