* Update report percentages on dashboard and details view
* Add percentages to Countries, Regions, and Cities reports
* Add percentages to Channels, Sources, and UTM reports
* Add percentages to top pages, entry pages, and exit pages reports
* Update tests to include percentages
* Change dashboard copy from title case to sentence case
* Update details modal style
* Make animations snappier
* Introduce max height to modal and make inner content scrollable
* Improve modal mobile design
- Enable horizontal scroll for details modal on mobile
- Add responsive spacing and positioning to modal
* Added mobile tap behavior to external link in list report
* Show tooltips only when in comparison mode or when the number is abbreviated
* remove previously added showTooltip prop
- This isn't needed anymore since we now handle the tooltip logic in the MetricValue component
* Show long format upon hovering detailed view metrics
* Added mobile tapping behaviour to detailed view
* Added percentages to all detailed views
* Add mobile swipe-to-close behavior for modal
* Adjust sensitivity of modal drag to close
* Use hammerjs for swipe-to-close modal behaviour
* Prevent dragging if gesture starts inside table
* Show 2 decimal places for percentages < 0.1% across dashboard
* Adjust dark mode styles
* Add hover effect to external link icon
* Update tests to expect two-decimal percentages
* Undo hammer install and revert to old modal styling
* Remove CR and % columns from goals and custom props reports on dashboard, and show on hover in detailed view
* Remove unused constants
* Undo conversion rate on hover behaviour
- Unlike percentages, CR should show permanently.
* Show percentages permanently in custom props detailed view
* Adjust width of conversion metrics column
* Updated metric-value test
* Update top-bar test
* Added changelog entry
* Fix test expectations for percentages with imported data
- Update tests to expect correct percentages (≤100%) when imported data is included. These tests will fail until the percentage calculation bug is fixed, documenting the expected behavior.
* Add imported_visitors to tests to ensure correct total_visitors calculation
* Correct imported_visitors count in test
* rename query_parser_test to api_query_parser_test
* allow metrics to be nil in ParsedQueryParams
* swap now with relative_date in ParsedQueryParams
* add DashboardQueryParser
* stop defining defaults in ParsedQueryParams
* add DashboardQuerySerializer
* make sure parse -> serialize is a reversible transformation
* fix codespell
* fix test and silence credo
* fix another test
* parse and serialize with_imported
* cleaner decode_filters
* precompile do_not_url_encode_map and simplify uri_encode_permissive
* remove prepending ? logic
* Use forked version of
* Add necessary scaffolding for enabling LV on dashboard
* Implement basics for LV pages breakdown
* Make tile and tabs latency friendly
* Bring back eslint-disable pragma in live_socket.js
* Document the code somewhat
* Fix live navigation callback in React
* Make dashboard components inside portals testable
* Add very rudimentary basic tests
* Fix typo
* Fix eslint pragma in `live_socket.js`
* Include revenue data for all detailed API responses except entry/exit pages
* Expose revenue data in all breakdown modals except entry/exit pages
* Add revenue metrics to breakdown response only on EE
* Change query builder to enable querying event metrics \w session dimension
* Add revenue metrics to entry and exit pages breakdowns
* Expose revenue data in entry and exit pages breakdowns
* Use `argMax` for `exit_page` and `exit_page_hostname` dimensions (h/t @ukutaht)
* Don't handle event-only dimensions with session-only metrics for now
* Add tests for all breakdowns
* Add clarifying comments in code
* Mark revenue tests as EE-only
* Migration: add consolidated views feature to enterprise plans
* Migration: Add user preferences per team table
* Update static plan definitions
* Add feature module definition
* Display consolidated view availability in crm
* Extend ConsolidatedView interface:
- add functions to manipulate user/team options (for CTA)
- require at least two sites in order to create a consolidated view
- require billing/plan compliance when computing eligibility
* Team/User preferences schema
* Implement consolidated view life cycle on /sites
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Uku Taht <uku.taht@gmail.com>
* Enroll `consolidated_view` feature flag
* Consolidated view access hardening (+feature flag)
- require team-wise feature flag instead of super admin role
- redirect to /sites if the team isn't eligible any more
- enforce regular site in shared links controller
* Remove no longer needed `ConsolidatedView.enabled?/1`
* Alias PrimaDropdown
* No consolidates views for shared links
* Remove user argument from `ok_to_display?`
* Adjust a temporary test
* More elaborate alert
* Fix responsive design issues on sites page
- Fix z-index issue with button dropdown
- Fix truncation issue with team name
- Improve responsiveness of site cards
- Fix focus state of site cards
- Improve responsiveness of consolidated view CTA
- Improve design of prima_dropdown component
- Replace `+` with plus icons in dropdown items
* Use the plus icon for standalone "Add website" too
cc @sanne-san
* Format
* Fix z-index issue with dropdowns on sites page
* Remove TODOs
* Make consolidated view cards disappear when searching
* Clean up test
* Use per-team membership user preferences
* Use conditional instead of `with` statement
* Inline `ensure_eligible`
* Use `Map.fetch!` getting preference from default struct
* fixup
* Revert "Migration: add consolidated views feature to enterprise plans"
Will be included via main branch sync
This reverts commit 05bec55276.
* Fix and test feature-flag effect on both view and CTA cards
---------
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Uku Taht <uku.taht@gmail.com>
* Update site switcher UI to accommodate for consolidated view
* Implement logic to display consolidated view in site picker
* Fix "All sites" selected state in site switcher
* Fixup tests
* Include consolidated view assigns in shared links
* Format
* Extract `ConsolidatedView.ok_to_display?/2`
* Format
* I'll pretend no one saw this
* Skip unnecessary `on_ee`
* oops
---------
Co-authored-by: Adam Rutkowski <hq@mtod.org>
- Added dark mode change to CHANGELOG.md
- Fixed broken `WithImportedSwitch` icon focus outline
- Updated comments in `app.css` referencing old color scheme
* Improve dark mode
- Switch from `slate` to `zinc` for the gray color palette
- Darken overall dark mode UI
- Switch from `green` to `emerald` for the green color palette
- Update a few previously missed instances of title case to sentence case
- Consolidate button styles and change naming from `bright` to `secondary`
- Update button disabled styles
- Fix tooltip not adjusting to content width
- Update graph tooltip layout and typography
- Add transition effects to hover states
- Reduce footer logo size
* Fix oversights
- Update funnel graph colors
- Update graph grid colors
- Improve focus styles
- Improve disabled input styles
* Fix more oversights in relation to dashboard filtering
- Improve consistency of input, button, combobox and modal components in relation to settings area
- Fix segment tooltip color
* Fix search input style in funnel and segments dropdowns
* Add white background to favicon images in dark mode
- The GitHub and ChatGPT favicons are hard to see in dark mode, so we add a white background to them.
* Fix tooltip color to fit all backgrounds in dark mode
* Fix tests
* Fixed more tests
* Extract SourceFavicon component to eliminate favicon duplication
* Fix regression on installation page after rebase
* Fix formatting issues
* Fix favicon test failure in CI by reading placeholder icon at compile time
* Undo previous commit
* Create static consolidated view UI on `/sites` page
- Improve existing site card layout
- Add static UI for the consolidated view
- Add dismissable upgrade card UI
- Extract favicon fetching logic to function
- Configure configurable fallback icon per route
- Add `/favicon/sources_globe/` route with different icon than `/favicon/sources/` to use on `/sites` page
* Improve the mobile view of the `/sites` page
* Minor query interface UX extension (#5713)
* Minor query interface extension
* !fixup
* !fixup
* Initial implementation of consolidated views on /sites
* Improve loading state
* no need to handle nil in main interface
* Juggle `can_manage_consolidated_view?`
* Require team setup in order to enable consolidated view
* nil catcher
* Fixup test fixture
* Don't show Consolidated View tab in CS if team is not setup
* Reorganize + test
* Remove comment
* Only show consolidated views to superadmins for now
* Remove temporary sleep
* CE unused bindings
* Clean up seeds
* EE
* Fixup test
* Test non-superadmin scenario
* Add a test guarding parity between small plots (consolidated vs individual)
* Move private function so CE won't complain
* See if the graphs are now similar at least :)
* sort
* Map keys are unsorted
* Ensure engagement events aren't counted as visitors on smol graphs
* just try and revert
* Revert "just try and revert"
This reverts commit 7584f59816.
* Simplify globe icon handling
* Remove unnecessary @rest
* Split tests into more focused cases
* Address jumpiness on furious refresh cycle
* Revert "Address jumpiness on furious refresh cycle"
This reverts commit 5c03b36918.
* Another attempt at jumpiness
* Enforce less noticeable lag applying the diff from loading to loaded
* Reduce flashing on stats load
---------
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
* WIP
* Add tailwind migration script
* Change deprecated classes via migration script
* Manual fixes
* Restore color configuration with CSS variables
* Convert the rest of the config
* Fix dropdown ring opacity
* Remove migration script
* Fix stylelint errors
* NPM run format
* Fix shadow and rounded variant usage
* Add custom CSS to components layer
* Fix dark: and hover: conflict in settings_tab
* Fix funnel form background opacity
* Fix final bg-opacity
* Bring back cursor-pointer for buttons by default
* npm run format
- Improve the spacing and typography of the settings sidebars
- Improve the spacing between form components
- Change UI copy from Title Case to Sentence case for a more natural reading flow
- Improve subtitle and label copy
* Make visual tweaks to the dashboard
- Reduce shadow and increased border radius on cards, to be consistent with the rest of the app
- Reduce logo size
- Align horizontal and vertical spacing between cards
- Reduce line width of the main graph
- Fix horizontal alignment on tables
- Reduce border radius on sites overview for consistency with dashboard
- Add transition to hover effect on sites overview cards
* Remove negative margin from logo to ensure vertical centering
- The negative margin on the logo caused misalignment with the rest of the header
* Revert "Revert "Trim `month`, `year`, `day` periods to local now on main graph (#5668)" (#5684)"
This reverts commit 2d11681f25.
* Does not trim for comparisons
* Include the current hour in the trimmed time range
* Trim `month`, `year`, `day` periods to now on main graph
* Revert "Trim `month`, `year`, `day` periods to now on main graph"
This reverts commit 4f3930111d3a2737a51686e067d9b64f0d85ad58.
* Re-implement trimming in query optimizer instead
* Update JS types
* This is getting confusing
* Trim in stats_controller
* Set `query.now` based on query_praser and date results
* query.period -> query.input_date_range
* Changelog
* Test for response query.date_range
---------
Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
* Explicitly declare color scheme availability and preference
* Revert "Explicitly declare color scheme availability and preference"
This reverts commit e1e6242d29.
* Add `color-scheme: auto;` to generated iframe embed code
* replace yellow warning notice with more inviting cta (funnels)
* align VAT notice with /year on the upgrade page
* improve tooltip component
do not hide the tooltip when the mouse enters the tooltip itself directly
from the trigger element. This allows clicking links in tooltips.
* improve site segments feature gate UI
Disable the save button when site segment option is selected in create or
edit form. Also render a different upgrade notice if the user is not the owner.
* replace upgrade notices with blur UI
To fully get rid of Notice.premium_feature, we will also display a
"not allowed" cursor with tooltips asking to upgrade where necessary.
* extract toggle switch component
* Hide currency toggle from goal edit form
The currency field cannot be changed for an existing goal anyway. Therefore
it makes sense not to show it at all. This commit makes the currency picker
always visible when editing a revenue goal, and always hidden for custom
event edit form.
* simplify api key creation form
Turn "Sites API access" into a toggle switch identical to "Enable revenue
tracking" in goal creation form.
* remove team setup CTAs for Starter tier
* fix team member limit for starter
* adjust v5 plan limits and limit exceeded notices
* do not display global notices on upgrade-success page
* fix settings/subscription monthly quota boxes alignment
* fix CI
* use tailwind backdrop-blur
* remove dangling log + avoid passing setSaveDisabled
* remove duplicate function clauses revenue goals
* revert create api key UI change but disable button still
* optimize for darkmode
* blur team settings > team members for Starter
* rename team accounts to team management
* Add profile_url helper clause
* Add notes
* Sort features alphabetically
* Fix checkbox/textarea components
* Unrlelated: update combobox docs
* Initial customer support UI
* Unrelated: don't expand member dropdown if disabled
* Cross link both CRMs
* Remove unused things
* Stop polluting history with tab navigation
* Truncate search results
* Format
* Use routes in favour of phx-click events
* Fix / keypress to search focus
* Rename phx event
* Rename remaining save events
* Fix up x-data
* Fix alpine placeholder event
* Enable progress animation with topbar
* Team: separate assign clauses per tab
* Site: separate assign clauses per tab
* lint
* Replace URI patch on filter text update
* Unifyu filter_bar component usage
* !fixup
* Fix up filter form event name
* Fix number formatting as you type
* Fix enterprise plan number inputs
* Link CS from HelpScout
* Remove target=_blank from kaffy URLs
* Pre-fill custom plans
* Rework the billing tab
* Make checkbox labels clickable
* Put Stats API first
* Format
* Credo
* !fixup
* Don't show empty labels
* Migrate some
* Making progress
* All fixed
* Convert interval picker to tsx
* Fix format
* Fix tests
* Make sure focus outline looks right on DropdownTabButton
* Refactor Site Switcher to Popover
* Fix site switcher test
* Better jsdom mocks in assets tests
* Try svg placeholder favicon
* Update favicon test
* Try giving transition config directly
* Remove empty props
* Remove unnecessary closeDropdown to prevent Firefox transition issue
* Register open dropmenus globally
This is needed to prevent invalid state when navigating with site hotkeys with Firefox while a dropdown is open and coming back using browser
* Colocate popover-specific component
* Clarify behaviour on hitting hotkey for current site
* Try fix Firefox issue
* Try 1.7.19
* Commit to @headlessui/react v1.7.x
* Fix last two transition origins
* Align active tab on baseline
* Remove unneeded global dropmenu state
* Add changelog
* Funnels menu is searchable and scrollable
* Fix transform origin
* Stop funnels menu from holding onto search state
* Mandate ref be passed to SearchInput from the outside
* APIv2: More tolerant shorthands for date ranges
I was using APIv2 today and got pissed off that I couldn't do
`"date_range": "3d"`. So I went ahead and fixed this issue...
* Changelog
* typegen
* fix
* More invalid tests
Filters autocomplete only showed `"is", "segment"` under autocomplete
instead of all options. This is due to limitations in the vscode
autocomplete package which I don't fully understand but have to do with
partially overlapping `oneOf` definitions. As such the fix was to make
each `oneOf` element as independent of each other as possible.
Basecamp ref: http://localhost:8001/docs/stats-api-playground
* Remove new_time_on_page feature flag
* Update tests to use new time on page
* Mark time-on-page as a public metric in APIv2
* CHANGELOG.md
* Validate time_on_page in APIv2
* Update typing
* Remove redudant arguments
* Update GA4 test
* Update stats_controller_test
* Remove assertion from csv_importer
* Add nil case to new time on page tests
* CSV import/export support for time-on-page
Note only the new time-on-page metric is exported this way
* visibility check for graphing of time_on_page
* FE no longer receives/sends legacy_time_on_page_cutoff
* Remove current_user from exports
* Remove legacy_time_on_page_cutoff from query.include, make behavior work off of site.legacy_time_on_page_cutoff explicitly
* Remove dead function
* More current_user_id removals
* Make column width of time-on-page wider
This will accomodate for the warnings
* Update warning messsage
* Breakdown table: Show space between * and warning in tooltip
* change 7d and 30d periods in API v2
* change 7d and 30d periods in legacy API
* add 28d and 90d into the dashboard
* add tests
* add 28d and 90d to public API v2
* changelog
* npm run generate-types
* typo
* fix NPM test
* fix interval_test
* add P shortcut for last month
* hide last 30d from datepicker but keep keybind functional
* fix keybind hints
* Timex to Date + helpful comment
* prettier format
* adjust comment
* mention 30d -> 28d in changelog as well
* make period hidden param new default