Commit Graph

6825 Commits

Author SHA1 Message Date
Kevin Ansfield
db09b317eb Added auto height adjustment to membership portal preview
no issue

- added `@onDestroyed` argument to `<GhSiteIframe>` so consumers can clean up any references
- used `@onLoaded` and `@onDestroyed` to handle a reference to the preview iframe
- updated portal preview load handler and update method to trigger a resize task
  - add a 100ms delay to allow for portal to re-render itself
  - reach through the two iframes to get the portal container element and use it's height to set the style attribute on the portal preview container element
2021-05-18 18:26:07 +01:00
Rishabh
2a0c2c3f48 Updated portal links UI to fixed values
no refs

We are reverting Portal links to use monthly/yearly for now instead of price ids, this change updates to use old nickname and if mapping.
2021-05-18 22:05:29 +05:30
Rishabh
f9672e7095 Updated portal plans on monthly/yearly price change
no refs

Portal plans setting contains list of prices that are allowed by site owner to use in Portal UI. Since we now switch monthly/yearly prices dynamically, we need to update portal plans on price change to still reflect updated monthly/yearly prices in Portal UI.
2021-05-18 21:50:38 +05:30
Kevin Ansfield
eecd6d03b6 Fixed linting error 2021-05-18 16:38:29 +01:00
Kevin Ansfield
602549097a Fixed flash of site when portal preview is loading
no issue

- added `@invisibleUntilLoaded` boolean argument to `<GhSiteIframe>`
  - when set to true add `.invisible` class until iframe's `load` event is triggered
- removed manual iframe hiding with 1.2sec delay from portal settings modal
- added `@onLoad` argument to `<GhSiteIframe>` for consumers to hook in if needed
2021-05-18 16:36:18 +01:00
Kevin Ansfield
b4a6eb594d Converted <GhSiteIframe> to a glimmer component
no issue

- updated to class syntax and glimmer component behaviour
- tidied up and standardised usage of the component
2021-05-18 16:08:13 +01:00
Rishabh
11be983d99 Filtered active monthly/yearly prices in portal settings
no refs

We only want to show currently active monthly/yearly prices in Portal and Portal settings based on new settings for price ids, and hide all other prices
2021-05-18 20:25:05 +05:30
Sanne de Vries
fcef76cebf Fixed responsive issues for membership settings 2021-05-18 15:59:32 +02:00
Rishabh
d2162f02a0 Added missing action modifier on memberships setup
no refs

Last commit missed the `action` modifier for setup method used in memberships screen insert.
2021-05-18 19:26:50 +05:30
Rishabh
d746265a52 Fixed active prices not read from settings
no refs

Previously, we were fetching product and prices in the constructor of the controller which did not guarantee settings were updated when picking active prices from the price list. This updates the setup to use `did-insert` modifier to correctly fetch and populate product/price data.
2021-05-18 19:17:25 +05:30
Kevin Ansfield
6b287a41c0 Hid button in memberships portal preview
no issue

- added button override to `getPortalPreviewUrl()` and set it to `false` when generating preview URL for memberships preview
2021-05-18 14:34:55 +01:00
Sanne de Vries
dce8d77cf0 Updated access settings dropdowns and icons 2021-05-18 15:10:42 +02:00
Kevin Ansfield
8a1ae88192 Added portal preview to memberships screen
no issue

- fixed styling issues
    - fixed portal preview taking over the screen by adding `position: relative` to the container
    - fixed portal preview being interactive by disabling pointer events
- added portal preview URL generation to memberships controller
    - moved much of the preview params knowledge/calculations from the `<ModalPortalSettings>` component into the `members-utils` service so that a portal preview URL can be generated from anywhere using current settings values rather than the method consumer needing to have knowledge of all params and how to generate them
    - updated actions in controller that modify settings to also update the preview url
    - added `onChange` event to the `<Settings/MembersSubscriptionAccess>` component so the controller can react and update preview
- used `<GhSiteIframe>` with generated portal preview URL for live display of portal changes on memberships screen
2021-05-18 13:59:57 +01:00
Peter Zimon
37de5f957d Updated launch wizard Stripe connect info styles 2021-05-18 14:15:44 +02:00
Peter Zimon
b9ba7045a4 Copy update on Member details 2021-05-18 11:42:16 +02:00
Peter Zimon
97866adb37 Minor spacing refinements on Membership settings 2021-05-18 11:09:42 +02:00
Rishabh
995b102617 Wired premium prices in membership settings
refs 4627d1c26a

- Adds new settings for monthly/yearly price ids in the settings modal
- Updates logic to save product on membership settings - Creates new prices for monthly/yearly when it doesn't exist, updates the monthly/yearly price ids in the settings
- Fixes selected currency value in dropdown
2021-05-18 13:41:36 +05:30
Sanne de Vries
a237dc73d9 Refined membership access settings 2021-05-17 19:36:36 +02:00
Peter Zimon
87e2a3db37 Refined currency dropdown 2021-05-17 18:12:49 +02:00
Peter Zimon
ee7ac5588a Fix tests 2021-05-17 17:39:41 +02:00
Peter Zimon
fa95868c36 Moved Stripe connect settings to modal 2021-05-17 17:28:39 +02:00
Rishabh
35612db851 Wired membership tiers UI in new members setting
no refs

