Skip to content

Commit

Permalink
feat: campaigns segmentation API rearchitecture (#1192)
Browse files Browse the repository at this point in the history
* feat: segmentation criteria system (#1155)

* chore: remove Lightweight API and client ID handling (#1166)

* chore: remove Lightweight API and client ID handling

* chore: remove data pruning cron job and clear future instances

* fix: script dependencies

* fix: remove unused method refs

* test: remove tests using deprecated features

* chore: remove more unneeded files

* test: remove other failing tests

* fix(criteria): warn when criteria value is not available (#1167)

* feat: integrate criteria with segments (#1159)

Co-authored-by: Leo Germani <[email protected]>

* fix(criteria): allow async matching configuration (#1175)

* feat: segmentation match logic (#1169)

* feat: segmentation criteria system

* chore: refactor default criteria and implement utils

* chore: api tweaks

* fix: range logic

* chore: isolate segment matching example

* fix: ras dependency placement

* fix: add referrer sources category

* fix: api tweaks for consistency

* chore: file structure

* chore: inline docs

* chore: api tweaks

* fix: schema tweaks

* feat: add schema and migration helper

* fix: rename newsletter subscriber store item

* fix: send segment config instead of value

* chore: move default criteria registration

* fix: class name

* fix: change criteria options values

* fix: tweak migration

* fix: remove referrer creation

* fix: remove referrer creation

* test: dont enqueue scripts on tests

* test: add criteria

* test: add required

* test: add criteria

* fix: logic typo

* test: frontend matching

* fix: range config

* fix: missing range can be any range

* test: php criteria registration

* test: fix php test

* test: fix typo

* chore: improve inline docs

* fix: update segment criteria schema

* fix: configuration migration

* feat: use criteria to match prompt segments

* feat: fix schema and tests

* refactor: file structure

* chore: remove AMP polyfill JS

* feat: implement scroll triggers and frequency

* fix: add .phpunit.result.cache to .gitignore

* refactor: use prompt and segment config via JSON instead of DOM

* test: remove unit tests related to AMP Access and GA3 analytics

* fix: only show one overlay per page

* revert: use prompt and segment config via JSON instead of DOM

* test: re-fix failing tests

* fix: close overlay on background tap

* fix: src should not be added to release packages

* test: unit tests for segmetnation API

* test: actual unit tests for segmentation API

* chore: fix inline comment for accuracy

* fix: race condition when using perfmatters

* refactor: trigger seen GA4 event based on prompt_seen activity

* refactor: make the 1x overlay at a time rule testable

* refactor: overlay display check according to new unit test

* test: update test assertion for accuracy

* fix(criteria): allow async matching configuration

* fix: ensure global

* fix: logic for one-at-a-time overlays

* Revert "fix: race condition when using perfmatters"

This reverts commit c9fab16.

* fix: remove defaultCriteria.js

* fix: race condition with reader library JS

---------

Co-authored-by: Miguel Peixe <[email protected]>
Co-authored-by: Leo Germani <[email protected]>

* feat: favorite categories segmentation logic (#1177)

* feat: logic for favorite categories

* fix: top-ranked category must actually have more views than the other categories

* fix: simplify logic and account for undefined countsArray

* fix: account for multiple views in one category; simplify logic a bit

* fix: correct indexOf comparison

* feat: migrate reader data (#1176)

* fix: a PHP warning when migrating a user to the new data schema (#1180)

* Refactor/segments relationship (#1168)

* feat: refactor segment relationship

* feat: refactor complete and tests updated

* fix: popup exporter

* fix: popup analytics events

* fix: avoid warning in the schema

This is actually a bug in core.
see https://core.trac.wordpress.org/ticket/56494

* fix: do not return disabled segments on REST

---------

Co-authored-by: Miguel Peixe <[email protected]>

* feat: Update/remove category cleanup (#1185)

* fix: remove old category cleanup

It was looking at deprecated configuration meta
After the refactor having a non existent cat should not be a problem

* test: remove test

* chore: remove lightweight api setup (#1183)

* fix: fallback if no newspack plugin (#1179)

* fix: allow prompts to be displayed without segmentation if no Newspack Plugin

* refactor: avoid use of negative variable name

* fix: newspack_popups_view.segments is not an array

* fix: hide segments taxonomy

---------

Co-authored-by: Leo Germani <[email protected]>
Co-authored-by: dkoo <[email protected]>

* fix: restore support for plugin settings (#1181)

* fix: support segmentation on donor landing page

* fix: support Mailchimp donor merge fields for segmentation

---------

Co-authored-by: Leo Germani <[email protected]>

* fix: lines added by accident in last merge

* feat: move migration methods (#1184)

Co-authored-by: Derrick Koo <[email protected]>

* fix: auto-fill segment (#1188)

* feat: remove non interactive mode (#1190)

* fix: missing release files (#1191)

* fix: distignore should include some src subfolders

* fix: segments admin URL localized key name

* fix: previews (#1178)

* fix: allow manual prompts to be displayed in previews

* fix: previewing as a segment

* feat: use temporary reader data sessions for previews

* fix: single-prompt previews

* refactor: use helper function for determining override

* test: add tests for view_as and pid overrides

* test: fix query string in test

---------

Co-authored-by: Miguel Peixe <[email protected]>
Co-authored-by: Leo Germani <[email protected]>
Co-authored-by: Miguel Peixe <[email protected]>
Co-authored-by: dkoo <[email protected]>
  • Loading branch information
5 people authored Aug 17, 2023
1 parent 1fde2d5 commit d554151
Show file tree
Hide file tree
Showing 81 changed files with 2,857 additions and 8,825 deletions.
5 changes: 5 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ node_modules
/tests
/bin
/release
/src/assets
/src/document-settings
/src/editor
/src/settings
/src/view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DS_Store
.cache
*.cache
Thumbs.db
wp-cli.local.yml
node_modules/
Expand Down
20 changes: 0 additions & 20 deletions api/README.md

This file was deleted.

Loading

0 comments on commit d554151

Please sign in to comment.