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

Enhancement/4078 content area widgets #4131

Merged
merged 21 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ebfec7f
Add required areas.
eugene-manuilov Sep 27, 2021
371e420
Update the DashboardPopularKeywordsWidget widget.
eugene-manuilov Sep 27, 2021
af7076a
Update the DashboardIdeasWidget widget.
eugene-manuilov Sep 27, 2021
542f527
Update the DashboardPopularPagesWidget widget.
eugene-manuilov Sep 27, 2021
df4f0f5
Add the correct width for the DashboardPopularPagesWidget widget.
eugene-manuilov Sep 27, 2021
1a80100
Merge remote-tracking branch 'origin/develop' into enhancement/4078-c…
eugene-manuilov Sep 28, 2021
9d9e9ef
Restore base path in CSS output filename.
aaemnnosttv Sep 28, 2021
8536185
Update setup form to check scopes before submitting the form.
eugene-manuilov Sep 15, 2021
85b5442
Fix ga4 issues.
eugene-manuilov Sep 23, 2021
cf2888a
Fix missing dialog issue.
eugene-manuilov Sep 23, 2021
aaee6f4
Revert UA property and profile checks.
eugene-manuilov Sep 27, 2021
13bb60c
Update error title.
eugene-manuilov Sep 27, 2021
0f2a20f
Rework UA/GA4 settings to save GA4 settings before UA settings only i…
eugene-manuilov Sep 28, 2021
f2a37b6
Revert whitespace changes.
eugene-manuilov Sep 28, 2021
602d41d
Scaffold out DashboardMainApp and DashboardEntityApp.
johnPhillips Sep 16, 2021
1e85272
Remove debug statement.
johnPhillips Sep 24, 2021
283f687
Remove folder structure for Dashboard apps (CR feedback).
johnPhillips Sep 28, 2021
5b11db3
Merge remote-tracking branch 'origin/develop' into enhancement/4078-c…
eugene-manuilov Sep 29, 2021
5e09845
Merge branch 'develop' into enhancement/4078-content-area-widgets.
tofumatt Oct 8, 2021
1bcc35d
Fix widget registration behind feature flags.
tofumatt Oct 8, 2021
5a8270f
Restore removed module from merge.
tofumatt Oct 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions assets/js/googlesitekit/widgets/default-areas.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ export const AREA_PAGE_DASHBOARD_SEARCH_FUNNEL = 'pageDashboardSearchFunnel';
export const AREA_PAGE_DASHBOARD_ALL_TRAFFIC = 'pageDashboardAllTraffic';
export const AREA_PAGE_DASHBOARD_ACQUISITION = 'pageDashboardAcquisition';
export const AREA_PAGE_DASHBOARD_SPEED = 'pageDashboardSpeed';

export const AREA_MAIN_DASHBOARD_MONETIZATION_PRIMARY =
'mainDashboardMonetizationPrimary';
export const AREA_MAIN_DASHBOARD_CONTENT_PRIMARY =
'mainDashboardContentPrimary';

export const AREA_ENTITY_DASHBOARD_CONTENT_PRIMARY =
'entityDashboardContentPrimary';

