-
Notifications
You must be signed in to change notification settings - Fork 293
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
Icons overlapping idea title. #3839
Comments
@felixarntz The current layout uses MDC grid, which is based on media queries (as far as I can make out). In a sense, media queries are a bit redundant, because the widget can be 'mobile width' on a desktop viewport under the circumstances described (if alongside another widget). So we need a way to activate the mobile layout based on the width of the widget rather than the viewport. The only way I can think of to do this is to scrap the MDC grid and get the content to overflow and wrap as the container shrinks? So the layout issue can be solved this way, with the buttons tucking under the idea content as the width decreases. However, we have additional styles that kick in on mobile media queries that would be impossible to replicate in this way, for example the buttons are all visible on smaller viewports, whereas on desktop they are hidden unless you hover over them. I can't think of a way to have buttons hidden when they are inline but visible when they overflow. If only TD;DR I'm pretty sure we would need to make the buttons visible across all device widths to make this work. That's a pretty significant change to the design though, so I wanted to flag it to you before writing the IB. In the example below I've tried to demo this, just for clarity.
Worth checking with @asvinb too as his CSS skills are mightier than mine. Am I right in saying this? |
@johnPhillips Thanks for the detailed insights - I may have phrased the ACs overly broadly, the main thing we should accomplish is indeed for the buttons to appear in their own line below the idea for these viewport sizes. They don't need to 100% match the exact styles used on mobile, the goal is to prevent the overlap. |
Just to explain the consensus I arrived at with @asvinb, @aaemnnosttv and @eugene-manuilov in a slack conversation:
I have updated the IB accordingly. |
This works for me—thanks for the detailed discussion and reasoning behind the approach in the comments, it helped a lot! 👍🏻 IB ✅ |
@marrrmarrr @alex-moulin I pinged you on the PR for this #3920, can you share your thoughts there? |
@felixarntz for this one, both @marrrmarrr and @alex-moulin have responded on #3920 |
@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 |
I've created a little demo of @alex-moulin's idea hidden menu idea here.
Notes:
|
@johnPhillips Thanks, this works for me. Paging @marrrmarrr @alex-moulin to share their thoughts. It's somewhat urgent to make a decision here, is the above good to proceed? It's a rather drastic UI change of course, so I want to make sure we're all aligned. |
@johnPhillips @felixarntz this mock-up looks good to me. |
@johnPhillips @alex-moulin After reviewing again with @marrrmarrr, we've decided to go back to the original scope of the issue here and not change the design significantly at this point - the small menu also has some issues, e.g. it requires extra clicks to access, and a menu of vertical icons feels odd, e.g. since there is now an additional icon among them to just close the menu. At this point, something like the solution from #3839 (comment) is what we should go with. In other words, let's now follow the original ACs on the issue and create a PR for that. @johnPhillips It's okay to remove the hover state for now so that the icons always show for both mobile and desktop. When the PR is testable / previewable (e.g. on Storybook), we can make a final decision (i.e. make sure to request review by @marrrmarrr and myself), but it seems to me that removing the hover effect is the appropriate solution here, also since it will unblock #3907. |
@johnPhillips Actually 🤦 I forgot there already was a PR for this one. #3920 actually looks good to me as is when focused on purely the issue here. IMO we can move forward with that, unless there were outstanding problems? I know we still have the challenge of the hover state complicating #3907, but if it's for that, then we should discuss that part further in #3907 and keep it out of this issue here. |
That escalated quickly! PR is merged 😆 |
QA Update: ✅Verified that the icons in the Idea Hub dashboard widget does not overlap the text content across all breakpoints. ih-1.mp4 |
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
Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Using
assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/Idea.js
andassets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss
:div
s:<Grid>
and<Cell>
with<div>
s with the sameclassName
attributes (.googlesitekit-idea-hub__idea--actions
and.googlesitekit-idea-hub__idea--details
respectively).<Row>
can be replaced with a div with a suitable className (div.googlesitekit-idea-hub__idea--wrapper
for example).mdc-layout-grid-*
CSS that is now redundant.$bp-xlarge
(1280), use adisplay: block
-based layout, such that the.googlesitekit-idea-hub__idea--actions
wraps underneath the.googlesitekit-idea-hub__idea--details
.$bp-xlarge
, switch to a flex-based layout, such that the two divs are inlinedisplay: 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.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:
And an example screenshot:
Test Coverage
Visual Regression Changes
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: