Commit Graph
958 Commits
Author SHA1 Message Date
Yan d0049e70b5 explicitly reset ds.hidden in the hiddenLabels block
Address Greptile P1 review on PR #4259. The hiddenLabels loop only
wrote ds.hidden = true and never reset to false when a label was
removed from the set. Toggle-off worked today only because the
focusLabel block above ran first and unconditionally cleared all
ds.hidden when focusLabel was falsy. That block is guarded by
chartData.focusLabel !== null, so any caller passing focusLabel={null}
would skip the reset and leave a stale true on reused dataset objects
across effect re-runs, making un-hide silently fail.

Add an else-if branch to the hiddenLabels loop that resets ds.hidden
to false when the label is not in the set and no focusLabel is
active. Behavior is unchanged for EventsChart (which never passes a
null focusLabel) and the contract of the new props is now independent
of execution order.
2026-05-08 09:35:09 -04:00
Yan 46e1351aed cache hex6 hash per label in color mapping
Address Greptile review on PR #4257: hex6(key) was parsed twice per
label, once in the sort comparator and once when deriving the
preferred palette slot. Cache the parsed integer in a local hashOf
map so the sort comparator and the slot lookup share one computation
per label, no behaviour change.
2026-05-08 09:17:07 -04:00
Yan 4f72d17faf keep hidden events hidden across date-range changes
Clicking a legend item on the events chart toggled hidden via
chart.current.getDatasetMeta(idx).hidden, which lives on Chart.js's
per-dataset meta object. Each time chartData changed (date-range
switch, refetch, focusLabel update) the second useEffect in Chart.tsx
replaces datasets wholesale, Chart.js regenerates the meta, and the
hidden flags vanish, so previously-toggled-off events came back on
their own.

Lift the hidden state into React. EventsChart owns a Set<string> of
hidden labels and passes it down via a new optional hiddenLabels prop
on Chart, plus an onLegendClick callback for controlled toggling.
Chart re-applies hidden after the existing focusLabel pass so the set
survives every data refresh, and falls back to the original
meta-based behaviour when no callback is provided so other charts
(website overview, revenue) keep their existing semantics.

Verified with the seeded Demo SaaS data: hide signup_started in the
Last 24 hours view, switch to Last 7 days then Last 30 days, the
label stays greyed in the legend and absent from the bars; clicking
again restores it. State is component-scoped, so it intentionally
resets on reload or navigation away from the events page.
2026-05-08 08:38:15 -04:00
Yan edcf5bd407 stabilize event chart colors per label
Colors in the events-tab chart were assigned by the dataset index from
Object.keys(map), so changing the date range or reloading the page
reshuffled keys and produced a different color for the same event each
time.

Pick the palette slot deterministically from a hash of the label
(hex6 / FNV-1a), and walk the palette greedily in hash-sorted order so
the assignment is independent of the API response order. When two
labels prefer the same slot, the later one steps to the next free
slot, so the visible set of up to 12 events all get distinct colors.
The right shift on the hash sidesteps the FNV-1a low-bit bias mod 12
(FNV prime is close to 2^24).
2026-05-08 08:00:11 -04:00
Francis Cao fa182d0947 implement URL pageview metric/expanded metric 2026-05-07 16:59:30 -07:00
Mike Cao 6c2155d496 Merge branch 'dev' of https://github.com/umami-software/umami into dev 2026-05-07 14:54:25 -07:00
Mike Cao 9b18511af0 Merge branch 'heatmaps' into dev
# Conflicts:
#	db/clickhouse/schema.sql
2026-05-07 14:49:21 -07:00
Mike Cao eef10dd897 Use unknown icon for generic browser 2026-05-07 14:34:10 -07:00
Francis Cao 9b099408c2 add share page options enable filtering and enforce theme 2026-05-07 13:24:45 -07:00
Francis Cao 5ccfb6d0a5 implement datatable sorting on non-analytics tables. (website/board/link/pixel/team/admin) 2026-05-07 10:46:03 -07:00
Francis Cao 71893e4f89 fix maxheight on DialogButton 2026-05-06 09:51:28 -07:00
Francis Cao f463a4ce3f rename propertyName parameter 2026-05-05 10:48:56 -07:00
Mike Cao c7f71e5758 Make heatmaps report always available. 2026-05-05 10:43:39 -07:00
Francis Cao fbac7518fc Add MAX_PAGING_RESULTS on hooks for performance improvements. 2026-05-04 15:43:05 -07:00
Mike Cao 12c10c48cd Gate heatmaps report on UMAMI_SELF_RECORD. 2026-05-04 13:29:53 -07:00
Francis Cao 5fc02b6aef fix formatting and css for session property screen 2026-05-04 10:54:58 -07:00
Francis Cao d5c48ee75f clean-up session property string charts and insights. 2026-05-01 12:09:22 -07:00
Francis Cao 1f2bd7cad9 fix property filter css. format date columns in pivot table 2026-05-01 10:00:30 -07:00
Francis Cao 680a1ca1a2 refactor Property components to be resused for both session/event data. Implement session-data screens + filtering. Remove all event-data specific compoenents/queries 2026-04-29 13:11:03 -07:00
Mike Cao a6b13b71db Add click heatmaps report
Extracts click events from rrweb session-replay buffers at write time
into a new heatmap_event table (Prisma + ClickHouse). New /heatmaps
report shows a page picker plus an overlay of click density on the
dominant viewport, with an optional iframe of the live page behind.
2026-04-27 22:20:38 -07:00
Francis Cao 9da332c489 Add Property filters for booleans, dates, arrays 2026-04-27 13:31:47 -07:00
Rudy B. 4b15f2ad7c fix(2FA): error when trying to setup an already activated 2FA 2026-04-25 20:05:50 +02:00
Rudy B. 1068a82d03 chore: pnpm run format 2026-04-25 13:38:18 +02:00
Rudy B. 1ffe01f682 fix(2FA): add missing translation 2026-04-25 12:43:04 +02:00
Rudy B. a9a873c293 fix(2FA): increase backup codes length for improved security 2026-04-25 12:20:47 +02:00
Rudy B. 6c6765291f chore(2FA): get rid of empty onOpenChange 2026-04-25 12:13:15 +02:00
Rudy B. b86d48d08c refactor(2FA): use CSS module instead of inline style 2026-04-25 12:11:14 +02:00
Rudy B. 0795833135 fix(2FA): add missing translation for backup codes file 2026-04-25 12:06:50 +02:00
Rudy B. d77ba4f7b5 refactor(2FA): use onSuccess and onError instead of .then().catch() 2026-04-25 11:58:32 +02:00
Rudy B. c127767c83 fix(2FA): add missing translations 2026-04-25 11:38:54 +02:00
Rudy B. d17900db4c refactor(2FA): use queries in UserTwoFactorSettings 2026-04-25 02:30:15 +02:00
Rudy B. 2428f292a1 feat(translations): add 2FA wording in en-US 2026-04-25 01:40:06 +02:00
Rudy B. 96bdafac80 feat(2FA): create modals (setup/disable/success) 2026-04-25 01:40:06 +02:00
Rudy B. c3808ca353 feat(2FA): implement 2FA step in login flow 2026-04-25 01:40:06 +02:00
Rudy B. 4a7e337954 feat(2FA): create hooks to use API 2026-04-25 01:40:06 +02:00
Francis Cao 5a1ef5e674 add event-data support and charts for arrays, booleans, dates 2026-04-24 15:04:59 -07:00
Francis Cao 77dda7268e add event-data property filtering 2026-04-24 11:39:40 -07:00
Francis Cao be6154cb68 Event data properties refactor and design 2026-04-23 11:15:59 -07:00
Francis Cao 7d7dd336f9 fix funnel alias issues. Closes #4144 2026-04-20 12:58:17 -07:00
Francis Cao 0bd5e70df7 Fix build errors, remove active users link on share page. 2026-04-20 08:51:56 -07:00
Mike Cao de46ef9aab Merge pull request #4169 from nurlennart/fix/active-users-link
fix: restore realtime link on active users indicator
2026-04-18 21:28:50 -04:00
Mike Cao cc829c8f6f Replace react-spring with motion, fix breaking changes in react-window/date-fns-tz/pure-rand. 2026-04-18 15:41:25 -07:00
Francis Cao df29c16c00 fix dropdown maxheight 2026-04-18 10:30:31 -07:00
nurlennart c1395aafb4 fix: restore realtime link on active users indicator 2026-04-17 08:49:57 +02:00
Francis Cao 9d477b25b4 Fix share page permissions 2026-04-15 14:55:28 -07:00
Mike Cao 1b6fc1bd51 Use local Link wrapper with cloud-mode prefetch default 2026-04-15 11:21:49 -07:00
Francis Cao 0b4d8040b7 Merge branch 'analytics' of https://github.com/umami-software/umami into dev 2026-04-15 11:03:19 -07:00
Francis Cao 28cfcd0c80 disable active link 2026-04-15 11:02:46 -07:00
Francis Cao 04eb4b675e 3.1 relational bug fixes 2026-04-15 10:31:21 -07:00
seojcarlos dbcd51ac2c fix: guard toISOString against Invalid Date in Firefox
Wrap toISOString calls with try-catch to prevent TypeError when
date-fns-tz localToUtc returns Invalid Date in Firefox. Falls back
to the original pre-conversion date if conversion fails.
2026-04-12 09:45:43 +02:00