Skip to content

Commit

Permalink
feat(web-analytics): Some UI tweaks (#24684)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c authored Aug 29, 2024
1 parent 0026c21 commit 261a2f5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function InsightVizDisplay({
const BlockingEmptyState = (() => {
if (insightDataLoading) {
return (
<div className="flex flex-col flex-1 justify-center items-center">
<div className="flex flex-col flex-1 justify-center items-center p-2">
<InsightLoadingState queryId={queryId} key={queryId} insightProps={insightProps} />
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export const WebStatsTableTile = ({

const pathCleaningSettingsUrl = urls.settings('project-product-analytics', 'path-cleaning')
return (
<div className="border rounded bg-bg-light flex-1">
<div className="border rounded bg-bg-light flex-1 flex flex-col">
{showPathCleaningControls && (
<div className="flex flex-row items-center justify-end m-2 mr-4">
<div className="flex flex-row items-center space-x-2">
Expand Down
67 changes: 25 additions & 42 deletions frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
[
{
id: PathTab.PATH,
title: 'Top paths',
title: 'Paths',
linkText: 'Path',
query: {
full: true,
Expand All @@ -664,7 +664,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: PathTab.INITIAL_PATH,
title: 'Top entry paths',
title: 'Entry paths',
linkText: 'Entry path',
query: {
full: true,
Expand All @@ -688,8 +688,8 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: PathTab.EXIT_PATH,
title: 'Top exit paths',
linkText: 'Exit path',
title: 'End paths',
linkText: 'End path',
query: {
full: true,
kind: NodeKind.DataTableNode,
Expand Down Expand Up @@ -725,7 +725,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
tabs: [
{
id: SourceTab.CHANNEL,
title: 'Top channels',
title: 'Channels',
linkText: 'Channel',
query: {
full: true,
Expand Down Expand Up @@ -763,7 +763,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: SourceTab.REFERRING_DOMAIN,
title: 'Top referrers',
title: 'Referrers',
linkText: 'Referring domain',
query: {
full: true,
Expand All @@ -784,7 +784,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([

{
id: SourceTab.UTM_SOURCE,
title: 'Top sources',
title: 'UTM sources',
linkText: 'UTM source',
query: {
full: true,
Expand All @@ -804,7 +804,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: SourceTab.UTM_MEDIUM,
title: 'Top UTM medium',
title: 'UTM medium',
linkText: 'UTM medium',
query: {
full: true,
Expand All @@ -824,7 +824,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: SourceTab.UTM_CAMPAIGN,
title: 'Top UTM campaigns',
title: 'UTM campaigns',
linkText: 'UTM campaign',
query: {
full: true,
Expand All @@ -844,7 +844,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: SourceTab.UTM_CONTENT,
title: 'Top UTM content',
title: 'UTM content',
linkText: 'UTM content',
query: {
full: true,
Expand All @@ -864,7 +864,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: SourceTab.UTM_TERM,
title: 'Top UTM terms',
title: 'UTM terms',
linkText: 'UTM term',
query: {
full: true,
Expand Down Expand Up @@ -916,44 +916,27 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
tabs: [
{
id: DeviceTab.DEVICE_TYPE,
title: 'Device types',
title: 'Device type',
linkText: 'Device type',
query: {
kind: NodeKind.InsightVizNode,
full: true,
kind: NodeKind.DataTableNode,
source: {
kind: NodeKind.TrendsQuery,
breakdownFilter: { breakdown: '$device_type', breakdown_type: 'event' },
kind: NodeKind.WebStatsTableQuery,
properties: webAnalyticsFilters,
breakdownBy: WebStatsBreakdown.DeviceType,
dateRange,
series: [
{
event: '$pageview',
name: 'Pageview',
kind: NodeKind.EventsNode,
math: BaseMathType.UniqueUsers,
},
],
trendsFilter: {
display: ChartDisplayType.ActionsPie,
showLabelsOnSeries: true,
},
sampling,
limit: 10,
filterTestAccounts,
properties: webAnalyticsFilters,
},
hidePersonsModal: true,
vizSpecificOptions: {
[ChartDisplayType.ActionsPie]: {
disableHoverOffset: true,
hideAggregation: true,
},
},
embedded: true,
},
insightProps: createInsightProps(TileId.DEVICES, DeviceTab.DEVICE_TYPE),
canOpenInsight: true,
canOpenModal: true,
},
{
id: DeviceTab.BROWSER,
title: 'Top browsers',
title: 'Browsers',
linkText: 'Browser',
query: {
full: true,
Expand All @@ -973,7 +956,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: DeviceTab.OS,
title: 'Top OSs',
title: 'OS',
linkText: 'OS',
query: {
full: true,
Expand Down Expand Up @@ -1040,7 +1023,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: GeographyTab.COUNTRIES,
title: 'Top countries',
title: 'Countries',
linkText: 'Countries',
query: {
full: true,
Expand All @@ -1060,7 +1043,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: GeographyTab.REGIONS,
title: 'Top regions',
title: 'Regions',
linkText: 'Regions',
query: {
full: true,
Expand All @@ -1080,7 +1063,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([
},
{
id: GeographyTab.CITIES,
title: 'Top cities',
title: 'Cities',
linkText: 'Cities',
query: {
full: true,
Expand Down

0 comments on commit 261a2f5

Please sign in to comment.