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

Truncate module owner's username if too long for view-only menu #5500

Closed
wpdarren opened this issue Jul 4, 2022 · 4 comments
Closed

Truncate module owner's username if too long for view-only menu #5500

wpdarren opened this issue Jul 4, 2022 · 4 comments
Labels
Good First Issue Good first issue for new engineers P2 Low priority Type: Enhancement Improvement of an existing feature

Comments

@wpdarren
Copy link
Collaborator

wpdarren commented Jul 4, 2022

Bug Description

While testing #5381 I identified a small observation/enhancement that was out of scope.

On Dashboard Sharing, in the view only menu, when you have an administrator with a username that is 25 characters or more, it causes problems with the layout. I am wondering if we should cut the username off at a certain amount of characters with ellipsis like we do on other parts of the plugin. As you can see from the screenshot on desktop it goes right to the edge. (and the same with mobile.). I realise 25 characters is a silly amount of characters for a username, but users be users! 😄

Screenshot

image

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

Acceptance criteria

  • The service owner area of the view-only menu should not extend beyond the menu, regardless of the length of its contents
  • Usernames that do not fit into the given area should be truncated with an ellipsis: e.g.

image

- The truncated element should show the full untruncated username on hover

Implementation Brief

  • Update .googlesitekit-view-only-menu__service--owner with the following additional CSS rules
    • text-overflow: ellipsis
    • overflow: hidden
  • Update the element containing the username (currently a strong tag) with a title attribute with the same value so that the full username is visible on hover

Test Coverage

  • Update VRT reference images for any affected view-only menu scenarios

QA Brief

  • Go to the Site Kit Dashboard as a view-only user.
  • Open the Dashboard Sharing view-only menu.
  • Verify that longer usernames are truncated with ellipsis (...) instead of just cutting off or going beyond the container (similar to the screenshot in the ACs).

Changelog entry

  • Truncate long usernames in Dashboard Sharing.
@wpdarren wpdarren added Type: Enhancement Improvement of an existing feature UX Issues that require UX input labels Jul 4, 2022
@aaemnnosttv aaemnnosttv self-assigned this Aug 2, 2022
@aaemnnosttv aaemnnosttv added P2 Low priority Good First Issue Good first issue for new engineers and removed UX Issues that require UX input labels Aug 2, 2022
@aaemnnosttv aaemnnosttv removed their assignment Aug 2, 2022
@aaemnnosttv aaemnnosttv changed the title Add ellipsis if admin username is more than 25 characters on view only menu Truncate module owner's username if too long for view-only menu Aug 2, 2022
@eugene-manuilov eugene-manuilov self-assigned this Aug 2, 2022
@eugene-manuilov
Copy link
Collaborator

Update .googlesitekit-view-only-menu__service--owner with the following additional CSS rules

  • text-overflow: ellipsis
  • overflow: hidden

@aaemnnosttv we should also add the title attribute with the owner name so that users can see it when they hover over the element.

@aaemnnosttv
Copy link
Collaborator

Good call @eugene-manuilov – I'll add this as well 👍

@eugene-manuilov
Copy link
Collaborator

Thanks, @aaemnnosttv. IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Aug 4, 2022
@nfmohit nfmohit self-assigned this Aug 22, 2022
@nfmohit nfmohit removed their assignment Aug 22, 2022
@tofumatt tofumatt self-assigned this Aug 22, 2022
tofumatt added a commit that referenced this issue Aug 22, 2022
…r-username

Truncate module owner username in view-only menu
@tofumatt tofumatt removed their assignment Aug 22, 2022
@wpdarren wpdarren self-assigned this Aug 23, 2022
@wpdarren
Copy link
Collaborator Author

QA Update: ✅

Verified:

  • Longer usernames are truncated with ellipsis (...) instead of just cutting off or going beyond the container (similar to the screenshot in the ACs).
Screenshot

image

@wpdarren wpdarren removed their assignment Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good first issue for new engineers P2 Low priority Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

6 participants