Commit Graph

2264 Commits

Author SHA1 Message Date
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