Commit Graph

3125 Commits

Author SHA1 Message Date
Sanne de Vries
42c861b90b Fixed regression of 'X' on tags being almost invisible 2021-07-06 12:38:55 +01:00
Sanne de Vries
c79c4d151a Fixed empty members page illustration being cut off 2021-07-06 12:03:25 +01:00
Kevin Ansfield
449f24cffb Removed potentially confusing Ctrl/Cmd+S wording in editor connection error
no issue

- there can be cases where the connection fails but Ctrl/Cmd+S won't work as a direct retry (eg, publish fails so the status reverts, in that case Cmd+S would save a draft rather than re-attempt a publish)
- switched to a neutral "try again" message
2021-07-05 17:15:01 +01:00
Kevin Ansfield
82c518f7c9 🐛 Fixed blank mobile preview for pages in preview modal
no issue

- conditional that is used to disable the email preview for pages was also wrongly used for the mobile preview
2021-07-05 14:21:09 +01:00
Sanne de Vries
1d30153641 Fixed missing border on the tag image uploader 2021-07-05 13:02:32 +01:00
Kevin Ansfield
30abfd9fd2 Improved flickering back button when closing post preview modal
no issue

- transitioning of all properties causes flickering when modals are animated in and out because the DOM elements are duplicated before fading out to account for Ember's component destruction
- applied same property transition list as used for `.gh-btn`
2021-07-05 12:52:07 +01:00
Kevin Ansfield
a30d3471d7 Fixed images in editor resizing when popover sidebar is used
refs https://github.com/TryGhost/Team/issues/840

- added media queries so the image sizing doesn't take the sidebar width into account when it's acting as a popover rather than a sidebar
2021-07-05 12:52:07 +01:00
Rishabh
64819714a7 Added custom segment option to post settings access option
refs https://github.com/TryGhost/Team/issues/822

With multiple products flag we are re-enabling segmentation by product for posts. This change adds new segment option for post access option in post-settings menu, which allows option to choose specific products for post access.

- updates post settings and post settings labs menu to add new option for segment
- handles visibility filter changes for API based on selected segment
- the new behavior is behind the alpha flag for multiple products
2021-07-05 17:14:26 +05:30
Rishabh
71120d6855 Added option to hide default segments for segment select component
refs https://github.com/TryGhost/Team/issues/822

The post access dropdown in the Post settings menu and default access settings should not show the default segments as we only allow segmenting on specific products.
2021-07-05 17:14:26 +05:30
Rishabh
450ad78f61 Added custom segment option for default post access setting
refs https://github.com/TryGhost/Team/issues/803

With multiple products we'll re-enable segmentation by product for posts, which also means need to add a new option to the default post access setting in Membership settings. This change -

- adds new `A segment` option to default post access dropdown behind the alpha flag for multiple products
- shows member segment select dropdown for `A segment` option
- handles update of `defaultContentVisibility` to allow setting custom filter
2021-07-05 17:14:26 +05:30
Rishabh
6feb14b839 Handled visibility filter for posts
refs https://github.com/TryGhost/Team/issues/849

Multiple products alpha feature brings back segmented post access using products. The new visibility filter based on segments is returned in a separate `visibility_filter` property on post/page API
2021-07-05 17:14:26 +05:30
Sanne de Vries
72b2679505 Updated webhook button color 2021-07-05 12:28:29 +01:00
Sanne de Vries
1f7159d80d Updated theme directory install and preview buttons 2021-07-05 12:26:15 +01:00
Sanne de Vries
4b9ccec73d Updated internal tag token style in post settings menu 2021-07-05 12:09:00 +01:00
Sanne de Vries
6b4baee152 Fixed copy issues in settings 2021-07-05 11:45:10 +01:00
Sanne de Vries
7a6f0c0a4e Fixed off spacing for twitter and facebook image delete buttons 2021-07-05 11:41:27 +01:00
Sanne de Vries
e07d1b9705 Fixed header and footer button alignment in editor 2021-07-05 11:17:35 +01:00
Sanne de Vries
db14432f69 Fixed post settings menu dark models 2021-07-03 10:38:12 +01:00
Kevin Ansfield
456bfd3dff Fixed editor tests
refs 3d16b95e0f

- fixed linting errors
- fixed automatic clearing of invalid publish date when PSM is closed
  - previously the PSM was always rendered so it had a `showSettingsMenu` argument that told it whether it was being shown
  - automatic error clearing was tied to `showSettingsMenu` so it was switched to `willDestroyElement` because now the menu is re-rendered each time it's shown
- fixed tests
  - tests assumed the menu was always rendered so they were manipulating inputs even though they weren't visible on screen
2021-07-02 19:57:58 +01:00
Kevin Ansfield
3d16b95e0f 🎨 Adjusted post settings menu design so it can stay open whilst editing
refs https://github.com/TryGhost/Team/issues/840

