Commit Graph

7677 Commits

Author SHA1 Message Date
Peter Zimon
5516968936 Added empty result states to new members filtering 2021-09-03 12:18:15 +02:00
Kevin Ansfield
e9a8361687 Fixed errors when pasting non-markup into basic html fields
no issue

- the editor range was getting out of sync between pasting and the subsequent `didUpdatePost` callback which cleans up content to conform to our "basic html" expectations resulting in errors in the console and potentially lost content if the paste occurred with the cursor inside existing text
- updated `handlePaste` to perform the same parse as the default paste handler but then cleanup the post before inserting so there's no mismatch of content across the editor callbacks
2021-09-03 10:51:45 +01:00
Peter Zimon
0b7d1b1946 Fixed gallery delete icon color bug 2021-09-03 11:45:29 +02:00
Peter Zimon
0f0c44295e Added show-all button to empty members filter list 2021-09-03 11:37:26 +02:00
Kevin Ansfield
5eb817373f 🐛 Fixed captions becoming uneditable when they have a trailing space
closes https://github.com/TryGhost/Team/issues/1023
closes https://github.com/TryGhost/Ghost/issues/11424

- we were comparing the caption editor's contenteditable inner html vs the passed in html in order to reset the editor if the bound value changed upstream, this was causing problems because the editor and external html cleaning were treating trailing whitespace slightly differently which resulted in the editor being reset every time it gained focus when a trailing space was present
- removed reliance on inspecting the editor's inner html and instead switched to comparing a changed `html` value to that which was passed in during initialisation or was last passed upstream from the editor so there's no chance of unexpected deviance
2021-09-03 09:00:14 +01:00
Peter Zimon
bc48cdffd0 Fixed button alignment in edit tier modal 2021-09-02 22:37:14 +02:00
Peter Zimon
a1cd55b848 Added preview to tier edit modal 2021-09-02 16:01:50 +02:00
Kevin Ansfield
922c304e3b Added "Email call to action" card for an email-only CTA targeting free or paid members (#2080)
refs https://github.com/TryGhost/Team/issues/993

The new editor card allows you to add styled content along with an optional button that will only be visible to free or paid members when the post is emailed. Useful for encouraging free members to sign up to a paid account for example.

- removed labs flag and conditionals to make the feature is available by default
- cleaned up CSS that re-used the `.email-card` class or was referencing `labs`
2021-09-02 13:11:15 +01:00
Rishabh
9a74c59630 Refined enter behavior in Admin benefits modal
refs https://github.com/TryGhost/Team/issues/874

- when hit with focus on last non-empty benefit field, previously the new benefit automatically showed error for empty field. This change refines behavior to only show error when user tries to click "Enter" again when already on last empty benefit
- also cleans up the duplicate add benefit call
2021-09-02 15:10:58 +05:30
Kevin Ansfield
233e57071f Fixed email-cta card button input placeholder disappearing on focus
no issue

- behaviour was from copy-pasting from a different input where the placeholder was intentionally hidden on focus, that's not desirable in this case
2021-09-02 07:42:36 +01:00
Kevin Ansfield
ba5b5f7935 Fixed email-only card help text overlapping card border
no issue

- negative margin was pulling the card border up too far and causing it to run behind the grey help block
2021-09-01 17:56:29 +01:00
Peter Zimon
805873d64e Made Portal preview scrollable
- Updated Portal preview in Membership settings and Portal settings so that the preview is scrollable in all browsers.

Note: Only when Tiers is turned on.
2021-09-01 17:58:35 +02:00
Peter Zimon
c5e00d71f1 Tier modal benefit box height fix 2021-09-01 15:48:17 +02:00
Peter Zimon
e175b97c5e Updated field description for email footer 2021-09-01 14:13:42 +02:00
Peter Zimon
c462bbba3b Copy refinements
- Fixed incorrect casing on staff page
- Removed unnecessary placeholders on staff page
- Removed '...' from search site
- Added webhook URL placeholder
2021-09-01 13:02:00 +02:00
Peter Zimon
d8be0a794e Cleaned up placeholder for webhook forms 2021-09-01 12:55:40 +02:00
Peter Zimon
16aec55acf Use examples as placeholders in tier form 2021-09-01 12:53:37 +02:00
Peter Zimon
8cce7989f2 Updated tier modal copy 2021-09-01 10:14:56 +02:00
Kevin Ansfield
4e30da6c70 Added ability to update snippet contents (#2073)
refs https://github.com/TryGhost/Team/issues/1008

To update a snippet, select the content in the editor that you want as your snippet text and click the snippet icon as per creating a snippet. Once the snippet name input shows, start typing the name of an existing snippet to be able to select it for update.

- replaced main snippet input component with the labs component
- removed the feature flag and associated labs screen toggle
- removed original/labs snippet input conditional in the editor
2021-09-01 09:09:40 +01:00
Naz
f2883c3636 Fixed a routing error when a "sent" post was edited
refs https://github.com/TryGhost/Team/issues/954

- When an email-only post with a "sent" status was edited, it's status changed to "draft", which is an incorrect behavior. This change is causing the "sent" status to persist and removes the transition error.
2021-08-31 20:16:53 +04:00
Naz
c27194efc5 Added a post preview link in PSM for "sent" posts
refs https://github.com/TryGhost/Team/issues/954

- When the post has a "sent" status there needs to be a way similar to the one for "published" posts to preview the post
2021-08-31 20:16:53 +04:00
Kevin Ansfield
06e63d371c 🎨 Added ability to upload a feature image by drag and dropping an image file
refs https://github.com/TryGhost/Team/issues/884

Drop-to-upload functionality was lost in the first version of the new feature image uploader inside the main editor area, this adds it back in.

- fixed dropzone flickering issue by switching the event listeners to the capture rather than bubble phase so we can indicate a drag is occurring on the body without each individual drag/drop handler needing to know about it
- moved the event handler init/cleanup to the `ui` service
- moved the event handler init call to the application service as it no longer requires auth to have occurred for access to the labs flag setting
- removed the `featureImgDragDrop` labs flag
2021-08-31 14:21:25 +01:00
Peter Zimon
2240daec45 Updated active dropdown UI 2021-08-31 13:52:04 +02:00
Peter Zimon
cea6063715 Added hints to Tier modal
- Added hint to tier description field
- Updated benefit field placeholder
- Added global help link to modal footer
2021-08-31 13:40:13 +02:00
Peter Zimon
86bd70d4c1 Update Stripe subscription status filter grouping
Refs:
https://github.com/TryGhost/Team/issues/1017
2021-08-31 13:05:26 +02:00
Kevin Ansfield
2ded68f845 Updated tests for draft "Saved" indicator
refs e7501ece33

- save status indicator now shows "Draft - Saved" so tests needed to match
2021-08-31 10:11:40 +01:00
Kevin Ansfield
e7501ece33 🎨 Added a "saved" indicator for autosaved draft posts
refs https://github.com/TryGhost/Team/issues/779

For draft posts the editor autosaves after each change but if you didn't see the "Saving..." indicator it wasn't clear what the save status of the post was. The editor will now always show "Saved" when there are no unsaved changes.

- removed indicator from published and scheduled posts because there's no autosave there
- removed the labs flag
2021-08-31 09:57:04 +01:00
Kevin Ansfield
3bc226bef0 Removed @classic decorator from member route
no issue

- there was no need for the decorator as the class is up to date with Octane idioms after swapping `init()` for `constructor()`
- added a comment about the need for `member.get('id')`
2021-08-31 09:37:44 +01:00
renovate[bot]
0a698ec41f Update dependency @tryghost/kg-clean-basic-html to v2.0.4 (#2070)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-31 09:01:23 +01:00
renovate[bot]
db2f91d108 Update dependency @tryghost/kg-parser-plugins to v2.0.4 (#2071)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-08-31 08:33:03 +01:00
Rishabh
3cd092f5fe Fixed member deletion UI getting stuck in certain cases
no issues
refs https://github.com/emberjs/ember.js/issues/5566#issuecomment-429389165

Member deletion UI gets stuck in UI when deleted via these steps: View member list, filtered by label. Click on a member, delete them. Admin transitions back to previous screen before action is completed — deletion completes successfully but deletion UI hangs.

This happens due to a niche ember bug which causes transitions to abort when transitioning to a route with query params having `refreshModel:true`. The fix is simple one liner with return being separated from the route transition statement.
2021-08-30 13:11:44 +05:30
Naz
107ed0e1f3 Added post distribution labels to publish menu
refs https://github.com/TryGhost/Team/issues/947

- With email-only posts there's a new "send" status that deserved it's own publishing action in the post publish menu. With with addition the post ended up having few more publishing states: publish, send, and publish&send. In addition to all this there's a "schedule" option. An addition of the "send" only select option there became a need to persist the "email_only" flag when the option was changed in the publish menu. Such persistance was not done before from the publishing menu and led a whole chain of additional methods being passed down from publishmenu component all the way down to distribution-action-select component
- At this moment only a happy path work properly when selecting one of the publishing options and publishing. More states will need to be handled for scheduled, unblished, etc. states of the post
2021-08-26 23:37:51 +04:00
Naz
9d292fd5a1 Hidden the publish menu when the post was "sent"
refs https://github.com/TryGhost/Team/issues/947

- There is no way to "unpublish" the email-only post that has been sent already. For current alpha version the menu is hidden and up for further development when needed
2021-08-26 23:01:52 +04:00
Rishabh
b5bc870a3b Handled dummy subscription for comped members
refs https://github.com/TryGhost/Team/issues/986#issuecomment-900281186

The tiers features updated the "comped" functionality to no longer create a Stripe Subscription for members. Since theme developers expect comped members will have a subscription, we added a dummy subscription object for comped members in API.

Since Admin previously expected comped members to be ones without any subscription but access to product, this change updates Admin behavior to identify comped subscriptions on a product and show them the same way as before.
2021-08-26 22:06:10 +05:30
Kevin Ansfield
23c6547b5b Fixed missing outline on <GhInputWithSelect> when focused
refs https://github.com/TryGhost/Team/issues/993

- added calls to `onFocus()` and `onBlur()` arguments inside the trigger when the input is focused/blurred so that the active class is correctly applied by ember-power-select
- removed unnecessary mousedown propagation cancellation, it was a copied from `<GhTokenInput>` where extra mouse handling is necessary for buttons inside tokens
- updated `.gh-input-with-select` styles to add the border when active
2021-08-26 17:19:00 +01:00
Sanne de Vries
e926591c34 FIxed dark mode for button groups in editor preview 2021-08-26 17:24:58 +02:00
Sanne de Vries
cb6a7bc179 Fixed dark-mode issues in email CTA card
Refs https://github.com/TryGhost/Team/issues/993
2021-08-26 17:13:21 +02:00
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