* Adds tests for FE date calculations during DST changeover times
* Fixes unparsed offset in SiteContext
* Fixes unparsed embedded in SiteContext
* Adds tests for SiteContext
* add the ability to pass date param into Query.build
* stop returning interval from main_graph controller action
* globally rename 'date' interval to 'day'
* Allow parsing query date range from a 'period' param
The 'period' param will not be exposed in the public API, but makes it
possible to construct a "realtime" query.
* Revert "Allow parsing query date range from a 'period' param"
This reverts commit c5630eaef9.
* call beginning_of_time for first_datetime instead of last
* allow 'realtime' and '30m' date_range shortcuts
* evaluate date_range to 'realtime' or '30m' instead of Date.range(today, today)
* Revert "evaluate date_range to 'realtime' or '30m' instead of Date.range(today, today)"
This reverts commit a887569ec5.
* Revert "allow 'realtime' and '30m' date_range shortcuts"
This reverts commit 91ae0fa5e6.
* fix graph tooltips
* Add typescript, rewrite Countries map
* Add back DB IP geolocation notice
* Silence all current eslint warnings: to be removed gradually
* Reconfigure eslint import plugin for typescript
* Insert formatting pragma by default, but ignore files without pragma in CI
* Removes outdated precommit scripts
* Updates eslint, prettier, stylelint and their configurations: turns on plugins that were installed but off
* Fixes stylelint errors
* Applies prettier to css files
* Fixes new eslint errors
* Updates lint script to include both stylelint and eslint
* Update Goal schema
* Equip ComboBox with the ability of JS selection callbacks
* Update factory so display_name is always present
* Extend Goals context interface
* Update seeds
Also farming unsuspecting BEAM programmers for better
sample page paths :)
* Update ComboBox test
* Unify error message color class with helpers seen elsewhere
* Use goal.display_name where applicable
* Implement LiveView extensions for editing goals
* Sprinkle display name in external stats controller tests
* Format
* Fix goal list mobile view
* Update lib/plausible_web/live/goal_settings/list.ex
Co-authored-by: Artur Pata <artur.pata@gmail.com>
* Update lib/plausible_web/live/goal_settings/form.ex
Co-authored-by: Artur Pata <artur.pata@gmail.com>
* Update the APIs: plugins and external
* Update test so the intent is clearer
* Format
* Update CHANGELOG
* Simplify form tabs tests
* Revert "Format"
This reverts commit c1647b5307.
* Fixup format commit that went too far
* ComboBox: select the input contents on first focus
* Update lib/plausible/goal/schema.ex
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Update lib/plausible/goals/goals.ex
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Update lib/plausible_web/live/goal_settings/form.ex
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Pass form goal instead of just ID
* Make tab component dumber
* Extract separate render functions for edit and create forms
* Update test to account for extracted forms
* Inline goal get query
* Extract revenue goal settings to a component and avoid computing assigns in flight
* Make LV modal preload optional
* Disable preload for goal settings form modal
* Get rid of phash component ID hack
* For another render after render_submit when testing goal updates
* Fix LV preload option
* Enable preload back for goals modal for now
* Make formatter happy
* Implement support for preopening of LV modal
* Preopen goals modal to avoid feedback gap on loading edited goal
* Remove `console.log` call from modal JS
* Clean up display name input IDs
* Make revenue settings functional on first edit again
* Display names: 2nd stage migration
* Update migration with data backfill
---------
Co-authored-by: Artur Pata <artur.pata@gmail.com>
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* return concatenated browser names and versions directly from the API
* return concatenated os names and versions directly from the API
* add detailed views for all device reports
* extract put_combined_name_with_version function
* return only version under the name key when detailed=true
* update changelog
* add more metrics into detailed views of Devices reports
* split up different devices modals into separate files
* Always show details modal for goal conversions
* Make metrics smaller in breakdown table
So that revenue metrics fit
* So that revenue metrics fit
* Add more space for dimension value in breakdown modal
* Use goals from postgres to build goal filter
* Remove unnecessary goal preloading
* Add contains filter for goals
* Make sure the correct imported tables are used when goals are in filters
* Remove 'contains' filter type for now
* Remove TODO comment
* Fix QueryParser test
* move goals.ex into a goals subfolder
* extract goal filtering logic into a separate module
* remove duplication from Imported.Base
* Extract `get_filter_goals` function
* Credo suggestions
* Credo ignore nesting
* apply suggestion - remove Sql.Util
* apply suggestion - pass imported? via opts
* remove duplicate function
* Uncomment tests
* Fix 500 error with goal suggestions
---------
Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
* track browser_language, theme, and logged_in for 'Filter Menu: Open'
* track props for 'Signup' and 'Signup via invitation'
* do not track theme as 'system' for non-logged-in users
* fix tests
* Install @tanstack/react-router
* Fix with imported switch
* Refactor redirect to new search parser
* Deregister timeout in ComparisonInput
* Comment uses of window.location
* Fix with imported switch appearing in realtime dashboard
* Handle not found routes more gracefully
* Extend the GSC API with search functionality
* Fix typo in error tuple atom
* log GSC errors
* rename confusing variable name
* Fix the API response format and error handling
* Read results under the `results` key to be consistent with other
endpoints
* Return errors with a non-200 status code, and with an error payload
that will be well constructed into ApiError
* rebuild Google Keywords modal with useAPIClient
* Add pagination support in Search Terms API
* delete unused fixture file
* rename fixture files
* fix tests
* WIP
* Fix issue with more than one page cached
* Make sure we don't access properties of undefined objects
* slight cleanup
* reset limit to 100
* add back the bottom loading spinner when fetching next page
* disable refetchOnWindowFocus in the global queryClient
* render bottom loading spinner only when fetching next page
* create a wrapper for react-query
* fix exhaustive deps warnings in modals
* always pass the full api path to BreakdownModal
* improve function doc
---------
Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
* Update tailwind config
Turns out `extra` wasn't scanned properly with
previous wildcards. I don't care any more, it's not slow.
* Add interface for updating funnels
* Extend ComboBox with the ability to preselect an initial value
* Implement editing funnels UI
* Update CHANGELOG
* s/add_funnel/setup_funnel
* modal width 2/5 => 2/3
* Let's not make the list disappear on modal pop-up
* Fix the damn modal width again
* Watch extra dir
* Format
* Remove commented code
The test is implemented elsewhere
* Track funnel modified to drop default selection
* Fix screen size adoption and format large numbers
* Preserve currency so that string casting includes it
* Format
* Fix ComboBox attribute for preselected option
* Replace useDebouncedEffect with useDebounce
This commit refactors the debouncing mechanism in a more extendable way.
Using debounce as a hook that returns a callback (rather than an effect)
makes it reusable for Combobox. This way the useDebounce hook does not
need to worry about whether the function should be called on the first
render or not.
This commit also gets rid of redundant doubled search state.
* rename input to search in Combobox
* Fix debounce in Combobox
* remove debounce-promise
* Fix React CI warnings in PlausibleCombobox
* Silence NPM CI in custom-hooks.js
* cancel scheduled API calls in useDebounce hook when unmounted
* fix(suggestions): Properly provide suggestions
Previously, if a filter was applied then filter modal suggestions would
_always_ apply the previous suggestion. Now when say applying a `page`
filter suggestions we remove the previous `page` filter.
* Improve readability
* Allow sending numbers for visit:city along with strings
This simplifies querying as we pass the list of cities as numbers to clients
* use &is_integer/1
* Remove redundancy
* Create a new BreakdownModal component and use it for Entry Pages
* Add search functionality into the new component
* Adjust FilterLink component and use it in BreakdownModal
* pass addSearchFilter fn through props
* pass fn props as useCallback
* add a function doc to BreakdownModal
* refactor: create a Metric class
* Fixup: use Metric class for defining BreakdownModal metrics
* keep revenueAvailable state in the Dashboard component
* move query context into a higher-order component
* fix react key error in BreakdownModal
* use BreakdownModal in PropsModal
* adjust EntryPagesModal to use query context
* fix variable name typo
* fixup: BreakdownModal function doc
* use BreakdownModal in SourcesModal
* use Breakdown modal in ReferrerDrilldownModal
* use BreakdownModal in PagesModal
* use BreakdownModal in ExitPagesModal
* replace ModalTable with LocationsModal and use BreakdownModal in it
* use BreakdownModal in Conversions
* make sure next pages are loaded with 'detailed: true'
* replace loading spinner logic in BreakdownModal
* fix two flaky tests
* unfocus search input element on Escape keyup event
* ignore Escape keyup handling when search disabled
* Review suggestion: remove redundant state
* do not fetch data on every search input change
* use longer variable names
* do not define renderIcon callbacks conditionally
* deconstruct props in function header of BreakdownModal
* refactor searchEnabled being true by default
* Move fragments module under Plausible.Stats.SQL
* Introduce select_merge_as macro
This simplifies some select_merge calls
* Simplify select_join_fields
* Remove a needless dynamic
* wrap_select_columns macro
* Move metrics from base.ex to expression.ex
* Move WhereBuilder under Plausible.Stats.SQL
* Moduledoc
* Improved macros
* Wrap more code
* select_merge_as more
* Move defp to the end
* include.time_labels parsing
* include.time_labels in result
Note that the previous implementation of the labels from TimeSeries.ex was broken
* Apply consistent function in imports and timeseries.ex
* Remove boilerplate
* WIP: Limited support for timeseries-with-querybuilder
* time:week dimension
* cleanup: property -> dimension
* Make querying with time series work
* Refactor: Move special metrics (percentage, conversion rate) to own module
* Explicitly format datetimes
* Consistent include_imported in special metrics
* Solve week-related crash
* conversion_rate hacking
* Keep include_imported consistent after splitting the query
* Simplify do_decide_tables
* Handle time dimensions in imports cleaner
* Allow time dimensions in custom property queries
* time:week handling continued
* cast_revenue_metrics_to_money
* fix `full_intervals` support
* Handle minute/realtime graphs
* experimental_session_count? with timeseries
This becomes required as we try to include visits from sessions by default
* Support hourly data in imports
* Update bounce_rate in more csv tests
* Update some time-series query tests
* Fix for meta.warning being included incorrectly
* Simplify imported.ex
* experimental_session_count flag removal
* moduledoc
* Split interval and time modules