Skip to content

Commit

Permalink
feat: enable analytics dashboard (#306)
Browse files Browse the repository at this point in the history
* feat: enable analytics dashboard

* refactor: return to home on player icon click
  • Loading branch information
pyphilia authored Aug 10, 2023
1 parent d0ccc1d commit 6aabddd
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 22 deletions.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,22 @@
"cypress:run": "env-cmd -f ./.env.test cypress run --browser chrome"
},
"dependencies": {
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@graasp/chatbox": "2.0.0",
"@graasp/query-client": "1.4.0",
"@graasp/sdk": "1.2.0",
"@graasp/translations": "1.18.1",
"@graasp/ui": "3.2.7",
"@graasp/ui": "3.3.1",
"@mui/icons-material": "5.14.3",
"@mui/lab": "5.0.0-alpha.139",
"@mui/material": "5.14.4",
"@sentry/react": "7.62.0",
"@sentry/tracing": "7.62.0",
"clsx": "1.2.1",
"i18next": "22.4.15",
"immutable": "4.3.1",
"immutable": "4.3.2",
"lodash.truncate": "4.4.2",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand All @@ -55,6 +56,8 @@
"react-router": "6.14.2",
"react-router-dom": "6.14.2",
"react-toastify": "9.1.3",
"stylis": "4.3.0",
"stylis-plugin-rtl": "2.1.1",
"uuid": "9.0.0"
},
"devDependencies": {
Expand Down Expand Up @@ -93,7 +96,10 @@
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vite-plugin-checker": "^0.6.1",
"vite-plugin-istanbul": "4.1.0"
"vite-plugin-istanbul": "5.0.0"
},
"resolutions": {
"immutable": "4.3.2"
},
"packageManager": "[email protected]"
}
10 changes: 8 additions & 2 deletions src/modules/header/HeaderNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import {
} from '@graasp/ui';

