Commit Graph

3296 Commits

Author SHA1 Message Date
Rishabh
4a5d8d07dc Fixed incorrect order param comparison in force reload
refs ffe0f84700 (diff-c3579ffd0159c4bd6d54ac943074cb5f5fa40ea6c814f85f2e90aee694d77c2dR266)

The `forceReload` option to bypass the stale data if params change was incorrectly comparing order param changes due to a typo in variable used to store last order param changes.
2021-08-05 12:27:10 +05:30
Rishabh
548e8db090 Fixed created_at filter not applied on members list query
refs e25e36352d

Since the concat method does not change the existing array but instead returns a new array, the extra filters on the API query object were not being applied. The extra filter included filtering on `created_at` date for members which was not applied as the filter was not stored in the array correctly.
2021-08-05 12:27:10 +05:30
Naz
3cd1c56d4e Added email only checkbox to PSM
closes https://github.com/TryGhost/Team/issues/896

- Having this checkbox allows user to control posts email_only flag
- Also sets the post automatically to "public" when the email-only toggle is switched on as the access would be controlled form within email and not through the internal gatekeeping mechanism
2021-08-04 17:13:52 +04:00
Sanne de Vries
03d46ed67e Fixed chevron character in meta-data preview in post settings 2021-08-04 14:40:45 +02:00
Rishabh
5a8bb31cc6 Moved members list filtering via url param behind alpha flag
refs https://github.com/TryGhost/Team/issues/942

The `filter` param on members list is only supposed to work if the alpha for filtering is switched on
2021-08-04 17:00:55 +05:30
Rishabh
b07efb7dc6 Removed empty filter param on members list
no refs

- removes empty filter param from url to avoid showing empty params on url
2021-08-04 17:00:55 +05:30
Rishabh
1492527b3e Added basic add/delete action on filter UI
refs https://github.com/TryGhost/Team/issues/943

Adds basic add/delete button action on dynamic filter UI to create custom filter blocks
2021-08-04 15:53:06 +05:30
Rishabh
9ee66f8b85 Added filtering on members list via URL param
refs https://github.com/TryGhost/Team/issues/942

- adds `?filter` param to members list page which allows directly filtering list via NQL filter syntax
2021-08-04 15:53:06 +05:30
Kevin Ansfield
cf6ef942a5 Added dashboardTwo labs flag
no issue

- added `dashboardTwo` feature flag and labs screen toggle
- added `dashboard-labs` route with duplicated dashboard controller/template
- added redirect to `dashboard` route so it transitions to `dashboard-labs` when the feature is enabled
2021-08-04 11:22:19 +01:00
Sanne de Vries
6dc901993c Updated email CTA card
Refs https://github.com/TryGhost/Team/issues/928
- Added icons for top and bottom border
- Updated spacing for hr element when not in edit mode
- Got rid of hr element when in edit mode
- Got rid of left border for email, html and markdown cards and feature image
2021-08-03 18:21:54 +02:00
Kevin Ansfield
d3d186664f Added button alignment selection to email-cta card
refs https://github.com/TryGhost/Team/issues/928

- added btn group for selecting left/center alignment of CTA button
- updated rendered view to center the button when center alignment is selected
2021-08-02 15:01:15 +01:00
Naz
55785d0958 Added toggle for the emailOnlyPosts flag
closes https://github.com/TryGhost/Team/issues/902

- Toggle will control the `emailOnlyPosts` labs flag enabling "email-only posts" feature
2021-08-02 13:32:03 +04:00
Kevin Ansfield
45d4036faf Fixed incorrect text color for accent-color backgrounds for some accent colors
refs https://github.com/TryGhost/Team/issues/928

- text color was being selected based on original rather than adjusted accent color
2021-07-29 15:41:36 +01:00
Kevin Ansfield
503845ce59 Fixed incorrect darkening of email-cta button on hover with some colours
refs https://github.com/TryGhost/Team/issues/928

