Skip to content

Commit

Permalink
Merge pull request #4405 from google/enhancement/4340-unified-dashboa…
Browse files Browse the repository at this point in the history
…rd-context-titles

Add title and subtitle to Widget Contexts for Unified Dashboard.
  • Loading branch information
eugene-manuilov authored Nov 25, 2021
2 parents f9282d2 + 7291e3b commit a608bcb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ import { getWidgetLayout, combineWidgets } from '../util';
import { Cell, Grid, Row } from '../../../material-components';
import WidgetCellWrapper from './WidgetCellWrapper';
import InViewProvider from '../../../components/InViewProvider';
import { useFeature } from '../../../hooks/useFeature';

const { useSelect } = Data;

export default function WidgetAreaRenderer( { slug, totalAreas } ) {
const unifiedDashboardEnabled = useFeature( 'unifiedDashboard' );

const widgetAreaRef = useRef();
const intersectionEntry = useIntersection( widgetAreaRef, {
rootMargin: '0px',
Expand Down Expand Up @@ -138,7 +142,7 @@ export default function WidgetAreaRenderer( { slug, totalAreas } ) {
) }
ref={ widgetAreaRef }
>
{ totalAreas > 1 && (
{ ( unifiedDashboardEnabled || totalAreas > 1 ) && (
<Row>
<Cell
className="googlesitekit-widget-area-header"
Expand Down
14 changes: 7 additions & 7 deletions assets/js/googlesitekit/widgets/register-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export function registerDefaults( widgetsAPI ) {
'google-site-kit'
),
subtitle: __(
'Track your sites traffic over time',
'Track your site’s traffic over time',
'google-site-kit'
),
style: WIDGET_AREA_STYLES.BOXES,
Expand Down Expand Up @@ -275,7 +275,7 @@ export function registerDefaults( widgetsAPI ) {
'google-site-kit'
),
subtitle: __(
'Track your revenue over time',
'Track your AdSense revenue over time',
'google-site-kit'
),
style: WIDGET_AREA_STYLES.BOXES,
Expand All @@ -296,7 +296,7 @@ export function registerDefaults( widgetsAPI ) {
'google-site-kit'
),
subtitle: __(
'Track your sites traffic over time',
'Track traffic to this page over time',
'google-site-kit'
),
style: WIDGET_AREA_STYLES.BOXES,
Expand All @@ -310,7 +310,7 @@ export function registerDefaults( widgetsAPI ) {
{
title: __( 'See how your content is doing', 'google-site-kit' ),
subtitle: __(
'Keep track of your most popular pages and how people found them from Search',
'Understand how people found this page from Search',
'google-site-kit'
),
style: WIDGET_AREA_STYLES.BOXES,
Expand All @@ -323,11 +323,11 @@ export function registerDefaults( widgetsAPI ) {
AREA_ENTITY_DASHBOARD_SPEED_PRIMARY,
{
title: __(
'Find out how visitors experience your site',
'Find out how visitors experience this page',
'google-site-kit'
),
subtitle: __(
'Keep track of how fast your pages are and get specific recommendations on what to improve',
'Keep track of how fast your page is and get specific recommendations on what to improve',
'google-site-kit'
),
style: WIDGET_AREA_STYLES.BOXES,
Expand All @@ -344,7 +344,7 @@ export function registerDefaults( widgetsAPI ) {
'google-site-kit'
),
subtitle: __(
'Track your revenue over time',
'Track your AdSense revenue over time',
'google-site-kit'
),
style: WIDGET_AREA_STYLES.BOXES,
Expand Down

0 comments on commit a608bcb

Please sign in to comment.