Skip to content

Commit c299d51

Browse files
Merge branch 'main'
2 parents 598c3eb + 6ffaa8a commit c299d51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+3521
-264
lines changed

.github/workflows/auto-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Rath Auto Build
22
on:
33
push:
4-
branches: [master, dev]
4+
branches: [main, dev]
55
pull_request:
6-
branches: [master, dev]
6+
branches: [main, dev]
77
jobs:
88
auto-build:
99
runs-on: ubuntu-latest

.github/workflows/prod-publish.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"version": "1.1.0",
55
"description": "![](https://img.shields.io/github/license/Kanaries/Rath)",
66
"scripts": {
7-
"build": "yarn workspace rath-client build",
7+
"build:utils": "yarn workspace @kanaries/rath-utils build",
8+
"build:scenegraph": "yarn workspace vega-scenegraph build",
9+
"build:renderer": "yarn workspace vega-painter-renderer build",
10+
"build:client": "yarn workspace rath-client build",
11+
"build": "npm run build:utils && npm run build:scenegraph && npm run build:renderer && npm run build:client",
812
"test": "yarn workspace rath-client test",
913
"ui": "npm run test && npm run build && node start.js",
1014
"devfront": "yarn workspace rath-client start",

packages/rath-client/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@kanaries/loa": "^0.0.16",
2424
"@kanaries/web-data-loader": "0.1.7",
2525
"@material-ui/core": "^5.0.0-beta.5",
26-
"@vercel/analytics": "^0.1.8",
26+
"@vercel/analytics": "^1.0.0",
2727
"@zip.js/zip.js": "^2.6.60",
2828
"airtable": "^0.11.4",
2929
"ali-react-table": "^2.6.1",
@@ -49,6 +49,7 @@
4949
"vega": "^5.22.1",
5050
"vega-embed": "^6.21.0",
5151
"vega-lite": "^5.6.0",
52+
"vega-painter-renderer": "*",
5253
"vega-scenegraph": "4.10.1-kanaries-patch",
5354
"visual-insights": "^0.12.3",
5455
"web-vitals": "^0.2.4",
@@ -78,9 +79,12 @@
7879
"typescript": "^4.7.4"
7980
},
8081
"scripts": {
82+
"build:utils": "yarn workspace @kanaries/rath-utils build",
83+
"build:scenegraph": "yarn workspace vega-scenegraph build",
84+
"build:renderer": "yarn workspace vega-painter-renderer build",
8185
"start": "react-app-rewired start",
82-
"build": "GENERATE_SOURCEMAP=false react-app-rewired --max_old_space_size=8000 build",
83-
"build2": "GENERATE_SOURCEMAP=false react-app-rewired --max_old_space_size=8000 build",
86+
"build": "npm run build:utils && npm run build:scenegraph && npm run build:renderer && npm run build:client",
87+
"build:client": "GENERATE_SOURCEMAP=false react-app-rewired --max_old_space_size=8000 build",
8488
"buildForAnalysis": "react-app-rewired build",
8589
"test": "jest -c ./jest.config.js --passWithNoTests --no-cache",
8690
"eject": "react-app-rewired eject",

packages/rath-client/src/components/appNav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const AppNav: React.FC<AppNavProps> = (props) => {
202202
<NavContainer>
203203
<LogoBar>
204204
<a
205-
href={`${window.location.protocol}//rath.${window.location.host.split('.').slice(-2).join('.')}/`}
205+
href={`${window.location.protocol}//${window.location.host.split('.').slice(-2).join('.')}/`}
206206
target="_blank"
207207
rel="noreferrer"
208208
>

packages/rath-client/src/pages/dataSource/baseActions/mainActionButton.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React, { useCallback, useMemo } from 'react';
44
import intl from 'react-intl-universal';
55
import { Menu, MenuButtonProps, MenuItem, MenuList, MenuPopover, MenuTrigger, SplitButton } from '@fluentui/react-components';
66
import { Poll24Regular } from '@fluentui/react-icons';
7+
import va from '@vercel/analytics';
78
import { EXPLORE_MODE, PIVOT_KEYS } from '../../../constants';
89
import { useGlobalStore } from '../../../store';
910

@@ -86,14 +87,21 @@ export const useActionModes = function () {
8687

8788
const MainActionButton: React.FC = () => {
8889
const { satisfyAnalysisCondition, startMode, analysisOptions } = useActionModes();
90+
const { userStore } = useGlobalStore();
91+
92+
const startHandler = useCallback(() => {
93+
startMode.onClick && startMode.onClick()
94+
va.track('start_analysis', { userName: userStore.userName, mode: startMode.key })
95+
// eslint-disable-next-line react-hooks/exhaustive-deps
96+
}, [startMode]);
8997

9098
return (
9199
<Menu positioning="below-end">
92100
<MenuTrigger disableButtonEnhancement>
93101
{(triggerProps: MenuButtonProps) => (
94102
<SplitButton
95103
disabled={!satisfyAnalysisCondition}
96-
primaryActionButton={{ onClick: () => startMode.onClick && startMode.onClick() }}
104+
primaryActionButton={{ onClick: startHandler }}
97105
menuButton={triggerProps}
98106
appearance="primary"
99107
icon={<Poll24Regular />}

0 commit comments

Comments
 (0)