export default {
AREA_DASHBOARD_ALL_TRAFFIC,
Expand All @@ -39,5 +45,7 @@ export default {
AREA_PAGE_DASHBOARD_ALL_TRAFFIC,
AREA_PAGE_DASHBOARD_ACQUISITION,
AREA_PAGE_DASHBOARD_SPEED,
AREA_MAIN_DASHBOARD_CONTENT_PRIMARY,
AREA_MAIN_DASHBOARD_MONETIZATION_PRIMARY,
AREA_ENTITY_DASHBOARD_CONTENT_PRIMARY,
};
5 changes: 3 additions & 2 deletions assets/js/modules/analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
AREA_DASHBOARD_SEARCH_FUNNEL,
AREA_PAGE_DASHBOARD_SEARCH_FUNNEL,
AREA_DASHBOARD_ACQUISITION,
AREA_MAIN_DASHBOARD_CONTENT_PRIMARY,
} from '../../googlesitekit/widgets/default-areas';
import { WIDGET_AREA_STYLES } from '../../googlesitekit/widgets/datastore/constants';
import AnalyticsIcon from '../../../svg/analytics.svg';
Expand Down Expand Up @@ -118,11 +119,11 @@ export const registerWidgets = ( widgets ) => {
'analyticsPopularPages',
{
Component: DashboardPopularPagesWidget,
width: widgets.WIDGET_WIDTHS.HALF,
width: [ widgets.WIDGET_WIDTHS.HALF, widgets.WIDGET_WIDTHS.FULL ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eugene-manuilov I was wondering: will this mean that this widget could start appearing full width on the current dashboard and cause some regressions?
If so, maybe we should use the feature flag to conditionally apply them?
Let me know what you think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, it could appear full width on the current dashboard, but it will happen only if there are no other widgets fit into that row. So, I don't think we need to use the feature flag here.

priority: 3,
wrapWidget: false,
},
[ AREA_DASHBOARD_ACQUISITION ]
[ AREA_DASHBOARD_ACQUISITION, AREA_MAIN_DASHBOARD_CONTENT_PRIMARY ]
);

widgets.registerWidget(
Expand Down
8 changes: 5 additions & 3 deletions assets/js/modules/idea-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import { __ } from '@wordpress/i18n';
import { MODULES_IDEA_HUB } from './datastore/constants';
import { registerStore as registerDataStore } from './datastore';
import { isFeatureEnabled } from '../../features';
import { AREA_DASHBOARD_ACQUISITION } from '../../googlesitekit/widgets/default-areas';

import {
AREA_DASHBOARD_ACQUISITION,
AREA_MAIN_DASHBOARD_CONTENT_PRIMARY,
} from '../../googlesitekit/widgets/default-areas';
import DashboardIdeasWidget from './components/dashboard/DashboardIdeasWidget';
import IdeaHubIcon from '../../../svg/idea-hub.svg';
import { SettingsView } from './components/settings';
Expand Down Expand Up @@ -70,6 +72,6 @@ export const registerWidgets = ifIdeaHubIsEnabled( ( widgets ) => {
priority: 2,
wrapWidget: false,
},
[ AREA_DASHBOARD_ACQUISITION ]
[ AREA_DASHBOARD_ACQUISITION, AREA_MAIN_DASHBOARD_CONTENT_PRIMARY ]
);
} );
9 changes: 8 additions & 1 deletion assets/js/modules/search-console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import ModuleOverviewWidget from './components/module/ModuleOverviewWidget';
import {
AREA_DASHBOARD_ACQUISITION,
AREA_DASHBOARD_SEARCH_FUNNEL,
AREA_ENTITY_DASHBOARD_CONTENT_PRIMARY,
AREA_MAIN_DASHBOARD_CONTENT_PRIMARY,
AREA_PAGE_DASHBOARD_ACQUISITION,
AREA_PAGE_DASHBOARD_SEARCH_FUNNEL,
} from '../../googlesitekit/widgets/default-areas';
Expand Down Expand Up @@ -85,7 +87,12 @@ export const registerWidgets = ( widgets ) => {
priority: 1,
wrapWidget: false,
},
[ AREA_DASHBOARD_ACQUISITION, AREA_PAGE_DASHBOARD_ACQUISITION ]
[
AREA_DASHBOARD_ACQUISITION,
AREA_PAGE_DASHBOARD_ACQUISITION,
AREA_MAIN_DASHBOARD_CONTENT_PRIMARY,
AREA_ENTITY_DASHBOARD_CONTENT_PRIMARY,
]
);
widgets.registerWidget(
'searchConsoleModuleOverview',
Expand Down