- the background color of the button was incorrectly applied to the original accent colour rather than the adjusted accent color
- added adjustment of text color on hover too in case it went outside of a visible range
2021-07-29 15:11:17 +01:00
Kevin Ansfield
0d092c2e32 Switched to extracted @tryghost/color-utils package
refs https://github.com/TryGhost/Team/issues/928

- we want to make use of the same color adjustments and contrast selection for accent colors we use in Admin on the server-side for emails so utility functions have been extracted to an external package
2021-07-29 11:35:15 +01:00
Naz
ac814f32f3 Fixed typo 2021-07-29 13:53:52 +04:00
Kevin Ansfield
3c3b3e6710 Fixed infinite loop when lightening/darkening colors
refs https://github.com/TryGhost/Team/issues/928
refs eed299d1f6

- usage of `color` was incorrect resulting in an infinite loop because the color was not being changed on each iteration
  - `Color().lightness()` adjusts via percentage not exact number
  - `Color().l()` does not return lightness
2021-07-28 19:10:26 +01:00
Kevin Ansfield
eed299d1f6 Matched Portal's contrast threshold for white/black text on background color
refs https://github.com/TryGhost/Team/issues/928

- switched to using `color` for color conversion and adjustments rather than maintaining our own limited utils (preparation to extract our own utils to separate library)
- changed contrast threshold for yiq-based contrast adjustment from `128` to `186` to match Portal's current behaviour
2021-07-28 17:14:33 +01:00
Sanne de Vries
ff33128be5 Updated email CTA card in editor 2021-07-28 13:25:26 +02:00
Naz
c9e29d6e9e Displed special modal header for disabled email limit
closes https://github.com/TryGhost/Team/issues/915
refs https://github.com/TryGhost/Admin/commit/a7bb783d3

- When the disabled email limit is returned we want to have a special header along with the modal copy
2021-07-28 14:47:16 +04:00
Naz
2c52fab9ae Fixed limit error parsing when there are no details
refs https://github.com/TryGhost/Team/issues/913

- Some limit errors don't contain a "details" property, in those cases the code should still execute instead of throwing an errors!
2021-07-28 14:27:03 +04:00
Kevin Ansfield
a6f88746e6 Fixed email-cta button text not being selectable in Firefox
refs https://github.com/TryGhost/Team/issues/928

- the `.gh-btn` styling has `user-select: none` which was preventing Firefox from allowing selection using the mouse
2021-07-28 09:51:20 +01:00
Kevin Ansfield
e02e921b22 Fixed email tab not working in preview modal
no issue

- added missing service injection
2021-07-27 16:46:02 +01:00
Kevin Ansfield
23a1f63d24 Added free/paid toggle to email preview modal
refs https://github.com/TryGhost/Team/issues/927

- the `email-cta` card can be segmented so only free or paid members can see the content, it should be possible for authors to preview what that will look like in either case
2021-07-27 16:31:56 +01:00
Naz
a7bb783d33 Added special error modal copy on email freeze
closes https://github.com/TryGhost/Team/issues/913

- When an error is returned from the server during a CSV import and it's because of the email freeze the import modal error has to show a special header along with error message
2021-07-27 16:19:38 +04:00
Kevin Ansfield
35ac6abd6a Added CTA button display when not in edit mode
refs https://github.com/TryGhost/Team/issues/927

- button should be visible when not editing if both text and url are set
- added container for the content section so other links aren't clickable
- added tooltip to button so button url can be checked without having to go into edit mode
2021-07-26 21:17:10 +01:00
Kevin Ansfield
01538d5916 Fixed linter error (errant console.log) 2021-07-26 17:09:04 +01:00
Kevin Ansfield
4e0473a93e Added CTA button and URL input to email-cta card
refs https://github.com/TryGhost/Team/issues/927

