* 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
* 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
* 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
* Start PromEx first; don't run the Oban plugin in test
* Implement `find_team_invitations`
* Implement `all_members`
* Allow disabling e-mail notifications on team member removal
Will be needed later, when operations are applied
in bulk and notifications go out only when transaction
succeeded.
* Fix visuals per @ukutath's suggestions
* Add `:setup_team` test context function
* Don't show team settings in the sidebar, if setup incomplete
* Add high-level interface for team layout arrangement
Will be used in setup but also later on, in membership settings.
* Update team/setup to use `Team.Management.Layout`
* Implement team general settings allowing layout arrangement
* Format
* Remove unused setup_team
* Add id attributes to member dropdown elements
* Format
* Unify team management experience
By sharing the same form layout in both views,
and enabling promoting guests to team members
in a separate section.
* Rename Invitations/Memberships getters
* Tweak team setup layout
* Update team setup markers only once
* Update tests
* Add another future regression test
* Fix typo
* Prune guest memberships on guest->team member promotion
* Remove now unnecessary `Candidates` module
* Add missing tests
* Catch up on multiple owners fixes
* Add missing describe-block setup
* Hopefully make Layout easier to follow
* Remove default prevention from dropdown
* Remove unused assign
* Make `sorted_for_display` skip scheduled for deletion
* `use PlausibleWeb.Component`
* Use `data-test-kind` for test specific selectors
* Remove `class="relative"` from `.dropdown` instances
* spike
* wip omg
* Add option to clear combobox dropdown on selection
* Extend combobox on selection made callback
* Remove IO.inspect
* Add more guests via seeds
* Implement basic UX for arbitrary e-mail addresses
* Save team name on change
* Don't crash on invalid team name input
* Enable :teams flag via seeds
* Implement changing roles
* Display avatars in combobox when selecting member candidates
* Reduce noise
* Add 'Create team' button to the layout
* Revert "Extend combobox on selection made callback"
This reverts commit 874d566d12.
* Fix seeds
* Make email submittion optional in InviteToTeam service
* Implement finalising team setup (WIP)
* Revert "Display avatars in combobox when selecting member candidates"
This reverts commit ff1a30deb3.
* Use regular redirect to preserve flash
* Check team's setup complete status on mount
* Add `dev` param, allowing redirect skip on setup complete
* Bootstrap test module
* Add sample test touching on combobox in team setup
* WIP: testing team setup LV
* Fixup test
* Remove unused bindings
* Add another minor test
* Test removing a member candidate
* Finish up remaining tests
* Rename main module
* Put team setup view behind a feature flag
* Update main nav dropdown
* Update ComboBox tests
* Fix CandidatesTest regression
* Bring back OG combo-box.js
* Fix dark mode red
* Minor styling fixes
* Extract setup_team function into context
* Remove Floki calls, use Plausible.HTML proxy instead
* Make credo happy
* Use path helpers instead of hardcoded paths
* Fix formatting
* Revert "Merge branch 'master' into setup-teams-01"
This reverts commit bc436c50f8, reversing
changes made to 2eb128d91e.
* Reapply "Merge branch 'master' into setup-teams-01"
This reverts commit c7ebdd2156.
* Alter clear_on_select behavior
* Revert "Alter clear_on_select behavior"
This reverts commit deb20c41f0.
* Look up guests with distinct:true
* Revert "Look up guests with distinct:true"
This reverts commit 352d2717f4.
* Look up guests with distinct:true
* Try something dumb
* huh?
* Bring back problematic changes
* Make combobox dropdown open state and spinner behave on form update
* Don't explicitly send update on live component attribute update
* Don't explicitly send updates to options in funnel combobox either
* Revert "Temporarily disable combobox spinner (#4971)"
This reverts commit 3abf974a56.
* Fix formatting
* Set 'id' on element with phx-update=ignore
* Rework options and suggestions setup in combobox
* Fix suggestions for async
* Fix formatting
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Add `<.dropdown_item>`
* Make the ellipsis menu functional again
* Upgrade deps so that storybook can be added
* Add storybook and dropdown story
* Remove lingering warnings/errors
* Add color mode to storybook
* Use new liveview used_input? function
* Alpine improvements
* Add select input to storybook
* Bring back `render_form` for CRM
* Configure eslint so it can see deps
* Remove LiveViewTest patch
* Fix test for phoenix liveview 1.0
* Build assets in prod
* Fix tests
* Attempt to fix lint error
* Add explicit text color to input
* mix format
* Format after merge master
* Add moduledocs
* Only run storybook in production
* Update storybook dependency
* Mix format
* Turn .eex templates into .heex
* Add new compile-time presets to `PlausibleWeb`
* Fix remaining templates
* Update static components
* Update live components
* Update live views
* Update rest of the owl
* Update mjml template
* Format
* Format
* Revert MJML stuff, it's coupled with EEx
* yawn at test
* Get rid of `FormHelpers` module
* Ensure YOU label shows up first on IP rules list
* Update lib/plausible_web/templates/email/welcome_email.html.heex
Co-authored-by: Artur Pata <artur.pata@gmail.com>
* Fix create site email link
* Fix server error markup (and turn thanks into heex)
* Format
---------
Co-authored-by: Artur Pata <artur.pata@gmail.com>
* Update generic components library
* Import generic components via `PlausibleWeb`
* Update Settings/Danger Zone
* Update new shared link template and convert to heex
* Update site settings layout
* Update site settings sidebar tab layout
* Update Settings/Email Reports
* Update Funnels
* Update ComboBox
* Extend/update form components
* Update Modal live component
* Update Settings/Goals
* Update Shields
* Update Settings/Props
* Update Settings/Import & Export
* Update flow progress
* Import Routes in settings
* Update Billing components
* Update Billing notice component
* Update feature toggle component
* Update 2fa component
* Update verification markup
* Update installation
* Update Settings/Integrations/Plugins
* Update domain change markup
* Update Settings/General
* Update Settings/Integrations
* Update Settings/People
* Update Settings/Integrations/GSC
* Update Settings/Visiblity
* ukuwip
* ukuwip
* Tables & paddings
* Imports exports
* Brighten disabled input text color for dark mode
* Tune down table border/divider in dark mode
* Format
* Fix goal list on mobile
* Fix IP Shields table on mobile
* Fix country shields list on mobile
* Fix country shield list on mobile
* Fix page shields list on mobile
* Fix import/export settings on mobile
* Fix combobox dropdown background in dark mode
* Fix filter bar search input on mobile
* Revert @ukutaht's changes to goal list
* Maybe maybe maybe
* Revert the current prod goal list + fix mobile issues
* Format
* Revert tests change
cc @ukutaht
* Fix markup expectation in a test
* Set autocomplete="off" again
* Bring back `text-sm` where previously removed
---------
Co-authored-by: Uku Taht <uku.taht@gmail.com>
* 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 c1647b53071c0423d817de6843733766276b6105.
* 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>
* 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
* Start suggesting event names in goal settings form
* Fix tests
* Bump phoenix_live_view to 0.20.12
* Implement a criminal hack to track removal of modal's child live components
* Revert "Implement a criminal hack to track removal of modal's child live components"
This reverts commit f34ceb78f1.
* Remove redundant closing brace from currency combo input
* Hide batch goal add button when tab selection is in progress
* Implement unique modal ID regenerated on every modal close/open cycle
* Use unique modal ID as ID suffix to live components in goal settings form
* Reset suffix on tab selection to reset live components state on switch
* Revert "Bump phoenix_live_view to 0.20.12"
This reverts commit 1b1c801981.
* Make unique IDs more predictable
* Fix tests for `GoalSettings.Form`
* Use unique modal ID in country rule modal
* Use unique modal ID in hostname rule modal
* Use unique modal ID in page rule form modal
* Don't limit detected goals when fetching them for autoconfigure
* Escape interpolated Alpine state function argument
* Exclude goals with whitespace on either end or consisting only of whitespace
* Ensure event name suggestions update after goal deletion
* Avoid showing loading spinner when closing modal
* Don't enable spinner when new combobox selection is identical
* Revert "Don't enable spinner when new combobox selection is identical"
This reverts commit a041ba8542.
* Migration: add country rules
* Add CountryRule schema
* Implement CountryRule cache
* Add country rules context interface
* Start country rules cache
* Lookup country rules on ingestion
* Remove :shields feature flag from test helpers
* Add nested sidebar menu for Shields
* Fix typo
* IP Rules: hide description on mobile view
* Prepare SiteController to handle multiple shield types
* Seed some country shield
* Implement LV for country rules
* Remove "YOU" indicator from country rules
* Fix small build
* Format
* Update typespecs
* Make docs link point at /countries
* Fix flash on top of modal for Safari
* Build the rule struct with site_id provided up-front
* Clarify why we're messaging the ComboBox component
* Re-open combobox suggestions after pressing Escape
* Update changelog
* Fix font size in country table cells
* Pass `added_by` via rule add options
* Display site's timezone timestamps in rule tooltips
* Display formatted timestamps in site's timezone
And simplify+test Timezone module; an input timestamp converted
to UTC can never be ambiguous.
* Remove no-op atom
* Display the maximum number of rules when reached
* Improve readability of remove button tests
* Credo
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Make modal for goal settings trigger without BE roundtrip
* Turn goal form into a live component and extract modal into a wrapper
* Further extract modal component and handle reset action
* Make ComboBox selection callback more flexible
* Add rudimentary loading state to dialog
* Make form unaware of being put inside a modal
* Make modal a live component and completely reset contents on open server-side
* Try to avoid race condition
* Fix race condition
* Remove unnecessary conditional on socket assigns
* Add typespecs and fix formatting
* Make goals form high latency friendly
* Fix tests to account for goal settings form becoming live component
* Fix goal settings form live component declaration
* Add documentation for modal
* Fix small build test
* Fix typo
Co-authored-by: hq1 <hq@mtod.org>
* Revert no longer necessary test changes from 46f65d9
* Fix and clean up modal styling
* Keep focus on dialog when open and show only spinner on backdrop when loading
* Adjust corners and shadows and implement open/close transitions
* Lock body scroll when modal is open
* Make modal top-aligned again to avoid jumping around on variable content height
---------
Co-authored-by: hq1 <hq@mtod.org>
* Add SSO link with signed JWT token
* Falls back to Nolt URL without SSO if token cannot be generated
* Add profile image (gravatar) to Nolt SSO link
* Improve navbar dropdown
* Add 'contact support' link to nav dropdown
* Add CSS rule to prevent horizontal jumps
* Dark mode styling
* Close dropdown when link is clicked
* Clarify links in dropdown
* Clarify CSS comment
* Use Alpine.data() over window
* Rename suggestions_dropdown -> combo-box
* Mix format
* Make logout link look good on dark mode
* Use proxy for gravatar
* Do not use Gravatar proxy in self-hosted
* Changelog
* Add Github Repo link to nav dropdown
* Make dialyzer happy
* Add proxy for Gravatar
* Update assets/css/app.css
Co-authored-by: hq1 <hq@mtod.org>
* Update lib/plausible_web/controllers/avatar_controller.ex
Co-authored-by: hq1 <hq@mtod.org>
* Fix alpine <> Liveview integration
---------
Co-authored-by: hq1 <hq@mtod.org>
* 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>
* 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
This commit makes static search more strict by rejecting matches with a score less than 0.6. Here's an example of suggestion that was matching with a 0.5 score that should not be suggested. This makes the suggestion list smaller and more reasonable.
Co-authored by: Robert Joonas <robertjoonas16@gmail.com>
* Add creatable option to ComboBox
This commit changes the ComboBox component to allow a `creatable`
option. This option enables users to create new options along with
choosing existing options.
* Test ComboBox class parameter
* Use display_value instead of input
* Change scroll block to nearest to prevent glitches