Commit Graph

7158 Commits

Author SHA1 Message Date
Kevin Ansfield
b3b5ac6cef Fixed error when resizing browser after pasting embed link
closes https://github.com/TryGhost/Team/issues/749

- resize event listener is created twice when converting a link to an embed card, if we don't clear the older resize event handler before creating a new one then it persists after the component is torn down and the iframe no longer exists
2021-07-14 14:50:59 +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
040f033e2d Fixed editor error when deleting a card via DEL key with no following section
refs https://github.com/TryGhost/Team/issues/747

- we were assuming that a next section exists, when it didn't we'd error trying to read `type` of `undefined`
2021-07-12 21:56:33 +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
Daniel Lockyer
785b7d2239 Merged v4.9.4 into main
v4.9.4
2021-07-12 18:54:47 +01:00
Daniel Lockyer
b3c49f08b2 v4.9.4 2021-07-12 18:53:21 +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
renovate[bot]
a23b191257 Update dependency @sentry/ember to v6.9.0 (#2037)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-12 12:14:09 +01:00
Daniel Lockyer
3a5a6b33fe Merged v4.9.3 into main
v4.9.3
2021-07-12 08:18:18 +01:00
Renovate Bot
a2588ff3c1 Lock file maintenance 2021-07-12 01:47:19 +00:00
Sam Lord
9435e16c89 v4.9.3 2021-07-09 20:41:27 +01:00
Sam Lord
98a7d53c73 Merged 4.9.2 into main 2021-07-09 10:29:36 +01:00
Sam Lord
2bef71dcdc v4.9.2 2021-07-09 10:23:26 +01:00
renovate[bot]
9772866233 Update dependency ember-test-selectors to v6 (#2034)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-09 09:52:33 +01: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
Sam Lord
4be455ee33 v4.9.1 2021-07-08 11:13:20 +01: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
Daniel Lockyer
8752a1e318 v4.9.0 2021-07-07 09:39:56 +01: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
renovate[bot]
6d952d88e4 Update dependency @tryghost/timezone-data to v0.2.47 (#2030)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-05 08:35:41 +01:00