Commit Graph

2324 Commits

Author SHA1 Message Date
Sanne de Vries
2941065eb7 Added back button to completed publishing flow
No ref
2022-05-19 13:39:40 +02:00
Kevin Ansfield
b03aa5f255 Added reverse animation to publish/preview modal contents when closing modal
refs 2fb62708a8

- use modal's own `.epm-out` class that's added when closing to trigger the reverse of the fade-in animation
- added `.publish-modal` class to the three publish modals so we can alter the default modal animations/timing if required
2022-05-19 12:19:55 +01:00
Kevin Ansfield
08aa2d91ba Skipped publish flow modal animations when swapping between publish/preview
no issue

- updated the publish/preview toggle action to pass a `skipAnimation` data attribute to the modals when opening if they are being swapped rather than initially opened
2022-05-19 12:02:23 +01:00
Djordje Vlaisavljevic
5d0e3d2536 Fixed icon color in dark mode 2022-05-19 13:01:26 +02:00
Kevin Ansfield
dce531cf1c Standardized on "subscriber" for default & multiple newsletters in publish flow
no issue

- "subscriber" makes more sense than "member" in the default-only newsletter state because members still need to be subscribed to the default newsletter
- removed all subscriber/member conditionals and cleaned up template logic where possible
2022-05-19 11:37:01 +01:00
Sanne de Vries
2fb62708a8 Added fade-in effect when opening publish and preview modals in editor
No ref
2022-05-19 11:58:51 +02:00
Simon Backx
f9cd8b1f66 Removed zero tiers from paid mix charts (unless all zero)
no issue

When the last tier in the paid mix chart is zero, the border radius is broken.
2022-05-19 11:41:54 +02:00
Kevin Ansfield
0549ffd4b5 Removed unused component argument with typo
no issue

