* Add hint to creatable ComboBoxes without suggestions available
* Load external resources once in funnel settings
* Load external resources once in goal settings
* Make Custom Props Settings UI match Goal Settings
* Remove unnecessary goals query
This should be done only once in the live view
* Remove funnels feature flag
* fixup
* Make the modal scrollable
* By default, focus first suggestion for creatables
* Update StaticSearch
So it's capable of casting custom data structures
into weighted items. Missing tests added.
* Add Search + modal to funnel settings
* Add sample props to seeds
* Load all suggestions asynchronously, unless `Mix.env == :test`
* ComboBox: Fix inconsistent suggestions
We require "Create ..." element to be only focused
when there are no suggestions available.
This causes some issues, depending on the state,
the least focusable index might be either 0 ("Create...")
or 1. This patch addresses all the quirks with focus.
* Fix ComboBox max results message
So that AlpineJS doesn't think it's a focusable
option.
* Keep the state up to date when changing props
* Add hint to creatable ComboBoxes without suggestions available
* Load external resources once in funnel settings
* Load external resources once in goal settings
* Make Custom Props Settings UI match Goal Settings
* Remove unnecessary goals query
This should be done only once in the live view
* Remove funnels feature flag
* fixup
* Make the modal scrollable
* By default, focus first suggestion for creatables
* Add sample props to seeds
* Load all suggestions asynchronously, unless `Mix.env == :test`
* ComboBox: Fix inconsistent suggestions
We require "Create ..." element to be only focused
when there are no suggestions available.
This causes some issues, depending on the state,
the least focusable index might be either 0 ("Create...")
or 1. This patch addresses all the quirks with focus.
* Fix ComboBox max results message
So that AlpineJS doesn't think it's a focusable
option.
* Keep the state up to date when changing props
* Fixup site_id
* Fix typo
* fixup
* Add hint to creatable ComboBoxes without suggestions available
* Load external resources once in funnel settings
* Load external resources once in goal settings
* Make Custom Props Settings UI match Goal Settings
* Remove unnecessary goals query
This should be done only once in the live view
* Remove funnels feature flag
* fixup
* Make the modal scrollable
* By default, focus first suggestion for creatables
* Add sample props to seeds
* Load all suggestions asynchronously, unless `Mix.env == :test`
* ComboBox: Fix inconsistent suggestions
We require "Create ..." element to be only focused
when there are no suggestions available.
This causes some issues, depending on the state,
the least focusable index might be either 0 ("Create...")
or 1. This patch addresses all the quirks with focus.
* Fix ComboBox max results message
So that AlpineJS doesn't think it's a focusable
option.
* Keep the state up to date when changing props
* Update seeds with sensible prop names
* Make escape work for closing combobox suggestions
Co-authored-by: Uku Taht <Uku.taht@gmail.com>
* Revert "Make escape work for closing combobox suggestions"
This reverts commit 306866d2a1.
@ukutaht unfortunately this makes it impossible to select
an suggestion.
* Revert "Revert "Make escape work for closing combobox suggestions""
This reverts commit 4844857812.
* Make ESC great again
* Improve readability
---------
Co-authored-by: Uku Taht <Uku.taht@gmail.com>
* Allow admins to initiate ownership transfer from the CRM
* Add stronger assertion for bulk invite action
* Fix compile warning
* Move bulk transfer logic to Sites module
* Replaces unused variables with _
* Add typespec for `bulk_transfer_ownership`
* Extract from keywordlist options instead of matching
* Fix and extend bulk transfer tests
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Filter out empty entries when listing stats for UTM props
* Update test fixtures removing noref entries in UTM CSV stat exports
* Update external API tests to account for lack of noref records for UTM stats
* Filter out entries with empty UTM props from imported GA stats
* Remove unreachable GA utm_source dim clause in imported stats logic
* Move inline functions to module
* Extend invite/4 for ownership transfers
* Verify inviter has sufficient permissions
* Ensure ownership transfers don't count as team member
This commit changes the team member usage query to exclude ownership
transfer invitations. Previously, when an ownership transfer was
pending, the team member usage was incremented.
* Draw attention to payment notice when transferring ownership
* Remove duplicate mail sending from membership_controller
---------
Co-authored-by: Uku Taht <uku.taht@gmail.com>
* Update Tailwind to latest v3.3.3
* Upgrade autoprefixer and postcss
* Move tailwindcss plugins to devDependencies
* Remove unused tailwind rules
* Remove obsolete 'transform' rules
Ref: https://tailwindcss.com/docs/upgrade-guide#automatic-transforms-and-filters
* Use the current yellow, update gray to slate
* Move webpack to devdependencies
* Go more minimal with package.json changes
* Update autoprefixer version
* Update postcss version
* Adjust dark style colors
* Use proper node version is asdf config
* Render keybinding hints in the range picker
There was a regression in #3321 - some keybinding
hints stopped appearing due to exact string matching.
* Switch casing
* Refactor MembershipController.invite_member/2
This commit refactors the controller action used for creating new
invitations. It moves the code to Plausible.Sites.invite/4 and replaces
`ifs` and `cases` with `with`.
* Add team_member_limit to plan definition
* Create usage and limits functions for team members
* Apply team member limit when inviting new users
* Add team members to Usage & Limits section
* Change invite function to receive email address instead of %User{}
* Wrap invite function in a DB transaction
* Remove unnecessary joins from team member usage query
* Replace UNION ALL with UNION to remove duplicates
* Add Heroicons dependency
* Add name_of/1 html helper
Currently with Floki there's no way to query for
`[name=foo[some]]` selector
* Update changelog
* Make goal deletion possible with only goal id
* Remove stale goal controllers
* Improve ComboBox component
- make sure the list options are always of the parent input width
- allow passing a suggestion function instead of a module
* Stale fixup
* Update routes
* Use the new goals route in funnel settings
* Use a function in the funnel combo
* Use function in the props combo
* Remove old goals form
* Implement new goal settings
* Update moduledoc
* Fix revenue switch in dark mode
* Connect live socket on goal settings page
* Fixup
* Use Heroicons.trash icon
* Tweak goals search input
* Remove unused alias
* Fix search/button alignment
* Fix backspace icon alignment
* Delegate :superadmin check to get_for_user/3
I'll do props settings separately, it's work in progress
in a branch on top of this one already. cc @ukutaht
* Rename socket assigns
* Fixup to 5c9f58e
* Fixup
* Render ComboBox suggestions asynchronously
This commit:
- prevents redundant work by checking the socket connection
- allows passing no options to the ComboBox component,
so that when combined with the `async` option, the options
are asynchronously initialized post-render
- allows updating the suggestions asynchronously with the
`async` option set to `true` - helpful in case of DB
queries used for suggestions
* Update tests
* Throttle comboboxes
* Update tests
* Dim the search input
* Use debounce=200 in ComboBox component
* Move creatable option to the top
* Ensure there's always a leading slash for goals
* Test pageview goals with leading / missing
* Make the modal scrollable on small viewports
* Connect to live socket only on specific pages
And disable the "server blip" message on non-dev
environments. It's non actionable to our customers.
* Simplify meta tags rendering
* Update user_settings template to HEEX
* Move site_limit function to Billing.Quota
* Create Billing.Quota.site_usage function
* Move monthly_pageview_limit function to Billing.Quota
* Create Billing.Quota.monthly_pageview_usage function
* Add "Usage & Limits" section to user settings page
* Apply suggestions from code review
* Inflate sampled results in Stats.Funnel.funnel/3
* Add test for sampling
* Update test/plausible/funnels_test.exs
Co-authored-by: hq1 <hq@mtod.org>
* Ignore unused binding
* Use bang version of hash function
---------
Co-authored-by: hq1 <hq@mtod.org>
* Add new priority email template?
* Allow priority email to be sent with not layout
* Use priority email template for priority transactional emails
* Test for postmark message stream
This commit fixes a bug where the SendTrialNotifications job tried to
suggest a plan for users switching to enterprise plans, resulting in the
exception below:
```
UndefinedFunctionError: function :enterprise.volume/0 is undefined (module :enterprise is not available)
Module "enterprise", in :enterprise.volume/0
File "lib/plausible_web/templates/email/trial_upgrade_email.html.eex", line 5, in PlausibleWeb.EmailView."trial_upgrade_email.html"/1
File "lib/phoenix_view.ex", line 381, in Phoenix.View.render_within/3
File "lib/phoenix_view.ex", line 557, in Phoenix.View.render_to_iodata/3
File "lib/phoenix_view.ex", line 564, in Phoenix.View.render_to_string/3
File "lib/bamboo_phoenix.ex", line 291, in Bamboo.Phoenix.render_text_or_html_email/1
File "lib/workers/send_trial_notifications.ex", line 67, in Plausible.Workers.SendTrialNotifications.send_today_reminder/1
File "lib/workers/send_trial_notifications.ex", line 36, in anonymous fn/2 in Plausible.Workers.SendTrialNotifications.perform/1
```
* Reconfigure session cookie
* Allow configure secure cookie (#3277)
* Update config/runtime.exs
Co-authored-by: ruslandoga <doga.ruslan@gmail.com>
* fix runtime conf
* Revert "fix runtime conf"
This reverts commit ff37e479e4.
* Revert "Update config/runtime.exs"
This reverts commit 5d9b310b02.
* Revert "Allow configure secure cookie (#3277)"
This reverts commit 7401a2ad3f.
* Read SECURE_COOKIE with defaults per cloud/selfhost
* Include environment in cookie name
* Remove redundant option
* Format
* s/Map.replace/Map.put
* up
* One more try
* Prevent browser refreshes on socket connection error
We'll keep the log and don't make the page look dumb
even if there's some misconfiguration going on.
---------
Co-authored-by: ruslandoga <doga.ruslan@gmail.com>
This pull request introduces a series of improvements to Plausible.Billing.Plans, including:
* Tag the JSON file with the plan version
* Rename the JSON field limit to monthly_pageview_limit
* Move site_limit function to Billing.Plans
* Refactor subscription_interval, allowance and site_limit functions
* Remove unused AnalyzePlans task
* automatic CONVERSIONS -> PROPS navigation
In the Behaviours section, we'll navigate from Goal Conversions > Properties,
when a goal filter is applied by clicking on an entry in the Goal Conversions
list. This navigation does not happen for pageview goals or special goals (e.g.
'Outbound Link: Click', 'File Download', etc.)
The Behaviours component will remember that the navigation happened in order
to return the user to the previous view when the goal filter is removed.
* ability to store prop_keys per goal in localStorage
* pass the onclick handler to the Details view too
This makes sure that when a listItem is clicked in the Details view,
the same behaviour (such as changing the Locations tab from 'Countries'
to 'Regions') is called.
* bugfix - always escape pipes when applying goal/prop filters
* disable propkey selection when prop filter applied
* make the propkey selector take up all the width
This commit introduces a series of improvements on the Plans module including function renaming, documentation and readability. This is the groundwork for billing plans.
There should be no actual changes with this commit, therefore no changes in tests either.
* Update interval dropdown based on custom range selection
* Add `monthsBetweenDates` function
* Reassign interval for custom "period" based on local storage
* Generate intervals by period based on stats_start_date
* Account for "custom" and "all" period intervals dynamically