Commit Graph

7440 Commits

Author SHA1 Message Date
Kevin Ansfield
e547ffb466 Fixed accent-color buttons not being colored in dark mode
refs https://github.com/TryGhost/Team/issues/993

- dark mode button style was overriding the `.gh-btn-accent` styles as the `:not` gave it higher precedence
2021-08-26 16:08:26 +01:00
Sanne de Vries
a83830db7a Styled publishing action dropdown in publish menu 2021-08-26 13:01:45 +02:00
Kevin Ansfield
d0ef530df3 Fixed Safari showing contact suggestions when adding/replacing snippet
refs https://github.com/TryGhost/Team/issues/1008

- Safari doesn't respect `autocomplete="off"` and will attempt to show autofill suggestions, in this case it was picking up "name" from the "Snippet name" placeholder and showing suggestions for contacts on top of the snippets dropdown
- having the input name include "search" overrides the autofill behaviour
- https://bytes.grubhub.com/disabling-safari-autofill-for-a-single-line-address-input-b83137b5b1c7
2021-08-26 10:18:25 +01:00
Rishabh
b2616de5d1 Fixed portal preview for tier changes
refs https://github.com/TryGhost/Team/issues/981

- saving a new or existing tier needed a hit on top right save on settings as well or it wasn't showing on the front-end. This change refreshes portal preview once a tier is saved from its modal window so that frontend can correctly reflect the right data immediately.
2021-08-26 13:33:32 +05:30
Kevin Ansfield
ed85901607 Fixed tabbing in and out of <GhInputWithSelect>
refs https://github.com/TryGhost/Team/issues/1009

- setting `tabIndex="-1"` on the trigger prevents the trigger container receiving focus rather than the container input element (fixes general tabbing in and out)
- added extra blur handling to the input element so that it is not left in an open dropdown state when tabbing out
2021-08-25 15:41:30 +01:00
Kevin Ansfield
b5f43a7e9d Added autofocus of button text input in email-cta card after enabling button
refs https://github.com/TryGhost/Team/issues/1009

