Commit Graph

240 Commits

Author SHA1 Message Date
Adam Rutkowski aed90f7ffc
Make CI vigilant about uncaptured logs during test runs (#5676)
* Let's see

* test error

* Revert test changes

* Bump

* schedulers

* tmp

* Bump timex

* ignore libcluster warning

* fixup

* fix typo

* Set shell: bash
2025-12-15 13:28:04 +00:00
Adrian Gruntkowski 16f1eb3075
Add necessary scaffolding for enabling LV on dashboard (#5930)
* 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`
2025-12-08 11:46:56 +00:00
Adam Rutkowski b1f21a2736
Upgrade dependencies (#5922)
* Bump deps

* Update mjml

* Update credo

* Update dialyzer

* Minor updates:

cloak cloak_ecto ex_money fun_with_flags_ui
heroicons joken locus mox
phoenix_ecto phoenix_live_reload
sweet_xml zstream

* Format
2025-12-02 11:05:32 +00:00
Uku Taht 3c9ba41cb6
Use prima modal in ip_rules settings (#5910)
* Use prima modal in ip_rules settings

* Remove unused alias

* Do not render portal in test environment - fixes tests

* Simplify invitation modal tests

* Bump CI cache version to rebuild with prima 0.2.1

The CI was using cached dependencies with prima 0.1.9, which doesn't
support the portal parameter needed for tests. Bumping the cache
version forces a rebuild with the correct prima 0.2.1 from mix.lock.

* CI debugging

* Use correct mix env

* Resolve mix.env() at compile-time
2025-11-27 13:22:05 +00:00
Sanne de Vries 2c00acc89b
Update goal settings design (#5886)
* Update goal settings design

- Replace the `Add goal` button in goal settings with a dropdown button to directly select the goal type. This way, a modal opens with the correct form for the selected goal type. The tabs in the modal have been removed.
- Add a new `pill` component to show the goal type in the table in a more distinct way. The `settings_badge` component is replaced with the `pill` component. The `pill` component that was used in `plan_box.ex` is renamed to `highlight_pill`.
- Replaced `Belongs to funnel` text with a funnel icon in the goal settings list.
- Some small tweaks like increasing the search bar width, the padding of the table cells, and adding a header to the goal settings list.

* Update tests to use the new dropdown component instead of tabs

* Replace custom `pending invitation` pill with new pill component

* Temporary: bump prima to exercise prima dropdown LV re-render fix

* Temporary: Bump prima again

* Revert "Temporary: Bump prima again"

This reverts commit 024b34a6e9.

* Revert "Temporary: bump prima to exercise prima dropdown LV re-render fix"

This reverts commit a6eabb73d0.

* Update prima

* Replace `Add goal` button with dropdown button in goal settings empty state

* Update test to check both empty and non-empty states of the add goal dropdown

* Remove pb-14 from feature gate

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-11-24 11:30:55 +00:00
Adam Rutkowski 08c7d2e948
Consolidated View life cycle + billing integration (#5866)
* 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>
2025-11-12 13:41:24 +00:00
Artur Pata 040fb349f7
Update bamboo, bamboo_mua & co (#5871) 2025-11-05 06:17:38 +00:00
Uku Taht 16cbc07f3d
Use Prima for invitation modal (#5843)
* Replace invitation modal with Prima

* Better focus handling

* Simplify css

* Remove unnecessary transition classes

* Clarify comment about testing

* Fix typo

* Remove alpine.js initialization

* Use prima 0.1.7

* Unlock autumn and rustler deps

* Npm run format

* Fix invitation modal reject button on mobile

Co-authored-by: Bijay-Shre-stha <bijayashrestha929@gmail.com>

* Update assets/js/liveview/live_socket.js

Co-authored-by: Artur Pata <artur.pata@gmail.com>

---------

Co-authored-by: Bijay-Shre-stha <bijayashrestha929@gmail.com>
Co-authored-by: Artur Pata <artur.pata@gmail.com>
2025-11-04 19:21:05 +00:00
Artur Pata 457c483416
Omit Subscription and Invoices menu on CE (#5856)
* Update mua

* Fix issue with unexpected menu items

* Update changelog
2025-11-03 09:23:10 +00:00
Uku Taht f3d326b735
Upgrade phoenix & liveview (#5766)
* Upgrade phoenix and phoenix_live_view

* Use new phoenix controller options

* Run mix format

* Upgrade lazy_html and bcrypt

* Always put root layout

* Remove deprecated use Plug.Test

* Escpaing updates for LazyHTML

* Fix double layouts in site settings

* Fix more escaping in tests

* More LazyHTML updates

* Fix remaining LazyHTML issues

* More Floki -> LazyHTML conversions

* More Floki -> LazyHTML conversions

* Fix another issue with Floki -> LazyHTML

* Fix another lazyHTML issue

* Remove parsing from tree

* Fix HTML escaping in teams_test

* More test fixes

* More test fixes

* Add layout to browser_sso_notice pipeline

* Extract elem_count helper
2025-10-07 12:29:48 +00:00
Uku Taht 6cdf8016e7
Tailwind v4 (#5756)
* 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
2025-09-29 15:21:15 +00:00
Adam Rutkowski 5681c22283
Join cluster with .erlang.hosts on startup (#5736) 2025-09-18 10:41:21 +00:00
Artur Pata ba3c4e5a39
Update ecto_ch and ch deps (#5616) 2025-08-06 07:05:51 +00:00
Artur Pata c406ae5f7a
Update ecto (#5609) 2025-08-05 05:15:56 +00:00
Adrian Gruntkowski 20657d4eab
Switch to upstream version of `simple_saml` (#5554)
* Switch to upstream `simple_saml` and bump deps to avoid conflicts

* Simplify SAML attribute extraction
2025-07-07 09:37:25 +00:00
Adrian Gruntkowski 605447cd61
Implement real SAML authentication adapter (#5482)
* Add dependencies necessary for implementing real SAML adapter

* Implement real SAML adapter

* Add make target for easily provisioning local IdP service

* Implement a separate cookie for storing mid-auth SAML state

* Test and improve validation in `RealSAMLAdapater`

* Rename `extra/fixtures` to `extra/fixture` in consistency with `fixture`

* Avoid warnings when running test in CE mode

* Hard match on `integration_id` in `RealSAMLAdapter.signin/2`

Co-authored-by: Adam Rutkowski <hq@mtod.org>

* Improve relay state validation

Co-authored-by: Adam Rutkowski <hq@mtod.org>

* Require `integration_id` parameter in `sso` make target (#5501)

* Fix formatting

* Store assertion fixtures as XMLs instead of Base64 encoded strings

* Switch to upstream `main` branch of `simple_saml`

---------

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2025-06-16 08:19:00 +00:00
hq1 efc55e323d
Remove kaffy (#5423)
* Deal with `FeatruesList` proxy

* Remove kaffy: first pass

* Remove admin controller

* Remove kaffy: last batch

* unlock dependency

* Remove kaffy links

* !fixup
2025-06-10 06:24:47 +00:00
Adrian Gruntkowski d7fe32000a
Implement `SSO.initiate_saml_integration` and `SSO.update_integration` (#5416)
* Add X509 as explicit project dependency

* Implement `initiate_saml_integration` and `update_integration`

* Remove redundant tests

* Refactor SSO.SAMLConfig slightly
2025-05-26 06:35:21 +00:00
Adrian Gruntkowski 9de15326dc
Introduce migration and schemas for SSO (#5411)
* Add polymorphic_embed library

* Add formatter rules for polymorphic_embed

* Add new and extend existing schemas for SSO
2025-05-21 09:53:12 +00:00
hq1 98ffeca6a6
Stack bump: Elixir 1.18, OTP 27.3.1, Node 23.2.0, (#5264)
* Update tool versions

* Update deps

* Address runtime/compilation warnings

* Format

* Update Dockerfile

* wip

* Simpler

* oof

* hum

* format

* Bump cache vsn

* oops

* Fixup

* Fix dockerfile

* Try bumping node too 🤷

* Revert "Try bumping node too 🤷"

This reverts commit cdbe8d4a78.

* Reapply "Try bumping node too 🤷"

This reverts commit 12cafae22b.

* Welp
2025-04-02 12:39:22 +00:00
hq1 11e43645d9
Stop sending hard bounces to sentry (#5218)
* Update bamboo_postmark

* Filter out hard bounces

* !fixup
2025-03-19 10:39:55 +00:00
ruslandoga 99a27a5206
update zstream (#5164) 2025-03-11 06:37:55 +00:00
ruslandoga 1dbad70b14
update ch and ecto_ch (#5166) 2025-03-11 06:35:59 +00:00
ruslandoga 8926f6d6c1
peep (#5130)
* peep

* adapt peep to prom_ex buckets

* handle overmax
2025-02-28 13:15:05 +00:00
hq1 9e5be7103a
Revert "peep (#5126)" (#5128)
This reverts commit 90d0581c99.
2025-02-28 08:00:48 +00:00
ruslandoga 90d0581c99
peep (#5126) 2025-02-28 06:46:16 +00:00
hq1 357da7b719
Reduce n lock partitions (#5124)
* Reduce n lock partitions

Isolated operations are no longer performed.

* !fixup

* !fixup
2025-02-27 14:45:54 +00:00
ruslandoga cdb883cabc
update locus (#5104) 2025-02-25 15:02:42 +00:00
hq1 aa64d7ba4c
Update oban + sentry (#5088)
* Update oban + sentry

* Fixup

* dialyzer

* Add Reindexer plugin daily at 1am
2025-02-18 15:27:31 +00:00
Adrian Gruntkowski a29f2c0059
Switch to kaffy from repo to address issue with searching by assocs (#5054) 2025-02-07 10:46:52 +00:00
Uku Taht 6c30f62d5d
Upgrade deps, add storybook (#4947)
* 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
2025-01-13 12:31:18 +00:00
ruslandoga 6ed846395f
Autogenerate text emails (#4674)
* autogenerate text emails

* fix export email formatting

* fewer changes

* add full text_body test

* eh

* cleanup

* explain

* remove recursive collapse_whitespace

* remove comment
2025-01-02 14:32:54 +00:00
ruslandoga 3af8f24d34
update mua (#4794) 2024-11-11 07:06:48 +00:00
ruslandoga bef8b33087
update ecto_ch to fewer parens version (#4775) 2024-11-05 07:36:45 +00:00
hq1 de04f222fd
Update con_cache (#4642) 2024-10-01 09:11:46 +00:00
dependabot[bot] 6822a4c54b
Bump phoenix_live_reload from 1.4.1 to 1.5.3 (#4551)
Bumps [phoenix_live_reload](https://github.com/phoenixframework/phoenix_live_reload) from 1.4.1 to 1.5.3.
- [Changelog](https://github.com/phoenixframework/phoenix_live_reload/blob/main/CHANGELOG.md)
- [Commits](https://github.com/phoenixframework/phoenix_live_reload/compare/v1.4.1...v1.5.3)

---
updated-dependencies:
- dependency-name: phoenix_live_reload
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hq1 <hq@mtod.org>
2024-10-01 06:50:31 +00:00
ruslandoga 28f20bba3b
tzdata works with 2024b now (#4569) 2024-09-11 14:22:40 +07:00
ruslandoga 2180ab4764
Auto HTTPS in CE (#4491)
* auto https

* changelog

* enable auto-tls only when http_port is 80

* make erlang ssl less verbose

* simplify config

* simplify config

* fix ce_dev typo

* fix another typo

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2024-09-10 14:15:43 +02:00
dependabot[bot] 4864a2c30e
Bump req from 0.5.0 to 0.5.6 (#4537)
Bumps [req](https://github.com/wojtekmach/req) from 0.5.0 to 0.5.6.
- [Release notes](https://github.com/wojtekmach/req/releases)
- [Changelog](https://github.com/wojtekmach/req/blob/main/CHANGELOG.md)
- [Commits](https://github.com/wojtekmach/req/compare/v0.5.0...v0.5.6)

---
updated-dependencies:
- dependency-name: req
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2024-09-06 10:22:52 +02:00
ruslandoga b6859352cb
Fix tzdata (#4539)
* fix tzdata 2024b

* 2024b is buggy, use 2024a instead

* fix comma
2024-09-06 10:06:38 +02:00
dependabot[bot] 3deca86201
Bump mjml from 1.5.0 to 3.1.0 (#4484)
Bumps [mjml](https://github.com/adoptoposs/mjml_nif) from 1.5.0 to 3.1.0.
- [Release notes](https://github.com/adoptoposs/mjml_nif/releases)
- [Changelog](https://github.com/adoptoposs/mjml_nif/blob/main/CHANGELOG.md)
- [Commits](https://github.com/adoptoposs/mjml_nif/compare/v1.5.0...v3.1.0)

---
updated-dependencies:
- dependency-name: mjml
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2024-09-05 11:20:30 +02:00
ruslandoga 47c2aec2e8
Update bamboo_mua to fix headers issue (#4474)
* update bamboo_mua to fix headers issue

* changelog

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2024-09-03 14:09:57 +02:00
ruslandoga 6c7f123d2c
Add better assets compression to CE (#4476)
* add better assets compression to ce

* changelog

* fix conditional compilation

* improve changelog message

* don't need zstd
2024-09-03 13:54:11 +02:00
ruslandoga 3a72bb8250
update ecto (#4475)
Co-authored-by: hq1 <hq@mtod.org>
Co-authored-by: Cenk Kücük <cenk@plausible.io>
2024-08-28 13:28:09 +02:00
Karl-Aksel Puulmann 9c71161eab
APIv2: JSON schema validation, separate internal and public API validation (#4464)
* Restore `date` internal parameter, validate via json schema

* Improved error formatting from json schema, get most tests passing

* Handle internal overrides to JSON schema

* Parsing tests all pass

* Remove some repeated code, enforce length/uniqueness in schema

* Explicit separation between internal and public API validation

* Mark file as external_resource

* map_join

* Update query tests

* Update query tests

* Serve schema under an /api/docs/query/schema.json endpoint

* dotify errors
2024-08-26 14:01:27 +03:00
ruslandoga 2e37d99e18
update ecto and related deps (#4457) 2024-08-21 07:54:10 +02:00
ruslandoga 48dfce7a8b
update ecto_ch and use ecto hints for array joins (#4456) 2024-08-21 06:28:25 +02:00
Karl-Aksel Puulmann ee3d1e770e
APIv2: visit:country_name, visit:region_name, visit:city_name dimensions (#4328)
* Add data migration for creating and syncing location_data table and dictionary

* Migration to populate location data

* Daily cron to refresh location dataset if changed

* Add support for visit:country_name, visit:region_name and visit:city_name dimensions

Under the hood this relies on a `location_data` table in clickhouse being regularly synced with
plausible/location repo and dictionary lookups used in ALIAS columns

* Update queue name

* Update documentation

* Explicit structs

* Improve docs further

* Migration comment

* Add queues

* Add error when already loaded

* Test for filtering by new dimensions

* Update deps

* dimension -> select_dimension

* Update a test
2024-08-13 09:44:58 +03:00
Adrian Gruntkowski 783740468d
Update `ua_inspector` fork to sanitize multi-part prereleases properly (#4398)
* Update `ua_inspector` fork to sanitize multi-part prereleases properly

* Add regression tests

* Make another version bump to include a fix for a missed corner case
2024-07-29 11:10:27 +02:00
Adrian Gruntkowski c11e9daa63
Use forked `ua_inspector` version sanitizing prerelease in versions (#4374) 2024-07-26 15:22:33 +02:00