wagtail-nest / wagtail-personalisation

Rule-based personalisation for Wagtail CMS
http://wagxperience.io/
MIT License
120 stars 34 forks source link

When creating a non checked logged-in rule, it will discard the rule #229

Open TWOC-WHT opened 2 years ago

TWOC-WHT commented 2 years ago

I found a workaround solution, so hopefully this can help other people that are trying to make a logged-out segment (by not checking the logged-in rule.

Reproduce steps:

  1. Create a new segment
  2. Add "Add Logged In rule"
  3. Don't tick/check the rule (keep empty), as the aim is to create a logged-out segment image
  4. Save
  5. In the segment dashboard view, the segment won't have any rule. image
  6. If you go back to the configuration page of the segment, the logged-in rule is not saved, as if you didn't add it (thus making the segment having no rule) image

Current Fix/Workaround steps:

  1. Create a new segment
  2. Add "Add Logged In rule"
  3. Tick/check the rule (this is temporary) image
  4. Save
  5. In the segment dashboard view, the segment now shows the rule as "visitors are logged in" image
  6. Go back to the configuration, the logged-in rule is now properly saved
  7. Uncheck the rule (Not delete) image
  8. Save
  9. In the dashboard view, it now shows as having the rule as "visitors are not logged in" image

Suggestion:

For logged-in rule, maybe we can use a dropdown instead of a checkbox?

easherma-truth commented 2 years ago

You can use a dropdown, I think just if it isn't false by default