- Wired Premium membership UI to existing monthly/yearly prices in the default product
- Wired free membership UI to redirect URI setting
- Updated save to validate settings/errors
2021-05-17 20:06:03 +05:30
Kevin Ansfield
686dadbeda Fixed errors when closing portal settings modal
no issue

- added actions for handling close/confirm/cancel of portal settings rather than re-using the route-level leave modal because the portal settings modal does not need any knowledge of the route
- added controller reset that is called when the route is exited to ensure no modals are shown when navigating back to the membership screen
- fixed "cannot set on destroyed" error when portal settings are opened and closed quickly
- removed usage of old `{{action}}` helper - this has been replaced with `{{on}}` and `{{fn}}`
2021-05-17 12:41:21 +01:00
Peter Zimon
c3748e4d18 Membership settings UI refinements
- added Portal mock container and background
- updated header behavior
2021-05-17 13:35:31 +02:00
Peter Zimon
bf3349ca0f Applied basic layout for membership settings
- created main blocks
- added tier forms
- added button for Stripe connect modal
2021-05-17 13:01:54 +02:00
Kevin Ansfield
27a2bc7722 Removed products options from members segment select
no issue

- we're currently limited to a single product so it doesn't make sense to show it as an option as it creates two different routes to "paid members" that we'd like to avoid for now
2021-05-17 10:15:37 +01: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
Rishabh
4c736d1c80 Added basic portal settings in new membership area
no refs

Members related settings are being consolidated into a single screen.

- Adds basic portal settings UI
2021-05-17 13:28:15 +05:30
Kevin Ansfield
de560733c5 🎨 Reverted ability to set post access level to labels
refs https://github.com/TryGhost/Team/issues/581

Setting post visibility to a label results in undesirable and confusing behaviour with no good way to manage access long-term. Coupled with products being limited to a single product for now we're reverting the UI back to the "Public", "Members", and "Paid" options.
2021-05-14 16:01:14 +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
06ff9dfb10 Fixed unsaved confirmation when leaving membership settings screen
refs bdcbfcb92c

- previous commit missed rename of access route to membership
2021-05-14 15:35:07 +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
Kevin Ansfield
bdcbfcb92c Renamed access settings route to membership
no issue

Members related settings are being consolidated into a single screen.

- renamed access to membership as the starting point for redesign and consolidation of other settings screens
2021-05-14 14:33:18 +01:00
Peter Zimon
52d55a311a Fixed account menu positioning bug 2021-05-13 12:06:46 +02:00
Peter Zimon
8fab84418e Fixed button hover state bugs in dark mode 2021-05-13 11:47:14 +02:00
Peter Zimon
ba14318de0 Fix "Add subscription" button dark mode UI bug 2021-05-13 11:38:19 +02:00
renovate[bot]
91e01ab70f Update dependency testem to v3.4.1 (#1962)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 17:11:51 +01:00
renovate[bot]
db434972c6 Lock file maintenance (added missing uids) (#1939)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 15:56:22 +01:00
Kevin Ansfield
0099238030 Removed ember-testing group from Renovate config
no issue

- the dependencies are released at different cadences and are not interlinked
- allows independent upgrades when one dependency with a slow release is buggy
2021-05-12 15:52:17 +01:00
Kevin Ansfield
4c9eeddd79 Lock file maintenance with fixes
no issue

- catch `undefined` error when saving posts in editor which is thrown by our validation system and handled elsewhere
- bumped `ember-power-select` and switched `ember-power-datepicker` to a github ref so dependency-update fixes are included (version not released yet, see https://github.com/cibernox/ember-power-datepicker/issues/61)
- added a resolution for `ember-basic-dropdown@3.0.16`, with the latest `3.0.17` nothing is shown for the publish/post-settings menus for the date picker dropdown
2021-05-12 15:47:37 +01:00
Rishabh
052c5f62a9 Fixed checkbox state not persisted in wizard
closes https://github.com/TryGhost/Team/issues/676

The checkbox state for portal plans was not stored between wizard pages and kept switching back to original state.
2021-05-12 17:20:32 +05:30
renovate[bot]
724cbc6123 Update dependency ember-infinity to v2.2.0 (#1950)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 12:43:08 +01:00
renovate[bot]
7730720c84 Update dependency @tryghost/timezone-data to v0.2.42 (#1960)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 12:41:31 +01:00
Kevin Ansfield
e584569914 Switch deprecated htmlSafe imports from @ember/string to @ember/template
no issue

See https://deprecations.emberjs.com/v3.x#toc_ember-string-htmlsafe-ishtmlsafe
2021-05-12 12:33:40 +01:00
Kevin Ansfield
74b08e19b8 Switch deprecated {{hasBlock}} to (has-block)
no issue

See https://github.com/emberjs/rfcs/blob/master/text/0689-deprecate-has-block.md
2021-05-12 12:33:40 +01:00
renovate[bot]
b003327975 Update dependency ember-test-selectors to v5.1.0 (#1953)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 12:20:51 +01:00
renovate[bot]
0c46f36809 Update dependency ember-cli-babel to v7.26.5 (#1948)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 12:20:28 +01:00
renovate[bot]
28e87fe281 Update dependency glob to v7.1.7 (#1952)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 12:20:13 +01:00
renovate[bot]
b473740a4c Update dependency @tryghost/string to v0.1.19 (#1959)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 12:19:53 +01:00
renovate[bot]
d1eb0ff44d Update dependency @tryghost/helpers to v1.1.44 (#1958)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-12 12:19:44 +01:00