- added ID generation to the component as an example of good practice to avoid problems with multiple elements having the same ID
- used `afterRender` queue to schedule the focus of the button text input element so the element actually exists (it's added to the DOM only when `showButton` is true so we have to wait for that to complete)
2021-08-25 15:41:30 +01:00
Sanne de Vries
d8c7673a94 Capitalized email preview footer buttons 2021-08-25 13:13:55 +02:00
Naz
f0d2a9c253 Added copy to pre publish modal of email only post
refs https://github.com/TryGhost/Team/issues/947

- The wording makes it clear the post wont be accessible publicly after sending it
2021-08-25 14:56:12 +04:00
Naz
299a557cca Updated component syntax
refs https://github.com/TryGhost/Team/issues/947

- There is no need to use proxy objects in the newest versions of Ember. It's an old patterns that should not be perpetuated
2021-08-25 22:20:11 +12:00
Naz
eef3ee8942 Integrated post distribution dropdown into publish menu
refs https://github.com/TryGhost/Team/issues/947

- Shows the publish option selector based on the "emailOnlyPosts" feature status
2021-08-25 22:20:11 +12:00
Naz
9e84441e75 Added publishing action dropdown to publish menu
refs https://github.com/TryGhost/Team/issues/947

- Added a "distribution" dropdown component to the post publish menu allowing to select from one of three available types of distribution: publish, poblush&send, and send
2021-08-25 22:20:11 +12:00
Naz
2ad745e429 Removed email-only post checkbox from PSM
refs https://github.com/TryGhost/Team/issues/947

- The checkbox will live in the post publish menu instead
2021-08-25 22:20:11 +12:00
Sanne de Vries
debb081c61 Updated email CTA toolbar
Refs https://github.com/TryGhost/Team/issues/1007
2021-08-25 11:55:10 +02:00
Sanne de Vries
43f49da2d5 Fixed styling issue for email CTA card dropdown when positioned above input field 2021-08-25 11:27:31 +02:00
Kevin Ansfield
a6ca133915 Renamed buttonAlignment to alignment in email-cta payload
refs https://github.com/TryGhost/Team/issues/1007

- all contents within an email-cta card are now aligned left/center so it doesn't make sense to keep the payload attribute as `buttonAlignment`
2021-08-24 17:53:34 +01:00
Kevin Ansfield
dff28b3ca6 Removed "Link to this post" option from email-cta suggested URLs
refs https://github.com/TryGhost/Team/issues/1007

- we don't know the URL of a post until after it's published so we were using the preview URL instead as that will always redirect to the current URL
- however, it's not clear in the UI that is how the preview URL works so we're removing it to avoid any confusion
2021-08-24 16:52:13 +01:00
Kevin Ansfield
8309904fcc Fixed clicking on existing snippets in dropdown having no effect
no issue

- mousedown handler in the snippet input component was automatically closing when it was detecting a mousedown event outside of the element
- the new dropdown select is rendered in a wormhole outside of the component's element so the whole component was being destroyed before the mouseup listener on an option was fired
2021-08-24 16:04:49 +01:00
Sanne de Vries
e9f2bfa92b Updated emailed status in posts list and added email icon to scheduled posts
Refs https://github.com/TryGhost/Team/issues/954
2021-08-24 14:11:15 +02:00
Kevin Ansfield
e6e08ab70a Fixed button showing in email-cta rendered mode when it's disabled
refs https://github.com/TryGhost/Team/issues/1007

- added `@payload.showButton` to the conditional for showing the button
- `@payload.buttonText` and `@payload.buttonUrl` both kept in the conditional to match how it would behave in the email
2021-08-24 11:44:53 +01:00
Sanne de Vries
6198019de1 Updated snippet replacement dropdown 2021-08-24 12:28:07 +02:00
Kevin Ansfield
e979e45fdb Linked up divider toggle button in email-cta card toolbar
refs https://github.com/TryGhost/Team/issues/1007

- replaced `hasTopDivider` and `hasBottomDivider` and associated payload properties for a single `showDividers` payload property
- removed divider toggles from non-edit mode card toolbar
- linked edit-mode toolbar divider to a toggle dividers action
2021-08-24 10:50:25 +01:00
Kevin Ansfield
0dab21e604 Linked up email-cta button toggle
refs https://github.com/TryGhost/Team/issues/1007

- updated card payload defaults assignment and set `showButton` to `false`
- linked up button toggle button to toggle `showButton` in card payload and show as green when enabled
- hid button, and associated text/url inputs when `showButton` is false
- added `disabled` attribute to button when there's no text (attempt to simulate "placeholder" styling) and matched the text to the button text placeholder
2021-08-24 10:50:25 +01:00
Sanne de Vries
e21669dfa9 Fixed test 2021-08-24 11:39:04 +02:00
Sanne de Vries
f59fae71eb Updated snippet replacement dropdown 2021-08-24 11:21:47 +02:00
Kevin Ansfield
de480234e9 Fixed snippet creation from email-cta card's toolbar
no issue

- Glimmer components do not have a `.element` property so we need to set it manually because the editor currently reaches into card components to calculate the element's rect for selection when creating snippets
2021-08-24 10:12:52 +01:00
Kevin Ansfield
d45ba1aa78 Updated snippet replacement modal copy and button colour
no issue

- red -> black for button colour, red was a copy pasta from the delete confirmation modal
2021-08-24 09:13:13 +01:00
Sanne de Vries
4d3634a6d5 Updated icons in email CTA toolbar 2021-08-24 09:48:34 +02:00
Kevin Ansfield
29095ffba1 Updated suggested URLs list in the email-cta card
refs https://github.com/TryGhost/Team/issues/992

- added "Link to this post" option that uses the preview URL as it's currently the only guaranteed URL that we know before a post is published
- added "Free email signup" option
- added "Paid subscription" and "Upgrade or change plan" options that are only shown when Stripe is connected
2021-08-23 18:46:00 +01:00
Kevin Ansfield
ddf6360ae2 Passed post as a card option through to editor cards
refs https://github.com/TryGhost/Team/issues/992

- within cards we sometimes want access to the `post` record so that UI or copy can be changed based on what is currently being edited
- added ability to pass `@cardOptions` through to the editor components
- fixed KoenigEditor not correctly assigning the `cardOptions` object to the `options` object that gets passed to every card when they are rendered
2021-08-23 18:42:14 +01:00
Kevin Ansfield
330d264550 Fixed linting error
no issue

- removed unused variable
2021-08-23 17:34:17 +01:00
Kevin Ansfield
4184543307 Added confirmation modal when updating an existing snippet
refs https://github.com/TryGhost/Team/issues/973

- show confirmation modal instead of immediately replacing content of the existing snippet
2021-08-23 17:12:26 +01:00
Kevin Ansfield
daa7f2e781 Added ability to update snippet contents
refs https://github.com/TryGhost/Team/issues/973

- added `@showCreate` option to `<GhInputWithSelect>` that enables the create option without having to pass a function in `@showCreateWhen`
- fixed autofocus not focusing input element in `<GhInputWithSelect>` when `autofocus="true"` isn't enough by itself
- updated `selectOrCreate` in `<GhInputWithSelect>` to trigger `onChange` if it's passed in rather than `onInput`
- swapped input in labs snippet input to `<GhInputWithSelect>`
- added actions for updating a snippet when an existing snippet is selected
- added action to editor control for saving an updated snippet
2021-08-23 16:00:01 +01:00
Sanne de Vries
ca7fe6e0e7 Updated email CTA toolbar
Refs https://github.com/TryGhost/Team/issues/1007
2021-08-23 16:39:18 +02:00
Sanne de Vries
11cc53c4d0 Added divider button to email CTA card toolbar
Refs https://github.com/TryGhost/Team/issues/1007
2021-08-23 16:22:56 +02:00
Sanne de Vries
c4e54c92ae Updated email CTA card
Refs https://github.com/TryGhost/Team/issues/1007

- Changed text and button to auto-update alignment in and outside of edit mode
- Updated icons
- Added titles on hover
2021-08-23 15:04:11 +02:00
Sanne de Vries
60e14a3dfa Added toolbar to email CTA card
Refs https://github.com/TryGhost/Team/issues/1007
2021-08-23 14:10:33 +02:00
Rishabh
e71feeae5f Moved "Free" to "Tiers" section in Portal settings when visible
closes https://github.com/TryGhost/Team/issues/878

"Free" should be part of "Tiers" section in Portal settings when there are more than one product
2021-08-23 16:24:33 +05:30
Rishabh
6c7309d9bd Fixed labels and tiers crammed in recipient select dropdown
closes https://github.com/TryGhost/Team/issues/983

- fixes overlap of labels and tiers when there are a lot of labels in the recipient select dropdown of publishing menu.
2021-08-23 16:15:31 +05:30
Naz
0ae602cf70 Added email icon to posts list sent status
refs https://github.com/TryGhost/Team/issues/954

- The email icon is signalling there was a newsletter sent with the post and allows to identify the "email only" posts easier
2021-08-23 14:28:55 +04:00
renovate[bot]
568e0efc28 Update dependency testem to v3.4.3 (#2066)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-23 09:30:57 +01:00
Kevin Ansfield
8d136068f3 Moved koenig CSS out of spirit CSS (#2068)
no issue

- Koenig is making use of other Admin-provided components which meant that editor-specific styles for those components were increasingly needing to make use of `!important` to override those component styles (specific example is using power-select based components) due to the order that CSS was loaded
- Koenig styles don't really fit with the other generic utility classes inside spirit so it makes sense to elevate them to the same level as other component styles within Admin's CSS
2021-08-23 09:29:44 +01:00
Rishabh
8d6c677b35 Fixed multiple "Specific tier" option in post access dropdown
closes https://github.com/TryGhost/Team/issues/903

- fixes multiple instances of "Specific tier" option in post access dropdown as main visibility list was getting modified on each load instead of using a separate instance
2021-08-23 12:40:59 +05:30
Rishabh
31d608f7dd Refined available tiers UI on Portal settings for single product
closes https://github.com/TryGhost/Team/issues/812

- removes `Products available at signup` in Portal settings in Admin if there is only single tier available
2021-08-23 12:26:26 +05:30
Rishabh
76b0483fd2 Added default product in portal settings on stripe connect
refs https://github.com/TryGhost/Team/issues/812

- adds default product(if none selected) to `portal_products` setting on Stripe connect, so when `Multiple tiers` are enabled there is always a default product selected for Portal
2021-08-23 12:26:26 +05:30
Rishabh
f65b5e3ef0 Handled missing benefits for products
no refs

- loads benefits for products along with monthly/yearly prices in member details screen
- handles empty benefits in product detail modal
2021-08-23 12:26:26 +05:30
Naz
633a40e8e3 Updated members import error detection
refs refs https://github.com/TryGhost/Team/issues/912
refs d6f3210fd2
2021-08-20 18:09:19 +04:00
Naz
99328ab145 Moved email list check to GA
refs https://github.com/TryGhost/Team/issues/906

- The feature has moved to GA from behind alpha flag. It's skipping the beta phase as it's not needed in this specific situation
2021-08-20 18:09:19 +04:00
Kevin Ansfield
8f21f0d4fa Added pre-filled options to email-cta card's button url input
refs https://github.com/TryGhost/Team/issues/992

- swapped input element for `<GhInputWithSelect>`
- added `config.getSiteUrl()` method for generating front-end URLs including subdomain
- added example suggested URLs to email-cta card to pass as options to button url input
2021-08-20 14:33:30 +01:00
Kevin Ansfield
33c872c859 Added <GhInputWithSelect> component
refs https://github.com/TryGhost/Team/issues/987

- `<GhInputWithSelect>` acts as a typical text input element but will also show options that are filtered whilst typing. Useful for inputs where there should be suggestions or the ability to choose an existing option
- updated `<GhSearchInput>` to use the renamed and slightly modified trigger
2021-08-20 14:33:30 +01:00
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