We wanted to switch to a settings menu that stays open to the right of the editor rather than a popover that blocks all other interaction with the post to solve two use-cases:

1.  when editing it's fairly common to select some text from the post contents when setting excerpt and meta data text, with the previous design not letting you scroll or select whilst the menu got in the way of that
2. having the menu open with meta data visible before publishing can help you see everything is set as you want and help you feel confident when publishing/sending content

---

- removed `psmRedesign` labs flag
- swapped labs component/css for main component and deleted labs component
- cleaned up now-unused `ui.showSettingsMenu` property and related actions/classes
2021-07-02 19:04:57 +01:00
Thibaut Patel
a07b40440d Moved the gated email card feature behing an alpha flag
issue https://github.com/TryGhost/Team/issues/842
2021-07-02 12:14:55 +02:00
Matt Hanley
121bdd6f90 Updated image uploader to accept webp images (#2025) 2021-07-02 09:38:26 +01:00
Thibaut Patel
e50146a83d Released the "reset all passwords" feature (alpha => GA)
issue https://github.com/TryGhost/Admin/pull/1995
2021-07-01 23:09:06 +02:00
Kevin Ansfield
f752e24f7a Added post feature image alt and caption support to editor (#2026)
refs https://github.com/TryGhost/Team/issues/839

The feature image uploader in the post settings menu did not lend itself well to having additional fields so we've moved it into the main editor canvas. This allowed us to use the familiar caption/alt fields from image cards and to let the feature image feel more connected to the post's contents and part of the editing workflow.

---

- removed `featureImageMeta` labs flag
2021-07-01 17:56:39 +01:00
Sanne de Vries
335a78555e Fixed responsive issues with new post settings menu 2021-07-01 13:04:59 +02:00
Kevin Ansfield
b8c01db37f 🎨 Fixed account/dark mode/settings buttons not being accessible on small mobile devices
no issue

- the bottom nav bar sits on top of the side bar which meant you weren't able to scroll down far enough to access the bottom of the side bar
- added extra padding to the side bar when the mobile nav is displayed so bottom settings of the side nav sit above the bottom nav bar
2021-07-01 10:24:18 +01:00
Kevin Ansfield
e21e034f5d 🎨 Hid mobile nav bar when in the editor
no issue

- menu was getting in the way of valuable writing space
- the "More" button didn't work because the main nav bar is hidden in the editor
2021-07-01 10:15:34 +01:00
Kevin Ansfield
14b31ae5a1 Migrated ui service to native class syntax
no issue

- switched to class syntax, tracked properties, getters, and dropped actions object for top-level action functions
2021-07-01 10:11:08 +01:00
Kevin Ansfield
9a64c60dda Migrated <GhApp> to glimmer component
no issue

- switch to Glimmer component, native class syntax, and dropped jQuery usage
2021-07-01 09:51:53 +01:00
Kevin Ansfield
f09af344ed Switched PSM to popover on smaller screens
refs https://github.com/TryGhost/Team/issues/840

- first pass at CSS-only PSM popover behaviour on screens <1024px
2021-07-01 09:30:16 +01:00
Kevin Ansfield
73d4ac8a26 Made server unreachable and maintenance error request retries application-wide
closes https://github.com/TryGhost/Team/issues/837

We previously added automatic retries to the editor controller for post saves; reviewing the resulting logs in Sentry we can see this stopped the "Server unreachable" error alerts showing to users because the requests typically succeeded on the first retry that was made 5 seconds later. However the problem is not limited to post saves and we can see other requests hitting the same issue, including when working in the editor such as adding embed cards, uploading images, or fetching member counts before publishing.

All of the API network requests we make in Admin run through an `ajax` service that makes and handles the request/response. By moving the retry logic for specific errors out of the editor controller and into the ajax service we can make temporary connection handling more graceful across the app.

- move retry behaviour from the editor controller to the `ajax` service so we can retry any request rather than just post save requests
- speed up retries so we reconnect as soon as possible
  - first retry at 500ms, then every 1000ms (previous was every 5s which meant overly long waits)
- reduce total retry time from >30s to 15s
- improve reporting to Sentry
  - report when a retry was required
  - report when a retry failed
  - include the total time taken for both success and failure reports
  - include the `server` header value from requests to distinguish between CDNs
  - include type of error so we can distinguish "server unreachable" from "maintenance" retries
2021-06-30 14:51:40 +01:00
Kevin Ansfield
91ec4435b5 Fixed accidental re-introduction of labs email design settings modal
no issue

- looks like we had an accidental merge of labs files and CSS back in after it was moved out of labs
- fixes odd font sizes in the settings modal
2021-06-30 12:38:43 +01:00
Sanne de Vries
0d01065dcf Refined feature image hover state and spacing 2021-06-30 12:42:48 +02:00
Rishabh
f65bb737c3 Refined product benefits section
refs https://github.com/TryGhost/Team/issues/838

- fixed reordering not saving
- fixed last benefit item not saving without plus
- fixed cancel not removing unsaved benefits
2021-06-30 15:51:34 +05:30
Peter Zimon
5f346fbf6b Fixed currency selector for product settings 2021-06-30 11:32:09 +02:00
Peter Zimon
8b306bcca4 Multiple products settings refinements
- fixed dark mode product card color bug
- fixed no. of benefits counter on product card
- removed "Available in Portal" badge (all products are available)
2021-06-30 11:09:18 +02:00
Peter Zimon
d5d9bb634d Refined link builder for multiple products 2021-06-30 10:29:29 +02:00
Rishabh
42691c5cc9 Added multiple product option to Portal links
refs https://github.com/TryGhost/Team/issues/825

With multiple products, it's possible to link to any products from themes.

- updates links area in Portal to be able to handle multiple products
- the new product selector for links is behind the alpha flag
2021-06-30 13:18:40 +05:30
Daniel Lockyer
1bfee18cbe Merged v4.8.4 into main
v4.8.4
2021-06-29 18:07:38 +01:00
Kevin Ansfield
84d3643e9f 🐛 Fixed error when removing Facebook/Twitter social images on general settings screen
refs https://github.com/TryGhost/Team/issues/836
refs ceb16b5e9f

Problem:
- `<GhImageUploaderWithPreview>` was updated to swap deprecated `{{action}}` usage to `{{on "click"}}` but that came with a missed behaviour change because the click event will now be passed as the argument to `@remove`
- the `<GhImageUploaderWithPreview>` usage on the general settings screen for social images had a syntax error in it's usage of the `mut` helper that meant the supplied argument was being used as the value rather than a forced `""` value. Result was that we were replacing the image urls with a text representation of the click event when attempting to remove images, leaving a broken image in place and no way to upload a new image

Fix:
- fixed incorrect `mut` usage to correctly force `""` as the value when removing social icons
- updated `<GhImageUploaderWithPreview>` to force `""` as the argument passed to `@remove` to avoid any other issues due to the behaviour change
2021-06-29 17:54:09 +01:00
Rishabh
cef44533d9 Moved portal_products in preview behind feature flag
no refs

- only uses `portalProducts` value in portal preview url if the multiple products flag is turned on
2021-06-29 12:19:20 +05:30
Kevin Ansfield
917c86db3b Changed mailgun API key wording to explicitly state "Private API key"
no issue

- Mailgun now also provides per-domain Sending API Keys which has caused some confusion because they will allow sending emails but won't allow for analytics to be fetched unlike the Private API Key
2021-06-28 17:26:32 +01:00
Kevin Ansfield
6f0955d232 Fixed validation errors not showing after failed save in editor
refs a6c6def7e1

- we weren't checking if an error was a validation error by examining the number of errors on the post model, this meant we weren't falling through to the generic error handling/display logic that shows an alert for validation errors when a save isn't a background/silent save
2021-06-28 15:52:36 +01:00
Kevin Ansfield
766de0d475 Added automatic retry of failed editor saves when Ghost is in maintenance mode
no issue

- when Ghost is in maintenance mode after an upgrade we know it will come back shortly so automatically retrying the save in the same way we do for "server unreachable" errors provides a smoother experience compared to halting and showing a red alert bar
2021-06-28 15:33:40 +01:00
Kevin Ansfield
53dbbf33a5 Fixed confusing editor state after a failed status change
no issue

- post status was not being reset after certain types of failure to publish/unpublish/schedule which meant that the editor could be left in an odd in-between state where the displayed status did not reflect reality
- fixed "saving/publish/schedule failed:" wording in error message when a server unreachable error was detected, the "saving/publish/schedule" did not reflect the actual status change because we were passing through only the current status rather than previous+new status'
2021-06-28 15:29:07 +01:00
Kevin Ansfield
a6c6def7e1 Fixed "Saving failed: undefined" error message in editor
no issue

- if a ServerUnreachable error is triggered by a non-background-save then we'd show the expected custom alert and then immediately overwrite it because `savePost`'s catch was not expecting an `undefined` error
2021-06-28 15:29:07 +01:00
Sanne de Vries
9105afe97c Fixed publish-menu position when settings menu is open 2021-06-28 16:27:58 +02:00
Rishabh
59367d418b Added option to hide labels for post acces
refs https://github.com/TryGhost/Team/issues/800

- makes labels option in members segment select
- hides label options in segment select for post access
2021-06-28 17:46:24 +05:30
Rishabh
c97be22854 Added segmented post access setting to labs menu
refs https://github.com/TryGhost/Team/issues/801

- adds the renewed product specific post access setting to new labs post settings sidebar
2021-06-28 17:46:24 +05:30
Rishabh
f9a25d4e41 Enabled product options for email recipient segment
refs https://github.com/TryGhost/Team/issues/801
refs 0caa539330

- adds back product options to email recipient segment filter in publish menu
2021-06-28 17:46:24 +05:30