Sponsored Content
The Wayback Machine - https://web.archive.org/web/20220409165310/https://github.com/google/site-kit-wp/issues/480
Skip to content
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

Most Popular Content Overlaps on Site Kit Dashboard #480

Closed
bengreeley opened this issue Aug 30, 2019 · 5 comments
Closed

Most Popular Content Overlaps on Site Kit Dashboard #480

bengreeley opened this issue Aug 30, 2019 · 5 comments
Labels
P0 Type: Bug
Milestone

Comments

@bengreeley
Copy link

@bengreeley bengreeley commented Aug 30, 2019 •

Bug Description

On certain breakpoints the content in the 'most popular content' section of the Site Kit dashboard overlaps and breaks out of the box (see screenshot). This happens when the screen width is anywhere between 1280px - 600px wide and the content within the box is long enough to not break.

Steps to reproduce

  1. Go to /wp-admin/admin.php?page=googlesitekit-dashboard
  2. Scroll down to the "Most popular content" box on the bottom of the page
  3. Resize your browser screen to any width between 1280 - 600 px (any height)
  4. See the text overlapping when there is specific content long enough to push content outside the box. For my example, this is the HTML that was pushing the content
<tr class="googlesitekit-table__body-row"><td class="googlesitekit-table__body-item"><div class="googlesitekit-table__body-item-content"><a class="
					googlesitekit-cta-link
					googlesitekit-table__body-item-link googlesitekit-cta-link--external googlesitekit-cta-link--inherit" href="/web/20110109013238/http://www.bengreeley.com/email.php" target="_blank" rel="noopener noreferrer">Ben Greeley - Central Maine Web Development and Design</a><br><a class="
					googlesitekit-cta-link
					googlesitekit-table__body-item-url
					googlesitekit-cta-link--external googlesitekit-cta-link--inherit" href="/web/20110109013238/http://www.bengreeley.com/email.php" target="_blank" rel="noopener noreferrer">web/20110109013238/http://www.bengreeley.com/email.php</a></div></td><td class="googlesitekit-table__body-item"><div class="googlesitekit-table__body-item-content">2</div></td></tr>

Screenshots

image

Additional Context

  • PHP Version: 7.2
  • OS: Mac
  • Browser Chrome
  • Plugin Version 1.0.0-beta.1.0.5 and 1.0.0-beta.1.0.4
  • Device: Desktop

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

Acceptance criteria

  • For any browser screen width, the contents of each tile on the dashboard should adjust to fit within the tile itself (either break or move to a new line).

Implementation Brief

The issue seems to be due to the way tables size themselves based on their contents (particularly th elements). The most reliable way seems to be setting the table to table-layout: fixed with width: 100%. The current table wrapper class already has a full width to it, so this would be more about adapting the fixed layouts where needed, if not for all tables.

  • Add new class for fixed table layouts
    E.g. googlesitekit-table--fixed
  • Define column sizing for tables that should use fixed layouts by adding <col> s

Alternatively only apply fixed layouts in smaller viewports, although this would be still vulnerable to wrapping in other viewports as it has to do with parent element size and the width of the content in the table headers defining the width of the rows.

Changelog entry

  • Fix style issues in various data tables which previously would break out of their parent containers on certain device widths.
@jamesozzie jamesozzie added the Type: Bug label Sep 2, 2019
@connorhsm
Copy link

@connorhsm connorhsm commented Oct 1, 2019

I believe I am experiencing this.
When the URL of a most popular item is too long, it overlaps and pushes all of the views statistics outside the container, which allows for horizontal scrolling.

@marrrmarrr marrrmarrr added the P0 label Oct 10, 2019
@felixarntz
Copy link
Member

@felixarntz felixarntz commented Oct 27, 2019

IB ✅

Let's fix this globally as you're recommending too, not only for narrow viewports.

@felixarntz
Copy link
Member

@felixarntz felixarntz commented Oct 30, 2019

@aaemnnosttv I was just notified by @westonruter that this also happens on e.g. the "Popularity" table (in case you weren't aware). So let's fix this for both cases. If you find more similar ones, of course those too (unless the fix would be different and more complex) :)

@aaemnnosttv aaemnnosttv assigned felixarntz and unassigned aaemnnosttv Nov 4, 2019
@lilybonney lilybonney added this to the 1.0.2 milestone Nov 4, 2019
@lilybonney lilybonney removed this from the 1.0.2 milestone Nov 4, 2019
@felixarntz felixarntz assigned aaemnnosttv and unassigned felixarntz Nov 4, 2019
@aaemnnosttv aaemnnosttv assigned felixarntz and unassigned aaemnnosttv Nov 5, 2019
@felixarntz felixarntz removed their assignment Nov 5, 2019
@felixarntz felixarntz added this to the 1.0.2 milestone Nov 5, 2019
@cole10up cole10up assigned cole10up and unassigned cole10up Nov 6, 2019
@tofumatt tofumatt self-assigned this Nov 7, 2019
@tofumatt
Copy link
Collaborator

@tofumatt tofumatt commented Nov 7, 2019

QA ✅

Looks good when scaled down to 800 x771:

Screenshot 2019-11-07 11 51 29

@tofumatt tofumatt removed their assignment Nov 7, 2019
@marrrmarrr
Copy link
Collaborator

@marrrmarrr marrrmarrr commented Nov 7, 2019

Verified, lgtm

@marrrmarrr marrrmarrr closed this Nov 7, 2019
@ThierryA ThierryA removed this from the 1.0.2 milestone Feb 3, 2020
@ThierryA ThierryA added this to the Sprint 10 milestone Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Type: Bug
Projects
None yet
Development

No branches or pull requests

10 participants