- added CTA `button and url inputs to email-cta card
- added `textColorForBackgroundColor` color util and used it to add a white/black text color variable that can be used when the accent color is used as a background color
- added `{{hex-adjust}}` helper for modifying lightness and saturation of a hex color
- adjusted inline power-select dropdown styling
2021-07-26 17:03:17 +01:00
Kevin Ansfield
9cfb024a5f Moved adjusted accent color properties to ui service
refs https://github.com/TryGhost/Team/issues/927

- we'll soon need access to adjusted accent colours outside of the application controller so they're now available on the `ui` service
2021-07-26 17:03:17 +01:00
Sanne de Vries
bea787f1e9 Added tooltip with last-updated timestamp on hovering "X days ago" in post list 2021-07-26 15:41:27 +02:00
Sanne de Vries
957fb823b1 Fixed dark mode issues in editor
- Updated settings menu background
- Updated word count indicator background
- Updated feature image and unsplash buttons
2021-07-23 21:33:54 +02:00
Naz
75f0589fab Added toggle for the email check flag
refs https://github.com/TryGhost/Team/issues/912

- The toggle is needed to experiment with email verification
2021-07-23 20:00:27 +04:00
Peter Zimon
5255489779 Added static members filtering
- added filter builder dropdown (alpha)
- refactored related CSS
2021-07-23 16:05:22 +02:00
John O'Nolan
039803b29d Updated dashboard content and news 2021-07-22 16:17:17 -04:00
Peter Zimon
d356f5451a Added static result table for members filtering
- Added horizontal scrolling, fullscreen table component.
- Mocked multiple columns in the members result list.

Alpha feature.
2021-07-22 15:47:01 +02:00
Kevin Ansfield
5b09cd5bef Added segment selection to email-cta card
refs https://github.com/TryGhost/Team/issues/926

- updated `<KoenigEditor>` so it creates default card payloads as TrackedObject instances so that getters in glimmer component based cards can track changes to payload properties
- added dropdown free/paid selector to email-cta card that sets the `segment` payload property to the respective filter
- updated design to show the footer outside of edit mode too so that the selected segment is always visible
2021-07-21 18:39:33 +01:00
Rishabh
ad3126b632 Added alpha feature flag for members filtering feature
refs https://github.com/TryGhost/Team/issues/925
2021-07-21 21:21:50 +05:30
Kevin Ansfield
019a1cf41d 🐛 Fixed publication icon in nav bar sometimes appearing inverted in dark mode
no issue

- `iconClass` was set to `gh-nav-logo-default` when first loading admin with the default icon
- when a new icon was uploaded the background style was changed but the class wasn't reset so continued to appear inverted
2021-07-21 11:40:55 +01:00
Thibaut Patel
a7f47b30b7 Added a feature flag to the oauth login feature
issue https://github.com/TryGhost/Team/issues/614

- Makes the feature confiration more similar to other feature flags
2021-07-20 23:18:45 +02:00
Sanne de Vries
6e540cf2ef Changed drag&drop indicator color 2021-07-20 11:30:10 +02:00
Kevin Ansfield
d6a01147cc Updated labs description of emailCardSegments feature
refs https://github.com/TryGhost/Team/issues/910

- segmented email content will be used for a new "Email-only CTA" card
- updated labs checkbox text to reflect what's actually being turned on/off
2021-07-20 10:09:50 +01:00
Peter Zimon
a6ba245bcd Updated copy for tiers
- Updated copy of multiple products to "Tiers"
2021-07-19 12:39:59 +02:00
Rishabh
95c3759282 Removed focus out error handling for invite staff modal
refs https://github.com/TryGhost/Team/issues/732

This fix is part of the broader design change we want in Admin, moving away from showing errors on focus out in fields with feels a little aggressive and instead change it to the default behaviour of showing errors when submitting the form. This change updates this behaviour for invite staff modal.
2021-07-19 14:02:15 +05:30
Kevin Ansfield
876c2b6cdd Added first pass at feature image drag+drop uploading
refs https://github.com/TryGhost/Team/issues/884

- add `[data-user-is-dragging]` to `body` element when any drag is occurring so that we can make drop zones active
- added dropzone and drop handling to feature image component
2021-07-16 15:01:00 +01:00
Rishabh
0f9177919c Refined segment selection in default post access setting
closes https://github.com/TryGhost/Team/issues/862

- allows deleting a single product in the segment dropdown
- shows error message in segment when no product is selected
2021-07-16 18:31:23 +05:30
Rishabh
031339ad6d Fixed typo in post save notification
refs 1ad2c05d37 (diff-7541a4cdb9acc4ffbfc9317258269618a25bc5ea9aa3fadd1a9123c6dc0839a9L959-R959)

-  removes typo `.htmlSafe` from actions to fix the save message
2021-07-16 13:20:28 +05:30
Sanne de Vries
f901adf5ae Updated drag & drop indicator color 2021-07-15 16:26:01 +01:00
Kevin Ansfield
04f39e047e Always show feature image buttons when no title is set
no issue

- keeps the buttons visible for longer to aid discovery
2021-07-15 15:50:32 +01:00
Kevin Ansfield
1ad2c05d37 Bumped eslint-plugin-ghost and fixed linter errors
no issue

- new linting rules that needed fixing:
   - calling `super` in lifecycle hooks
   - no usage of String prototype extensions
2021-07-15 15:27:29 +01:00
Kevin Ansfield
7a3b171f7f Fixed error when interacting with tag accent color input
closes https://github.com/TryGhost/Team/issues/744

- we were using `{{on}}` with a function on the component that wasn't bound to `this` via the `action` decorator meaning errors were thrown every time the input lost focus
2021-07-14 16:00:24 +01:00
Kevin Ansfield
85f579b785 Fixed error when entering invalid URL in canonical URL field
closes https://github.com/TryGhost/Team/issues/745

- `URL()` will throw when given something it doesn't understand. As `seoURL` is just a display property it doesn't matter, we can catch the error and do nothing
2021-07-14 15:53:55 +01:00
Kevin Ansfield
8cbf2a5eea Fixed transformer error when saving invalid twitter/facebook URLs
closes https://github.com/TryGhost/Team/issues/746

- `.match()` returns `null` if there's no match which then breaks the array destructuring
2021-07-14 15:24:17 +01:00
Kevin Ansfield
9bc799258d Fixed more tests
refs 8630be5a87

- referenced commit skipped current user and proxy service population when `skipAuthSuccessHandler` was set but the population is needed during setup
- `skipAuthSuccessHandler` is used for skipping the post-authentication transition rather than skipping all post-auth behaviour so the the post-auth behaviour was reintroduced but put in a guard so we don't try to do it again when it's already been run
2021-07-14 13:15:59 +01:00
Kevin Ansfield
a7dc63cfab Fixed tests
refs 8630be5a87

- referenced commit introduced an early return when invalidating session on a failed ajax request so that error alerts weren't shown when re-authenticating. This had an unintended side-effect of breaking invalidation when not re-authenticating and redirecting to signin screen
2021-07-14 12:55:23 +01:00
Kevin Ansfield
8630be5a87 🐛 Fixed re-authenticate modal not showing when saving in editor
closes https://github.com/TryGhost/Team/issues/865

Ghost now returns a forbidden error rather than an unauthorized error when saving whilst logged out so the session invalidation was not being triggered.

- added forbidden check to ajax service to trigger session invalidation
- added automatic retry of save in editor when re-authenticating
- fixed re-population of user and proxy services when re-authenticating, it's not needed at that point because nothing has been cleared
2021-07-14 12:28:09 +01:00
Sanne de Vries
53d76da054 Updated feature image Unsplash integration to appear on post title hover 2021-07-14 09:50:59 +01:00
Sanne de Vries
fed040010d Adjusted feature image button to always be visible on mobile 2021-07-14 09:34:24 +01:00
Kevin Ansfield
cdcd358feb Fixed new post screen showing 500 error
refs c646e78fff

- `return` value was missing from `editor.new` route
2021-07-12 20:19:50 +01:00
Kevin Ansfield
3dc4126397 Dropped use of @classic decorator in <GhTokenInput>
no issue

- updated component to be a glimmer component and use full "Octane" syntax
2021-07-12 14:03:48 +01:00
Thibaut Patel
dc9c812d9c Renamed isAdmin/isOwner/isAdminOrOwner to reduce confusion
issue https://github.com/TryGhost/Team/issues/857

- The goal is to avoid testing for the owner role only is cases where we should be testing for the owner or admin role
- `isOwner` => `isOwnerOnly`
- `isAdmin` => `isAdminOnly`
- `isOwnerOrAdmin` => `isAdmin` (concerns now both Owner and Admins)
2021-07-12 14:55:56 +02:00
Kevin Ansfield
7ab0db9be7 Fixed ember-test-selectors bound attributes deprecations
no issue

- converted publish menu and `gh-tags-list-item` components to glimmer syntax so data attributes can be passed in via `...attributes`
- added explicit `data-test-button` bound attribute to `gh-task-button` component
- moved `modal-theme-warnings` auto-bound data attribute from JS file to explicit html attribute in template
2021-07-08 22:44:52 +01:00
Kevin Ansfield
c646e78fff Made session.user a synchronous property rather than a promise
no issue

Having `session.user` return a promise made dealing with it in components difficult because you always had to remember it returned a promise rather than a model and had to handle the async behaviour. It also meant that you couldn't use any current user properties directly inside getters which made refactors to Glimmer/Octane idioms harder to reason about.

`session.user` was a cached computed property so it really made no sense for it to be a promise - it was loaded on first access and then always returned instantly but with a fulfilled promise rather than the  underlying model.

Refactoring to a synchronous property that is loaded as part of the authentication flows (we load the current user to check that we're logged in - we may as well make use of that!) means one less thing to be aware of/remember and provides a nicer migration process to Glimmer components. As part of the refactor, the auth flows and pre-load of required data across other services was also simplified to make it easier to find and follow.

- refactored app setup and `session.user`
  - added `session.populateUser()` that fetches a user model from the current user endpoint and sets it on `session.user`
  - removed knowledge of app setup from the `cookie` authenticator and moved it into = `session.postAuthPreparation()`, this means we have the same post-authentication setup no matter which authenticator is used so we have more consistent behaviour in tests which don't use the `cookie` authenticator
  - switched `session` service to native class syntax to get the expected `super()` behaviour
  - updated `handleAuthentication()` so it populate's `session.user` and performs post-auth setup before transitioning (handles sign-in after app load)
  - updated `application` route to remove duplicated knowledge of app preload behaviour that now lives in `session.postAuthPreparation()` (handles already-authed app load)
  - removed out-of-date attempt at pre-loading data from setup controller as that's now handled automatically via `session.handleAuthentication`
- updated app code to not treat `session.user` as a promise
  - predominant usage was router `beforeModel` hooks that transitioned users without valid permissions, this sets us up for an easier removal of the `current-user-settings` mixin in the future
2021-07-08 14:54:31 +01:00
Peter Zimon
cc25b2348a Fixed 404 code alignment 2021-07-08 15:42:46 +02:00
Peter Zimon
e36f0a42d3 Updated character counter color 2021-07-08 15:15:49 +02:00
Peter Zimon
873472ab63 Fixed theme uploader UI bug
- added max height to theme uploader modal container to avoid long list of errors leaning out of screen
- added shadow on top of footer to indicate long list of errors
2021-07-08 15:05:30 +02:00
Peter Zimon
0ff760ff96 Fixed missing dropdown arrow UI bug
- Fixed missing dropdown arrow for Timezone setting, caused by a wrongly scoped CSS style definition.
2021-07-08 13:28:43 +02:00
Kevin Ansfield
dd7985a2fd Fixed tests
refs 1cfa0ae58e

- `- Saved` indicator was not correctly behind labs flag
2021-07-07 11:53:06 +01:00
Kevin Ansfield
1cfa0ae58e Added saved post status indicator behind labs flag
refs https://github.com/TryGhost/Team/issues/779

- add "- Saved" to status text in editor when a post has no unsaved changes
- uses `savedIndicator` labs flag so we can test and tweak behaviour before go-live
2021-07-07 11:37:52 +01:00
Peter Zimon
2221c9d4cd Fixed What's new image sizing 2021-07-07 11:22:04 +02:00
Peter Zimon
7778d3c470 Refined visibility dropdown in post settings 2021-07-06 14:51:36 +02:00
Peter Zimon
830d24cb20 Refined post visibility settings
- added placeholder text to product/tier dropdown
- applied visual refinements

Note: alpha feature
2021-07-06 14:46:33 +02:00
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
Rishabh
3c5e334041 Added ability to set post access to segments
refs https://github.com/TryGhost/Team/issues/801

- This reverts commit de560733c5
- brings back members segment select component to post access, which allows setting access to specific labels/products
- only works behind the alpha feature flag - `multipleProducts`
2021-06-28 17:46:24 +05:30
Rishabh
3ac531be31 Added product options to members segment select
refs https://github.com/TryGhost/Team/issues/800
refs https://github.com/TryGhost/Team/issues/802

- adds product segments to segment select component behind the feature flag
- This reverts commit 27a2bc7722
2021-06-28 17:46:24 +05:30
Peter Zimon
0acf9b1d9b Refined benefits 2021-06-28 12:39:31 +02:00
Sanne de Vries
c1d3d8e4f2 styled reset passwords modal 2021-06-28 11:54:45 +02:00
Thibaut Patel
da9990db27 Added the "reset all passwords" user interface
issue https://github.com/TryGhost/Team/issues/750
pr https://github.com/TryGhost/Ghost/pull/13005
2021-06-28 11:54:45 +02:00
Rishabh Garg
46b311b561 Wired benefits section to API (#2023)
refs https://github.com/TryGhost/Team/issues/792

- updates product benefit to use `name` instead of `label` attribute for benefit text
- updates model/serializer/validator to correctly handle benefit attributes
- added `+` button for adding new labels as the enter behavior is closing the popup(needs fix)
2021-06-28 15:19:54 +05:30
Kevin Ansfield
386d59d709 Fixed editor save retry attempts data not making it to Sentry
no issue

- the options passed to `captureMessage` have specific top-level keys, arbitrary data needs to be supplied by the `extra` key rather
2021-06-28 10:34:21 +01:00
Sanne de Vries
637b50956e Adjusted padding in post settings menu 2021-06-28 10:11:40 +02:00
Sanne de Vries
d676473bb1 Updated post settings menu icon 2021-06-24 14:51:10 +02:00
Daniel Lockyer
023820eddd Merged v4.8.1 into main
v4.8.1
2021-06-24 11:20:17 +01:00
Rishabh
38a499a531 🐛 Fixed stripe connect modal not closing
closes https://github.com/TryGhost/Ghost/issues/13090

The `X` on stripe connect modal is not closing the popup as the updated modal changes was not wiring the close method.

Note: Clicking outside the popup to close it was still working
2021-06-24 14:52:06 +05:30
Rishabh
4665e64103 🐛 Fixed default currency for MRR stats on dashboard
closes https://github.com/TryGhost/Team/issues/799

- previous logic was still using `stripe_plans` for MRR currency, which is not used anymore
- updates first product's currency as default mrr currency
2021-06-24 14:51:39 +05:30
Peter Zimon
81ae1afcaa Added inner scrolling for benefits list (alpha) 2021-06-23 15:12:08 +02:00
Kevin Ansfield
1206889b0d Fixed editor flex breakouts squashing sidebar in settings menu redesign
no issue

- added `--editor-sidebar-width` CSS variable directly in `index.html` so it doesn't get removed by `postcss-custom-properties` (we use `preserve: false` to avoid problems with `postcss-color-mod-function`)
- adjusted editor CSS
  - added max-width calc on container element to prevent browser from increasing the element's width beyond what would allow the sidebar to display at it's desired width
  - adjusted the editor flex breakout styles to work with a non-100vw width by using the sidebar width variable
- updated labs post settings menu component to set the `--editor-sidebar-width` variable to the actual width of the sidebar element
  - avoids need to have multiple classes with fixed widths to adjust editor and breakout sizes
2021-06-23 13:54:40 +01:00
Peter Zimon
516825e41f Fixed Multiple products alpha feature name case style 2021-06-23 11:58:59 +02:00
Sanne de Vries
f15bce5c2d Updated design for new fixed post settings menu 2021-06-22 20:51:31 +02:00
Peter Zimon
c078b639c2 Benefit list width refinement (alpha) 2021-06-22 16:59:58 +02:00
Peter Zimon
a02711c2a2 Refined benefits list (alpha) 2021-06-22 16:44:16 +02:00
Sanne de Vries
3fc538eb4a Fixed feature image indicator alignment 2021-06-22 13:45:45 +02:00
Sanne de Vries
223a7f35c3 Added feature image indicator 2021-06-22 13:12:41 +02:00
Kevin Ansfield
1c9b7bba9d Fixed number of post save retry attempts
refs ac094821c8

- 2 attempts were used to speed up development, should have been 6 to match the 30seconds total retry period
2021-06-22 12:11:35 +01:00
Rishabh
1df55f76f7 Fixed product save handling on membership settings
no refs

- the settings save on memberships was incorrectly relying on developerExperiments flag instead of multipleProducts feature flag
2021-06-22 14:19:08 +05:30
Kevin Ansfield
bc950e655f Fixed error when editing settings
no issue

- the `newsletter_show_header` setting has been removed on the server side but was still being included by the client when saving the settings model resulting in a `Resource not found error, cannot edit setting. Problem finding setting: newsletter_show_header` error
2021-06-22 09:06:39 +01:00
Kevin Ansfield
a8c05f4be7 Fixed linting errors
refs ac094821c8

- stray console.logs
2021-06-21 18:15:17 +01:00
Kevin Ansfield
ac094821c8 Improved "Server unreachable" error handling in editor
refs https://github.com/TryGhost/Team/issues/788

- automatically retry any failed save attempts every 5 seconds for up to 30 seconds
- only show error bar after when we completely give up
- clear error bar if a later save is successful
- update error message to specify there's a connection problem and to retry with Cmd+S
- notify Sentry of a successful save after an initial failure including the number of attempts that were made and the total time for save to succeed in seconds
2021-06-21 18:13:45 +01:00
Sanne de Vries
81bfc3c6f6 Updated feature image button in editor 2021-06-21 16:27:13 +02:00
Kevin Ansfield
2770c73bab Fixed tests
refs 37a6197f81

- fixed find/replace whoopsie with `slugGenerator.generateSlug()`
- updated editor controller unit tests to match rename
2021-06-21 15:18:11 +01:00
Kevin Ansfield
37a6197f81 Renamed editor tasks to use xTask naming
no issue

- helps indicate that you're dealing with an ember-concurrency task object rather than a function/action so you know to use `perform` and that you have access to derived state
2021-06-21 15:05:41 +01:00
Sanne de Vries
0744119299 Fixed feature image caption vs alt text spacing issue 2021-06-21 16:00:49 +02:00