- spotted the typo and thought there was a bug somewhere but post count isn't used in the complete-with-email-error state of the publish flow
2022-05-19 10:25:05 +01:00
Sanne de Vries
e09f41716b Fixed subscriber count not showing for scheduled email-only posts
No ref
2022-05-19 11:23:50 +02:00
Sanne de Vries
df15dcb8d5 Added confirmation message to email-only post being sent
No ref
2022-05-19 10:54:44 +02:00
Sanne de Vries
8468994014 Added spinner icon to running publish button
No ref
2022-05-18 20:48:36 +02:00
Sanne de Vries
2835d0a6a4 Fixed publish button pulsating when running
No ref
2022-05-18 20:32:10 +02:00
Kevin Ansfield
473831ac2b Added image fallback and site icon/title to <GhPostBookmark> (#2401)
no issue

- adds `{{get-setting "key"}}` helper to make settings available in templates without needing a backing class
- updated `<GhPostBookmark>` component
  - if post feature image isn't present, fall back to site cover image
  - add site icon (if present) and title to the details line
  - removed author image

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2022-05-18 19:05:27 +01:00
Kevin Ansfield
f2b9fa544f Fixed published post count shown on publish complete step
no issue

- API query was using `?status=published` instead of `?filter=status:published` so was counting all posts rather than just published ones
2022-05-18 18:01:28 +01:00
Simon Backx
fdece55480 Added auto save to newsletters toggle
refs https://github.com/TryGhost/Team/issues/1639

- When enabling/disabling newsletters, the change is saved automatically
2022-05-18 17:26:03 +02:00
Rishabh Garg
1dc3026aba Fixed subscribe count on adding new newsletter (#2402)
refs https://github.com/TryGhost/Team/issues/1634

- member count on newsletter may not be immediately updated on saving newsletter
- api returns `opted_in_member_count` in response to adding newsletter which admin cannot use atm
- re-fetches newsletters on save so all newsletters get updated member and post counts
2022-05-18 20:44:42 +05:30
Simon Backx
857a8e5ae0 Added tests for unsaved newsletter changes
refs https://github.com/TryGhost/Team/issues/1477
2022-05-18 15:57:02 +02:00
Sanne de Vries
02a3f4d784 Changed running and success copy for publish button when scheduled
No ref
2022-05-18 15:14:43 +02:00
Simon Backx
d87aef7e0a Removed some multipleNewslettersUI feature checks 2022-05-18 15:00:29 +02:00
Kevin Ansfield
6c960704b9 Hid total member counts in newsletter selection for authors/editors
no issue

- authors/editors don't yet have a way to fetch member counts for specific filters so the final member count is hidden in the publish options text, however we were still showing the total subscribed members for each newsletter in the dropdown which could lead to incorrect assumptions for how many members would receive the newsletter
2022-05-18 13:58:25 +01:00
Simon Backx
59a1b8a31f Added tests for editing newsletters
refs https://github.com/TryGhost/Team/issues/1477

- Added default test fixture
- Added tests for validation of newsletter when editing
- Added tests for opening and closing tabs
2022-05-18 13:14:38 +02:00
Kevin Ansfield
a6dcd936bc Hooked up "revert to draft" button on complete step after scheduling
refs a19d5c7df3

- added handling of the `afterTask` return value provided when closing the publish flow modal via the revert-to-draft button
2022-05-18 10:49:08 +01:00
Kevin Ansfield
ea98469e6e Cleaned up improvedOnboarding labs flag
no issue

- the feature has been GA for a while now so the conditionals are no longer required
2022-05-18 10:13:06 +01:00
Kevin Ansfield
07fde0ee48 Fixed double capitalisation in publish options recipients text
refs 89f089e439

- if "Free" or "Paid" had already been output we were still capitalising "Subscribers" ending up with "Free Subscribers" instead of "Free subscribers"
- adjusted the capitalisation conditionals so we don't capitalize "subscriber(s)" if we've already output the recipient type
2022-05-18 10:00:18 +01:00
Kevin Ansfield
89f089e439 Fixed incorrect member count and capitalisation in publish options for editors/authors
no issue

- `{{format-number}}` was showing "0" when passed in an empty/nullish string when it should have been showing nothing
- used `{{if-empty}}` to fix capitalisation when the member count is missing
  - previously attempted a CSS-only fix with `:first-letter` and `text-transform: uppercase` but that broke the layout in Safari
2022-05-18 09:42:44 +01:00
Djordje Vlaisavljevic
a19d5c7df3 Added static unschedule-and-revert button 2022-05-17 17:49:13 +02:00
Djordje Vlaisavljevic
a021553203 Updated button label logic to match different states 2022-05-17 17:49:13 +02:00
James Morris
bcef562206 Moved all the dropdowns to be right aligned on the new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-17 15:04:55 +01:00
James Morris
b2a6c01cdf Working out the Safari layout issue when changing dropdowns on new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-17 14:44:19 +01:00
Peter Zimon
980f45719d Fixed sent email preview alignment bug 2022-05-17 15:20:58 +02:00
James Morris
1d25f6d494 Added in additional check for avatar which will depend on where the data source comes from
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-17 11:18:44 +01:00
Peter Zimon
da9a2c6b8a Added curve to line charts 2022-05-17 11:45:18 +02:00
Peter Zimon
a9da3b13fc Updated anchor chart background color 2022-05-17 11:41:11 +02:00
Simon Backx
8502ebb96a Moving over the new Dashboard to replace the old (#2389)
refs: https://github.com/TryGhost/Team/issues/1631

Co-authored-by: James Morris <moreofmorris@users.noreply.github.com>
2022-05-17 09:34:34 +02:00
Rishabh Garg
8b5b3aa734 Updated usage of the Tiers API (#2388)
refs https://github.com/TryGhost/Team/issues/1575

- Update usage of Tier to read monthly & yearly price & currency from top level
- Updated usage of Tier to read benefit name from benefits[n], not from benefits[n].name

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2022-05-16 19:51:49 +01:00
Kevin Ansfield
77484210ee Cleaned up old publish menu code
no issue

- the new publishing flow is GA making the old publish menu unused
- removed all related code
2022-05-16 18:07:53 +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
Sanne de Vries
5a6066d064 Fixed publishing flow responsive issues
No ref
2022-05-16 16:13:24 +02:00
Kevin Ansfield
3b088cbd77 Removed usage of old publish menu for contributors
no issue

- updated `<PublishManagement>` and sub-components to handle contributors by replacing publish button with save button in main view and in preview
- removed feature flag gating and usage of `<GhPublishmenu>` in editor template
- updated tests that indirectly used the old publish menu so they work with the new design/behaviour
- skipped editor tests that used the old publish menu
2022-05-16 14:18:04 +01:00
Sanne de Vries
025fe3e6ae Fixed editor dark-mode issues
No ref
2022-05-16 13:50:58 +02:00
Kevin Ansfield
5415fb6e01 Updated post email preview to render with the selected newsletter (#2382)
refs https://github.com/TryGhost/Team/issues/1621
reqs https://github.com/TryGhost/Ghost/pull/14820

We want to allow previewing emails based on the newsletter selected in the publish flow.

- passed the selected newsletter from `<PublishManagement>` through to the preview modal then through to the email preview component
- removed tracked `newsletter` property and fetching of the default newsletter in the email preview component that was in place to allow `senderName` and `senderEmail` to be used in the component
- added `newsletter` getter that uses the `post.newsletter` or the passed in selected newsletter
- updated the email preview fetching to pass `?newsletter=slug` so the email is rendered with the correct newlsetter
2022-05-16 12:16:12 +01:00
Kevin Ansfield
de2d3977ed Fixed Cmd+P shortcut not toggling preview in new publish flow
no issue

- removed "cmd+p" shortcut from the main editor element
- added "cmd+p" shortcut to `<PublishManagement>`
  - toggles the preview modal on/off
  - closes the publish modal if it's open when switching to the preview modal so we don't end up with both modals open simultaneously
- fixed "Preview" button not showing up for contributors
  - this still uses the old preview modal for now
  - contributor preview/save should be handled inside the new publish flow later on
2022-05-16 09:39:33 +01:00
Simon Backx
3a11faf0b6 Updated publishing with renamed newsletter and email_segment options (#2380)
refs https://github.com/TryGhost/Team/issues/1596

This commit updates admin to align with the changes in the backend in https://github.com/TryGhost/Ghost/pull/14798

- `post.email_recipient_filter` option and property is renamed to `email_segment`
- `newsletter_id` option is renamed to `newsletter` (and now uses slug instead of id)
- Sending a post via email, means you need to set the `newsletter` option. The `email_segment` option is optional now and defaults to `all`. Not setting `newsletter` means not sending an email, setting `email_segment` is ignored if `newsletter` is missing.
- We can no longer use `email_recipient_filter` (now renamed to `email_segment`) to know whether a post is published/scheduled to be sent as an email. We need to rely on the newsletter relation now. The `email_segment` `none` value has been dropped and will be `all` even if no email will be sent (newsletter will be null). 
- `sendEmailWhenPublished` option is no longer supported in the backend.
2022-05-16 10:18:46 +02:00
Sanne de Vries
3e8c5403b6 Updated error message for published post with failed email sending
Refs https://github.com/TryGhost/Team/issues/1587
2022-05-16 10:09:42 +02:00
Kevin Ansfield
150f4fda2d Remember post preview tab when switching between preview/publish
refs https://github.com/TryGhost/Team/issues/1621

- added `currentTab` and `changeTab()` data arguments to preview modal allowing for the current tab to be remembered across opens in the `<PublishManagement>` component that controls open/close of the preview modal
2022-05-13 17:43:34 +01:00
Sanne de Vries
d3e188fb3a Updated email and social post previews
Refs https://github.com/TryGhost/Team/issues/1621
2022-05-13 15:36:56 +01:00
James Morris
201fbdfc9b Removed some unnecessary checks for Paid Mix
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-13 15:17:31 +01:00
Sanne de Vries
52cfae0522 Updated browser and mobile post previews
Refs https://github.com/TryGhost/Team/issues/1621
2022-05-13 14:19:22 +01:00
Peter Zimon
0e9ac4b97d Paid mix chart alignment fix 2022-05-13 12:26:17 +02:00
Sanne de Vries
fef8e59050 Formatted post and member counts in newsletter settings and publishing flow
No ref
2022-05-13 10:27:01 +01:00
Peter Zimon
3ba3e34ab4 Minor dashboard UI refinements 2022-05-13 11:05:02 +02:00
James Morris
dcd6eba15b Fixing linter error 2022-05-12 18:12:14 +01:00
James Morris
d2f356e2a4 Attempting to fix the Paid Mix empty state for Tiers
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-12 18:05:20 +01:00
Sanne de Vries
f4df91aee7 Updated publishing flow
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 16:03:40 +01:00
Rishabh
704310ba20 Updated tier price to use boolean for active 2022-05-12 20:21:46 +05:30
Kevin Ansfield
dd3d84a8a5 Added separate "published but email failed" state to publish flow
refs https://github.com/TryGhost/Team/issues/1587

- if post creation succeeds but the email fails to send we want to show a separate state of the publish flow rather than adding an error to the confirm step
  - confirm _has_ completed so showing the error there doesn't make sense and causes confusing copy
- added check for email failure to the `<PublishFlow>` save task (which is called by the confirm step) to intercept any email failure errors and switch state
2022-05-12 15:28:35 +01:00
Sanne de Vries
4795343cdb Updated newsletter count in newsletter selection dropdown
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 15:03:17 +01:00
James Morris
f564943aa9 Fixed up the full width bar and other bugs with Paid Mix for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-12 14:58:02 +01:00
Hannah Wolfe
47d6c17135 Settings cleanup (#2377)
refs: https://github.com/TryGhost/Toolbox/issues/327
requires: TryGhost/Ghost#14791

- lang / locale has had a lot of churn, but we decided this setting should always be locale
- Removed test relating to unused editor_is_launch_complete setting 

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-12 14:53:18 +01:00
Sanne de Vries
8932ba9b1a Added dropdown label for specific recipient selection in publish settings
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 14:49:07 +01:00
Sanne de Vries
07628be22b Fixed alignment of preview modes in editor
Refs https://github.com/TryGhost/Team/issues/1621
2022-05-12 14:43:21 +01:00
James Morris
a6b4dbc353 Added in min and max values to the Paid Mix chart to maintain width
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-12 14:36:04 +01:00
Sanne de Vries
6f498035ea Updated post preview navigation
Refs https://github.com/TryGhost/Team/issues/1621
2022-05-12 14:27:06 +01:00
Kevin Ansfield
f137aaea5c Added auto-reset of time input if invalid time was entered
no issue

- it was possible to enter invalid times when scheduling in the publish flow, in which case the underlying schedule date was not updated but the input still showed the invalid time
- added passthrough of the blur event in `<GhDateTimePicker>` to the `setTime` action so we have access to the input field, then updated the `setTime` action to set the time input value back to the currently set schedule time when an invalid time is entered so the UI matches the actually set value
2022-05-12 14:23:56 +01:00
James Morris
34a45d99a2 Added in better empty states for Paid Mix for Candence and Tiers
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-12 14:10:22 +01:00
Sanne de Vries
288ba328d7 Updated navigation between editor, publish, preview and update states
Refs https://github.com/TryGhost/Team/issues/1621
2022-05-12 14:03:21 +01:00
Peter Zimon
4b596e47c5 Improved neutral trend indicator on Dashboard metrics 2022-05-12 14:40:54 +02:00
Peter Zimon
9a384857fd Updated bar thickness of Paid mix chart 2022-05-12 14:33:28 +02:00
Sanne de Vries
eafd2f901e Updated publishing flow email recipient filters
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 13:30:14 +01:00
Kevin Ansfield
2e6b219030 Fixed recipient select becoming disabled when all filters are turned off
no issue

- `publishOptions.willEmail` doesn't work for the conditional because it will be false when no email will be sent, which is the case when a recipient filter is the equivalent of "none"
- switched to being conditional on the publish type and added a separate "Not sent to any members" conditional for `recipientFilter` being blank so we're not showing an incorrect count of members
2022-05-12 13:21:57 +01:00
Peter Zimon
f3e35bb164 Fixed chart re-rendering bug 2022-05-12 14:04:29 +02:00
Sanne de Vries
f6b06ef9bf Updated email recipient filter design
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 12:56:43 +01:00
Peter Zimon
527b07b490 Fixed Paid mix padding 2022-05-12 13:33:05 +02:00
Peter Zimon
8a3a5dd217 Minichart refinements 2022-05-12 13:20:48 +02:00
Kevin Ansfield
dd551acf91 Fixed schedule time changing after setting if local and site tz don't match
closes https://github.com/TryGhost/Team/issues/1622

- we were setting selected hour/minute on a supposedly site-timezone date before converting to UTC but we were using a local timezone date instead meaning the conversion to UTC didn't match resulting in the time being altered incorrectly after the time input loses focus
2022-05-12 12:13:06 +01:00
Sanne de Vries
513c8655e4 Updated error and info boxes in publishing flow
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 11:47:49 +01:00
Kevin Ansfield
cc8dd9dedf Added newsletter name to publish update flow copy
no issue

- show the newsletter a post was/will be sent to if there's more than just the default newsletter or the newsletter that was emailed is now archived
2022-05-12 11:44:10 +01:00
Djordje Vlaisavljevic
1349a03164 Updated modal title
refs https://github.com/TryGhost/Team/issues/1583
2022-05-12 12:16:12 +02:00
Sanne de Vries
af55c71a9e Updated publishing flow copy
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 11:14:45 +01:00
Kevin Ansfield
cf8b372fed Added fullscreen preview with toggle to publish flow
refs https://github.com/TryGhost/Team/issues/1621

- copied existing preview modal over to `editor-labs/modals` directory
  - old modal will be deleted in cleanup
- moved "Preview" button from editor template to the `<PublishManagement>` component
  - allows for preview modal to be controlled alongside the publish flow modal
- added `togglePreviewPublish()` action to `<PublishManagement>`
  - opens whichever of preview/publish is not currently open, this opens the new modal on top of the old modal
  - waits for the modal animation duration to pass then closes the modal that's now underneath, this prevents the flashing that occurs when modals are both opening and closing at the same time because that results in a 50% opacity of both modals during the middle of the animation
- updated preview modal and publish-flow modals to have "Publish" and "Preview" buttons respectively that call the `togglePreviewPublish` action
- updated preview modal to be fullscreen to better match the publish modal
2022-05-11 23:46:01 +01:00
Kevin Ansfield
b285205c53 Removed old publish menu from preview modal
refs https://github.com/TryGhost/Team/issues/1621

- the old publish menu will be fully deleted soon
- removing it from the preview modal is the minimal "fix" for interoperability with the new publish flow
- pre-cursor to tighter preview/publish modal integration
2022-05-11 21:14:22 +01:00
Kevin Ansfield
6c079daafa Improved handling of missing member counts in publish flow
no issue

Only Admins/Owners can browse members to get member counts but Editors/Authors are allowed to send email. This means we need to account for the count figures being missing.

- added guard to the total member count fetch in `PublishOptions`
  - guard needed because the failed API request would abort setup
  - when the current user isn't an admin, set the total member count to 1 to avoid email options being disabled
- added guard in the `{{members-count-fetcher}}` resource so we're not triggering API errors and the count is kept as `null` so it's handled automatically if passed to `{{gh-pluralize}}`
- updated `<GhMembersRecipientSelect>` to not show counts (or the surrounding `()`) when the count is `null`
2022-05-11 18:56:29 +01:00
Peter Zimon
02ccf5fe1a Added rounded corners to Paid mix 2022-05-11 19:52:32 +02:00
Peter Zimon
260d516ad5 Paid breakdown chart cleanup 2022-05-11 19:52:32 +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
e852c29699 Extracted PublishOptions class into separate file
no issue

- `PublishOptions` was exported from the `<EditorLabs::PublishManagement>` component as a convenience when development started but both have now grown in size and are easier to read as separate files
2022-05-11 17:51:53 +01:00
Kevin Ansfield
bea1ffe665 Updated copy for recipients option when post has already been emailed
refs https://github.com/TryGhost/Team/issues/1605

- added number and type of members/subscribers the post has been sent to
2022-05-11 17:45:22 +01:00
Sanne de Vries
221d520d11 Updated copy for published and scheduled posts
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-11 17:09:22 +01:00
Kevin Ansfield
1c2ae5348d Fixed forced-error for email limit
refs f559170a39

- hangover from testing
2022-05-11 17:02:23 +01:00
Kevin Ansfield
f559170a39 Added email limit checks and email disabled messaging to publish flow
closes https://github.com/TryGhost/Team/issues/1584
refs https://github.com/TryGhost/Team/issues/1605

- added email limit check to PublishOptions setup
- moved email disabled messaging from the email recipients option to the publish type option
  - it was confusing to have the email publish type options disabled without any indication of why, with the message hidden within the closed email recipients option
2022-05-11 17:00:30 +01:00
Peter Zimon
bb2b8fae27 Fixed gridlines density on dashboard 2022-05-11 17:57:39 +02:00
James Morris
dc8a431e45 Fixed up the empty list states if something fails for What's New or Staff Picks
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 16:51:11 +01:00
Peter Zimon
a926b8fb39 Added rounded corner to Paid breakdown chart 2022-05-11 17:49:48 +02:00
James Morris
54e9c63a7f Adjusting the dropdown so it fits flush against the top header better
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 16:08:18 +01:00
James Morris
cd9ec81006 Trying out moving the date dropdown
no issue

- seeing if this feels better up above than it is when inside the anchor
2022-05-11 16:08:18 +01:00
Sanne de Vries
dc14b9943f Updated publishing flow copy
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-11 16:04:42 +01:00
James Morris
7e7c1e4bf5 Removed the unnecessary component code for the Community module in new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 15:48:55 +01:00
Simon Backx
f6259f1f63 Moved dashboard control panel to developer experiments 2022-05-11 16:29:58 +02:00
James Morris
07b3f26e08 Fixed z-indexing that messed with some dropdowns and fixed the extra long widths on others
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 14:32:55 +01:00
Kevin Ansfield
37aec66e83 Fixed linter error 2022-05-11 12:56:19 +01:00