Commit Graph

3163 Commits

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