import { APP_NAME, GRAASP_LOGO_HEADER_HEIGHT } from '@/config/constants';
import { GRAASP_BUILDER_HOST, GRAASP_LIBRARY_HOST } from '@/config/env';
import {
GRAASP_ANALYTICS_HOST,
GRAASP_BUILDER_HOST,
GRAASP_LIBRARY_HOST,
} from '@/config/env';
import {
APP_NAVIGATION_PLATFORM_SWITCH_BUTTON_IDS,
APP_NAVIGATION_PLATFORM_SWITCH_ID,
Expand All @@ -21,6 +25,7 @@ import {
export const platformsHostsMap = defaultHostsMapper({
[Platform.Builder]: GRAASP_BUILDER_HOST,
[Platform.Library]: GRAASP_LIBRARY_HOST,
[Platform.Analytics]: GRAASP_ANALYTICS_HOST,
});

const StyledLink = styled(Link)(() => ({
Expand Down Expand Up @@ -48,14 +53,15 @@ export const HeaderNavigation = ({
},
[Platform.Player]: {
id: APP_NAVIGATION_PLATFORM_SWITCH_BUTTON_IDS[Platform.Player],
href: '/',
},
[Platform.Library]: {
id: APP_NAVIGATION_PLATFORM_SWITCH_BUTTON_IDS[Platform.Library],
...getNavigationEvents(Platform.Library),
},
[Platform.Analytics]: {
id: APP_NAVIGATION_PLATFORM_SWITCH_BUTTON_IDS[Platform.Analytics],
disabled: true,
...getNavigationEvents(Platform.Analytics),
},
};
return (
Expand Down
82 changes: 65 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.3.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.7":
"@babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.3.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.7":
version: 7.21.5
resolution: "@babel/runtime@npm:7.21.5"
dependencies:
Expand All @@ -1203,6 +1203,15 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.14.5":
version: 7.22.10
resolution: "@babel/runtime@npm:7.22.10"
dependencies:
regenerator-runtime: ^0.14.0
checksum: 524d41517e68953dbc73a4f3616b8475e5813f64e28ba89ff5fca2c044d535c2ea1a3f310df1e5bb06162e1f0b401b5c4af73fe6e2519ca2450d9d8c44cf268d
languageName: node
linkType: hard

"@babel/runtime@npm:^7.22.6":
version: 7.22.6
resolution: "@babel/runtime@npm:7.22.6"
Expand Down Expand Up @@ -1623,7 +1632,7 @@ __metadata:
languageName: node
linkType: hard

"@emotion/cache@npm:^11.11.0":
"@emotion/cache@npm:11.11.0, @emotion/cache@npm:^11.11.0":
version: 11.11.0
resolution: "@emotion/cache@npm:11.11.0"
dependencies:
Expand Down Expand Up @@ -2121,9 +2130,9 @@ __metadata:
languageName: node
linkType: hard

"@graasp/ui@npm:3.2.7":
version: 3.2.7
resolution: "@graasp/ui@npm:3.2.7"
"@graasp/ui@npm:3.3.1":
version: 3.3.1
resolution: "@graasp/ui@npm:3.3.1"
dependencies:
"@graasp/sdk": 1.1.3
clsx: 2.0.0
Expand All @@ -2139,6 +2148,7 @@ __metadata:
react-text-mask: 5.5.0
uuid: 9.0.0
peerDependencies:
"@emotion/cache": ~11.10.7
"@emotion/react": ~11.10.6 || ~11.11.0
"@emotion/styled": ~11.10.6 || ~11.11.0
"@mui/icons-material": ~5.11.9 || ~5.13.0 || ~5.14.0
Expand All @@ -2151,12 +2161,14 @@ __metadata:
react-dom: ^17.0.2
react-i18next: ^12.2.0
react-router-dom: ^6.11.0
stylis: ^4.1.3
stylis-plugin-rtl: ^2.1.1
peerDependenciesMeta:
ag-grid-community:
optional: true
ag-grid-react:
optional: true
checksum: aebea6ea09cf992b644d3d8274f069112df1fdf1947fe0a34366396cb16ae19f689548d7b7921283bf5456391aefcac90a6fe1131e9bb319cfc0bfcb76b86fc5
checksum: 1fee38056662a914aee7aed22aeba1836a4c64f2b6422e0bafcd6f6773eae1eb6634019c07a4469b92bc4ef05737b2e696f3c4706c5f2b4d12b87099cad9a104
languageName: node
linkType: hard

Expand Down Expand Up @@ -4853,6 +4865,13 @@ __metadata:
languageName: node
linkType: hard

"cssjanus@npm:^2.0.1":
version: 2.1.0
resolution: "cssjanus@npm:2.1.0"
checksum: 87d02bb8a54aeb046fab0c63e32bc73a6f776d33f07b1ead29cbdd65bc6f5078f28bae85653b0fcae528817e54a91fcc8cd9f4fcb98a3c4e229628d8a10439c3
languageName: node
linkType: hard

"csstype@npm:^3.0.2, csstype@npm:^3.1.2":
version: 3.1.2
resolution: "csstype@npm:3.1.2"
Expand Down Expand Up @@ -6773,13 +6792,14 @@ __metadata:
dependencies:
"@commitlint/config-conventional": 17.7.0
"@cypress/code-coverage": 3.11.0
"@emotion/cache": 11.11.0
"@emotion/react": 11.11.1
"@emotion/styled": 11.11.0
"@graasp/chatbox": 2.0.0
"@graasp/query-client": 1.4.0
"@graasp/sdk": 1.2.0
"@graasp/translations": 1.18.1
"@graasp/ui": 3.2.7
"@graasp/ui": 3.3.1
"@mui/icons-material": 5.14.3
"@mui/lab": 5.0.0-alpha.139
"@mui/material": 5.14.4
Expand Down Expand Up @@ -6813,7 +6833,7 @@ __metadata:
http-status-codes: 2.2.0
husky: 8.0.3
i18next: 22.4.15
immutable: 4.3.1
immutable: 4.3.2
lodash.truncate: 4.4.2
path: 0.12.7
prettier: 3.0.1
Expand All @@ -6827,11 +6847,13 @@ __metadata:
react-router-dom: 6.14.2
react-toastify: 9.1.3
rollup-plugin-visualizer: 5.9.2
stylis: 4.3.0
stylis-plugin-rtl: 2.1.1
typescript: ^5.1.6
uuid: 9.0.0
vite: ^4.4.9
vite-plugin-checker: ^0.6.1
vite-plugin-istanbul: 4.1.0
vite-plugin-istanbul: 5.0.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -7139,10 +7161,10 @@ __metadata:
languageName: node
linkType: hard

"immutable@npm:4.3.1":
version: 4.3.1
resolution: "immutable@npm:4.3.1"
checksum: a3a5ba29bd43f3f9a2e4d599763d7455d11a0ea57e50bf43f2836672fc80003e90d69f2a4f5b589f1f3d6986faf97f08ce1e253583740dd33c00adebab88b217
"immutable@npm:4.3.2":
version: 4.3.2
resolution: "immutable@npm:4.3.2"
checksum: bb1d0f3eb8ebef04aa9e2c698ba1a248976a4dc0257fa2f1bffaaae575f891395fe9ef39eaf49856d6c4edd31704e300ec563ed44ea9d7c7996186deab91d0ff
languageName: node
linkType: hard

Expand Down Expand Up @@ -10314,6 +10336,13 @@ __metadata:
languageName: node
linkType: hard

"regenerator-runtime@npm:^0.14.0":
version: 0.14.0
resolution: "regenerator-runtime@npm:0.14.0"
checksum: 1c977ad82a82a4412e4f639d65d22be376d3ebdd30da2c003eeafdaaacd03fc00c2320f18120007ee700900979284fc78a9f00da7fb593f6e6eeebc673fba9a3
languageName: node
linkType: hard

"regexp.prototype.flags@npm:^1.2.0, regexp.prototype.flags@npm:^1.4.3, regexp.prototype.flags@npm:^1.5.0":
version: 1.5.0
resolution: "regexp.prototype.flags@npm:1.5.0"
Expand Down Expand Up @@ -11256,13 +11285,31 @@ __metadata:
languageName: node
linkType: hard

"stylis-plugin-rtl@npm:2.1.1":
version: 2.1.1
resolution: "stylis-plugin-rtl@npm:2.1.1"
dependencies:
cssjanus: ^2.0.1
peerDependencies:
stylis: 4.x
checksum: 262d2c762216556ed3dc8218ea5929ae24b4b0fae020eb41c217911e6628374009d1e1b24256ed6a2f39cbbf302a877f2efe912b628c71dd15fde90866ca54ca
languageName: node
linkType: hard

"stylis@npm:4.2.0":
version: 4.2.0
resolution: "stylis@npm:4.2.0"
checksum: 0eb6cc1b866dc17a6037d0a82ac7fa877eba6a757443e79e7c4f35bacedbf6421fadcab4363b39667b43355cbaaa570a3cde850f776498e5450f32ed2f9b7584
languageName: node
linkType: hard

"stylis@npm:4.3.0":
version: 4.3.0
resolution: "stylis@npm:4.3.0"
checksum: 6120de3f03eacf3b5adc8e7919c4cca991089156a6badc5248752a3088106afaaf74996211a6817a7760ebeadca09004048eea31875bd8d4df51386365c50025
languageName: node
linkType: hard

"substyle@npm:^9.1.0":
version: 9.4.1
resolution: "substyle@npm:9.4.1"
Expand Down Expand Up @@ -12157,17 +12204,18 @@ __metadata:
languageName: node
linkType: hard

"vite-plugin-istanbul@npm:4.1.0":
version: 4.1.0
resolution: "vite-plugin-istanbul@npm:4.1.0"
"vite-plugin-istanbul@npm:5.0.0":
version: 5.0.0
resolution: "vite-plugin-istanbul@npm:5.0.0"
dependencies:
"@istanbuljs/load-nyc-config": ^1.1.0
espree: ^9.6.1
istanbul-lib-instrument: ^5.1.0
picocolors: ^1.0.0
test-exclude: ^6.0.0
peerDependencies:
vite: ">=2.9.1 <= 5"
checksum: b7b766638ec8d8f261ea758c61bdfeb66e00b1dbdd456db93e9541dd13dce63a4707faeeb888b516f7150a5cdb10fa8775dfdc314a39e975f8ca15d26c11c50b
checksum: 1d5d7a91eecd3356a7ceba60f437ee1b5a3db53e8a928d7476fe2919ff1e101c2e0c0b87c8c9680cef72c0158ced1a75d56e9f5cc6f4f427dfe670c62ecdeec1
languageName: node
linkType: hard

Expand Down

0 comments on commit 6aabddd

Please sign in to comment.