Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fixed collapse state of website select.
Mike Caod26ed3b9498e
diff --git a/package.json b/package.jsonindex f5c893ee1..e48b21fcc 100644--- a/package.json+++ b/package.json@@ -66,7 +66,7 @@"@react-spring/web": "^10.0.3","@svgr/cli": "^8.1.0","@tanstack/react-query": "^5.90.20",- "@umami/react-zen": "^0.242.0",+ "@umami/react-zen": "^0.243.0","@umami/redis-client": "^0.30.0","bcryptjs": "^3.0.2","chalk": "^5.6.2",@@ -158,6 +158,7 @@"stylelint-config-recommended": "^14.0.0","tar": "^7.5.7","ts-jest": "^29.4.6",+ "ts-morph": "^27.0.2","ts-node": "^10.9.1","tsup": "^8.5.0","tsx": "^4.19.0",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex dcdbd718c..31a8abe75 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -42,8 +42,8 @@ importers:specifier: ^5.90.20version: 5.90.20([email protected])'@umami/react-zen':- specifier: ^0.242.0- version: 0.242.0(@types/[email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]([email protected]))+ specifier: ^0.243.0+ version: 0.243.0(@types/[email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]([email protected]))'@umami/redis-client':specifier: ^0.30.0version: 0.30.0@@ -312,6 +312,9 @@ importers:ts-jest:specifier: ^29.4.6version: 29.4.6(@babel/[email protected])(@jest/[email protected])(@jest/[email protected])([email protected](@babel/[email protected]))([email protected])([email protected])([email protected](@types/[email protected])([email protected](@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected])))([email protected])+ ts-morph:+ specifier: ^27.0.2+ version: 27.0.2ts-node:specifier: ^10.9.1version: 10.9.2(@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected])@@ -2906,6 +2909,9 @@ packages:resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}engines: {node: '>=10.13.0'}+ '@ts-morph/[email protected]':+ resolution: {integrity: sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g==}+'@tsconfig/[email protected]':resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}@@ -3002,8 +3008,8 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==}- '@umami/[email protected]':- resolution: {integrity: sha512-dahKoYDrFg1MVjww6M0RpUacFidHoXBRuFKOe68AZ9PWQaXX/kUweo/5m1YzmUMcnouwwCer/rAzCfHJ2Vso9w==}+ '@umami/[email protected]':+ resolution: {integrity: sha512-DDtumoIHqNSPIeqO0asfqurZwYsncbG2viVzj9YQJVd8TPMlwPOkef9hd18W9WlmQDU0KXQ6Ii89MXmNjrkvYg==}peerDependencies:react: ^18.0.0 || ^19.0.0react-aria-components: ^1.0.0@@ -3405,6 +3411,9 @@ packages:resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==}engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'}+ resolution: {integrity: sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==}+resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==}@@ -5406,6 +5415,9 @@ packages:resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}engines: {node: '>=8'}+ resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}+resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}engines: {node: '>=8'}@@ -6826,6 +6838,9 @@ packages:jest-util:optional: true+ resolution: {integrity: sha512-fhUhgeljcrdZ+9DZND1De1029PrE+cMkIP7ooqkLRTrRLTqcki2AstsyJm0vRNbTbVCNJ0idGlbBrfqc7/nA8w==}+resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}hasBin: true@@ -9968,6 +9983,12 @@ snapshots:'@trysound/[email protected]': {}+ '@ts-morph/[email protected]':+ dependencies:+ minimatch: 10.0.3+ path-browserify: 1.0.1+ tinyglobby: 0.2.14+'@tsconfig/[email protected]': {}'@tsconfig/[email protected]': {}@@ -10070,7 +10091,7 @@ snapshots:'@types/node': 24.10.11optional: true- '@umami/[email protected](@types/[email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]([email protected]))':+ '@umami/[email protected](@types/[email protected])([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected]([email protected]))':dependencies:'@internationalized/date': 3.11.0@@ -10495,6 +10516,8 @@ snapshots:+ [email protected]: {}+@@ -12875,6 +12898,8 @@ snapshots:json-parse-even-better-errors: 2.3.1lines-and-columns: 1.2.4+ [email protected]: {}+@@ -14474,6 +14499,11 @@ snapshots:esbuild: 0.25.12jest-util: 30.0.5+ dependencies:+ '@ts-morph/common': 0.28.1+ code-block-writer: 13.0.3+[email protected](@swc/[email protected](@swc/[email protected]))(@types/[email protected])([email protected]):dependencies:'@cspotcode/source-map-support': 0.8.1diff --git a/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx b/src/app/(main)/websites/[websiteId]/WebsiteNav.tsxindex 01833eebb..fe37c9c1a 100644--- a/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx+++ b/src/app/(main)/websites/[websiteId]/WebsiteNav.tsx@@ -55,6 +55,7 @@ export function WebsiteNav({teamId={teamId}onChange={handleChange}buttonProps={{ style: { outline: 'none' } }}+ isCollapsed={isCollapsed}/></Box>{items.map(({ label: sectionLabel, items: sectionItems }, index) => (diff --git a/src/app/global.css b/src/app/global.cssindex 0df4185fc..eb62995a3 100644--- a/src/app/global.css+++ b/src/app/global.css@@ -18,13 +18,6 @@ html[style*="padding-right"] {padding-right: 0 !important;}-a,-a:active,-a:hover {- color: var(--text-primary);- text-decoration: none;-}-::-webkit-scrollbar {width: 15px;background: transparent;diff --git a/src/components/input/WebsiteSelect.tsx b/src/components/input/WebsiteSelect.tsxindex 62051bdb5..553e27091 100644--- a/src/components/input/WebsiteSelect.tsx+++ b/src/components/input/WebsiteSelect.tsx@@ -1,4 +1,5 @@-import { ListItem, Row, Select, type SelectProps, Text } from '@umami/react-zen';+import { Icon, ListItem, Row, Select, type SelectProps, Text } from '@umami/react-zen';+import { ChevronRight } from 'lucide-react';import { useState } from 'react';import { Empty } from '@/components/common/Empty';import {@@ -45,6 +46,10 @@ export function WebsiteSelect({onChange(id);};+ const renderValue = () => {+ return isCollapsed ? '' : name;+ };+return (<Select{...props}@@ -55,11 +60,14 @@ export function WebsiteSelect({onSearch={handleSearch}onChange={handleChange}onOpenChange={handleOpenChange}+ renderValue={renderValue}listProps={{renderEmptyState: () => <Empty message={t(messages.noResultsFound)} />,style: { maxHeight: 'calc(42vh - 65px)', width: 280 },}}- buttonProps={{ style: { minHeight: 40 } }}+ buttonProps={{+ style: { minHeight: 40, gap: 0, justifyContent: isCollapsed ? 'start' : undefined },+ }}>{listItems.map(({ id, name }) => (<ListItem key={id} id={id}>