Commit Graph

15 Commits

Author SHA1 Message Date
Kevin Ansfield
060d791a63 Removed need for .get() with settings service
no issue

The `settings` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `settings` service by grabbing the attributes off the setting model after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to the model's getters/setters. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `settings.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed use of observer in the `customViews` service because it was being set up before the native properties had been added on the settings service meaning autotracking wasn't able to set up properly
2022-10-07 16:14:57 +01:00
Simon Backx
eee3a9aa90 🔥 Removed multipleProducts, tierWelcomePages, and tierName flags
refs https://github.com/TryGhost/Team/issues/1616
2022-05-16 17:25:03 +02:00
Hannah Wolfe
affe6743e5 Renamed products to tiers (#2372)
refs: https://github.com/TryGhost/Team/issues/1145

- this should allow us to remove the /products endpoint in v5

It avoids:

- `kg-product-card`, that really is meant to say product
- `product-cadence` on offers

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-11 22:41:54 +05:30
Kevin Ansfield
4b646d40ea Added non-Stripe members setting screen acceptance tests
refs https://github.com/TryGhost/Team/issues/1358

- added acceptance tests for members settings screen
  - subscription access management
  - default post access management
  - free tier management
- fixed `enableLabsFlag()` test helper overwriting existing flag settings when enabling another one
- updated API mocks and fixtures
  - matched product fixtures to default tiers-enabled products
  - updated product API mocks to include benefit handling
2022-02-18 22:36:01 +00:00
Rishabh Garg
e493afdb16 Updated specific tier handling for default post access setting (#2246)
refs https://github.com/TryGhost/Team/issues/1071

Default content visibility for specific tiers is now stored across 2 settings - `tiers` on `default_content_visibility` and list of tier ids on `default_content_visibility_tiers` setting, which is consistent with pattern of storing visibility on posts. This change -

- updates visibility filter UI for default content visibility segment select
- cleans up common visibility segment select component to handle ids directly instead of nql segments
- updates setting model
2022-02-04 21:00:59 +05:30
Peter Zimon
95359d56f2 Copy refinements for tiers
- changed 'Products' to 'Tiers'
- changed 'A segment' to 'Specific tiers'
2021-08-20 12:15:20 +02:00
Peter Zimon
a6ba245bcd Updated copy for tiers
- Updated copy of multiple products to "Tiers"
2021-07-19 12:39:59 +02:00
Rishabh
0f9177919c Refined segment selection in default post access setting
closes https://github.com/TryGhost/Team/issues/862

- allows deleting a single product in the segment dropdown
- shows error message in segment when no product is selected
2021-07-16 18:31:23 +05:30
Peter Zimon
830d24cb20 Refined post visibility settings
- added placeholder text to product/tier dropdown
- applied visual refinements

Note: alpha feature
2021-07-06 14:46:33 +02:00
Rishabh
450ad78f61 Added custom segment option for default post access setting
refs https://github.com/TryGhost/Team/issues/803

With multiple products we'll re-enable segmentation by product for posts, which also means need to add a new option to the default post access setting in Membership settings. This change -

- adds new `A segment` option to default post access dropdown behind the alpha flag for multiple products
- shows member segment select dropdown for `A segment` option
- handles update of `defaultContentVisibility` to allow setting custom filter
2021-07-05 17:14:26 +05:30
Sanne de Vries
dce8d77cf0 Updated access settings dropdowns and icons 2021-05-18 15:10:42 +02:00
Sanne de Vries
a237dc73d9 Refined membership access settings 2021-05-17 19:36:36 +02:00
Kevin Ansfield
51536fb2ef Added icons to membership dropdown options
no issue

- add icon + icon color to the subscription access and default post access option lists
- updated templates to use icon in trigger and option display
- fixed ember-power-select styles overriding svgs in trigger
2021-05-17 09:42:44 +01:00
Kevin Ansfield
42ef8df7ca Switched signup and default post access settings to dropdowns
no issue

- provides clearer indication of current setting without having to expand anything
- has more minimal UI which helps when settings screen has multiple areas
2021-05-14 15:44:10 +01:00
Kevin Ansfield
cb3b01c020 Extracted individual members setting blocks into components
no issue

- the membership setting screen will be covering a lot of areas, having individual settings as discrete components allows for easier re-organisation and cleaner parent templates and controllers
2021-05-14 15:01:50 +01:00