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.

Fix font problems in Idea Hub widget

See original GitHub issue

Bug Description

There are two problems with the title of the Idea Hub widget, one pointed out in https://github.com/google/site-kit-wp/issues/3810#issuecomment-916170914. In addition, the title font here is Google Sans, which was like that in the original Figma file, but this should actually use Roboto like we do elsewhere.


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

Acceptance criteria

  • Both the Idea Hub widget title and the experimental label (in general, not only for the Idea Hub widget) should use our regular Roboto font instead of Google Sans.
  • When the experimental label breaks into a new line, it shouldn’t appear as if it was indented.

Implementation Brief

  • Inside assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js:
    • Add the class .googlesitekit-subheading-1 to the h3.googlesitekit-idea-hub__title. This will change the font-family to Roboto.
    • Wrap the text inside h3.googlesitekit-idea-hub__title in a <span>, with a className such as .googlesitekit-idea-hub__title-text.
    • In other words the h3 should now have two children: the new span and the <Badge>.

Inside assets/sass/components/global/_googlesitekit-badge.scss:

  • Remove the margin from .googlesitekit-badge. This margin is the reason for the indentation.

Inside assets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss:

  • Increase the line-height of .googlesitekit-idea-hub__title to 1.5. This will create a bit more space between the lines when the badge wraps.
  • Create a new rule for the new span.googlesitekit-idea-hub__title-text, and give it a padding-right of 12px. This will create the space that the margin on the badge provided, but will not indent the badge when it wraps.

Test Coverage

  • No new tests required.

Visual Regression Changes

  • Images dealing with the Idea Hub dashboard widget might need updating.

QA Brief

  • Verify that the ACs above have been met

Changelog entry

  • Fix font problems in the Idea Hub widget.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
johnPhillipscommented, Sep 15, 2021

@felixarntz disregard, sorry. It’s in the ACs 🤦

0reactions
wpdarrencommented, Sep 20, 2021

QA Update: ✅

Verified:

  • Both the Idea Hub widget title and the experimental label should use our regular Roboto font instead of Google Sans. – Screenshot 1 - Screenshot 2

  • When the experimental label breaks into a new line, it shouldn’t appear as if it was indented. - Screenshot

  • The issue reported here is fixed.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

SDK widgets too small for font - SDK - jMonkeyEngine Hub
I've just installed jmomkeyplatform on Debian Linux with GNOME 3 and there's a problem with the SDK's GUI. Most of the widgets are...
Read more >
Modules / Idea Hub / Setup - Setup form ⋅ Storybook - Google
I agree that Idea Hub will track my usage of the feature (e.g. creating a draft; saving/dismissing ideas) in order to provide better...
Read more >
Performance Analytics widgets
Widgets enable you to define visualizations for indicator scores. ... Analytics Hub for a specific indicator ... Resolve intent issues.
Read more >
Rich Text Widget Not Saving Content - HubSpot Community
Solved: Our blog template has a rich text module. The template has been around for a long time and everything was working fine....
Read more >
Working with code problems in IntelliJ IDEA - The JetBrains Blog
Click on the Inspections widget in the editor or use the Ctrl/Cmd+6 shortcut to open it. The Current File tab shows the list...
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