Commit Graph

4274 Commits

Author SHA1 Message Date
Gabriel Csapo
a8dbc1ab7e [chore] updates app/controllers/editor.js to use native classes (#2253)
refs https://github.com/TryGhost/Ghost/issues/14101

- continuing migration to native classes with use of `@classic` decorator
2022-02-09 09:50:46 +00:00
Sanne de Vries
929378c318 Updated copy of Save buttons on settings pages
No issue

- Changed all buttons to "Save" for consistency across settings
2022-02-09 10:32:47 +01:00
Kevin Ansfield
6b4fe78252 Swapped use of EmberObject for member filter rows to native classes
refs https://github.com/TryGhost/Team/issues/1309

General cleanup to switch to more modern idioms.

- removed unnecessary assignment of properties in component's `constructor`
- dropped use of `EmberObject`, use an explicitly defined `Filter` class instead
  - marked properties that change as `@tracked`
  - switched to direct property setting with `=` instead of `.set()`
2022-02-09 09:10:55 +00:00
Fabien "egg" O'Carroll
047f28177f 🐛 Fixed sending non-integer prices to Tiers API
refs https://github.com/TryGhost/Team/issues/1319

Due to how JS implements numbers, it's possible that when we multiple a
number with 2 decimal places by 100 that we do not end up with an
integer e.g. 9.95 * 100 = 994.999...

This is not a valid price for the API and so we must round it to the
nearest integer. Rounding is safe here, because the errors involved in
floating point operations are very small.
2022-02-09 10:41:16 +02:00
Sanne de Vries
a2b631f8b6 Updated empty states for posts, pages, and tags 2022-02-09 09:34:12 +01:00
Sanne de Vries
7061b3416f Updated copy on empty members screen 2022-02-09 09:24:11 +01:00
Kevin Ansfield
e3aa51310c Resolved linter errors in <Members::FilterValue> component
refs https://github.com/TryGhost/Ghost/issues/14101

- dropped use of unnecessary `<GhTextInput>` component
- switched action calls over to standard `{{on "event"}}` rather than the sometimes error-prone overriding of EmberObject component event handlers
2022-02-08 15:11:01 +00:00
Kevin Ansfield
b80ce527e5 Moved members screen filter components into components/members
no issue

- currently the components are screen-specific rather than generalised so shouldn't have the `gh-` prefix
- fixed linter error for confusing `{{#unless}}...{{else}}` usage
2022-02-08 15:11:01 +00:00
Fabien "egg" O'Carroll
b287c881eb Revert "Rounded monthly/yearly Price"
This reverts commit 55af726402.
2022-02-08 16:46:00 +02:00
Fabien "egg" O'Carroll
55af726402 Rounded monthly/yearly Price
refs https://github.com/TryGhost/Team/issues/1319
2022-02-08 16:43:57 +02:00
Sanne de Vries
4cd5ea90eb Updated import-members modal 2022-02-08 14:56:19 +01:00
Kevin Ansfield
8e5cbf4e0f Cleaned up members filter labs components
no issue

- the members filtering is out of labs, we don't need to keep the labs component naming around
- renamed `-labs` components/classes to non-labs naming, replacing old and unused non-labs components where necessary
2022-02-08 11:48:55 +00:00
Kevin Ansfield
bf9bbc3aa6 Fixed members search input losing focus whilst typing
closes https://github.com/TryGhost/Team/issues/1318

The `{{if this.members.length "" "hidden"}}` class meant that whenever loading occurred the search input was briefly changed to `display: none` which caused focus to be lost making searching rather painful. It also meant the search input disappeared completely when no members matched a search.

- switched to a standard `<input>` element to get better event handling ergonomics
- added `searchIsFocused` tracked property that is set to `true` any time the search input has focus - works around an unexpected re-render when clearing the search input whilst it has focus
- switched the "hide" conditional to a getter that takes members length, search param text, and search input focus into account so there are no unexpected hides of the search bar
2022-02-08 11:44:08 +00:00
Kevin Ansfield
f111a23031 🐛 Fixed "Show all members" button not clearing search field when no results match
no issue

- the reset button was only clearing the `filter` param rather than resetting all query params
- removed unnecessary `searchText` indirection, the search input can work directly with the query param
2022-02-08 11:36:49 +00:00
Kevin Ansfield
f0432ba82c Migrated <GhUnsplashPhoto> to glimmer component
refs https://github.com/TryGhost/Ghost/issues/14101

- extracted the ratio zoom handling to a `{{ratio-zoom}}` modifier to clean up the component and avoid needing lifecycle hooks that don't exist in Glimmer components
- disabled `no-nested-interactive` linting in the template - not ideal but we'd need a much bigger design refactor to eliminate the nested links
2022-02-08 10:13:18 +00:00
Djordje Vlaisavljevic
088c1af098 Fixed showing explainer text for free membership welcome page input field
refs https://github.com/TryGhost/Team/issues/1168
2022-02-08 09:39:48 +01:00
Rishabh
f341edb02d Updated welcome page location for free membership
refs https://github.com/TryGhost/Team/issues/1168

- moved free tier welcome page url from product card to main screen
2022-02-08 09:31:40 +05:30
James Morris
7ee156ef72 Quick fixed the links not showing when activity feature flag is off for members
refs: https://github.com/TryGhost/Team/issues/1317
2022-02-07 17:00:59 +00:00
Kevin Ansfield
018a4ec5e9 Migrated <GhUnsplash> to glimmer component
refs https://github.com/TryGhost/Ghost/issues/14101

- swapped use of `<LiquidWormhole>` to `{{#in-element}}` because we weren't animating anything
  - we can now use `{{css-transition}}` instead if we want to animate in the future
- swapped use of `ShortcutsMixin` for ember-keyboard's `{{on-key}}` modifier
- added `{{query-selector}}` helper so we can grab an element from inside the template rather than requiring a backing component function (used to pass the wormhole element to `{{#in-element}}`)
- added `{{on-resize}}` modifier so the `resizeDetector` service can be used directly from the template rather than requiring a backing component to wait for render and use query selectors to grab an element
2022-02-07 16:53:12 +00:00
Sanne de Vries
9234c8f695 🎨 Improved empty state of the Members screen
No issue

- Added resources to help and inspire people get started with members, which will be hidden after 6+ members are added
2022-02-07 16:11:08 +01:00
Kevin Ansfield
aadbb6ea1c Added unsplash button/selector to publication cover image form field
no issue

- shows an unsplash button when no image is present, opening the full unsplash selector when clicked
- behind the `improvedOnboarding` labs flag
2022-02-07 12:16:57 +00:00
Kevin Ansfield
bbd4c452b9 Updated conditionals for editorIsLaunchComplete with improvedOnboarding feature
closes https://github.com/TryGhost/Team/issues/1294

- ensures latest member activity is shown when improvedOnboarding feature is enabled no matter what the `editorIsLaunchComplete` value is to better show what the dashboard will look like when the launch wizard is removed
2022-02-07 11:11:19 +00:00
Kevin Ansfield
da9c4288bf Added collapse animation to get-started dashboard panel when dismissing
no issue

- softens the disappearance by fading out and collapsing the height when removing
- uses `{{css-transition}}` modifier from https://peec.github.io/ember-css-transitions/docs/insert-destroy
- max-height used in order to animate collapse of a `height: auto` panel, 350px starting point chosen as it's slightly bigger than the largest height of the panel at mobile widths
2022-02-07 10:04:52 +00:00
Kevin Ansfield
7e95890a99 Added saving spinner to finishing-touches screen
refs https://github.com/TryGhost/Team/issues/1310

- switched to a task and `<GhTaskButton>` to show a saving indicator whilst waiting for API to return
2022-02-04 17:32:43 +00:00
Kevin Ansfield
2525a43156 Changed firstStart flow to show a streamlined settings screen
closes https://github.com/TryGhost/Team/issues/1310

- added `/setup/finishing-touches` route
  - refreshes theme preview on access
  - uses existing setting form components to build a reduced settings menu
- updated `/?firstStart=true` handling to transition to `/setup/finishing-touches` instead of showing the get-started modal
- updated standard setup flow to show the get-started modal upon completion
  - `/?firstStart=true` flow for now will only be used when a theme has been chosen before site creation
2022-02-04 17:06:40 +00:00
Kevin Ansfield
b166522916 Added global max-width for input[type="image"]
refs 14c0c5ff65

- we want `<input type="image">` to behave the same as `<img>`
2022-02-04 16:44:34 +00:00
Kevin Ansfield
5f0f47ac4d Fixed missing ...attributes on <Settings::FormFields::PublicationCover>
refs 14c0c5ff65
2022-02-04 16:11:23 +00:00
Kevin Ansfield
14c0c5ff65 Refactored general design settings form components
refs https://github.com/TryGhost/Team/issues/1310

We want to use parts of the "Brand setting" form in a separate streamlined settings screen after site setup but that wasn't possible without a lot of duplication.

- extracted individual form fields into separate components for re-use
  - included minor refactors like using `uploader.registerFileInput` and `uploader.triggerFileDialog` instead of continually duplicating the same file input trigger method
- fixed accessibility issues
  - changed input titles from `<div>` to `<label>` and associated with the component's input fields
  - changed `<img {{on "click" upload}}>` to `<input type="image">` so they act as proper buttons and are linked to the label (required a styling change so `img` and `input[type="image"]` are treated equally)
- finished cleanup of `.description-container-labs` by renaming to `.description-container`
2022-02-04 16:04:58 +00:00
Rishabh Garg
e493afdb16 Updated specific tier handling for default post access setting (#2246)
refs https://github.com/TryGhost/Team/issues/1071

Default content visibility for specific tiers is now stored across 2 settings - `tiers` on `default_content_visibility` and list of tier ids on `default_content_visibility_tiers` setting, which is consistent with pattern of storing visibility on posts. This change -

- updates visibility filter UI for default content visibility segment select
- cleans up common visibility segment select component to handle ids directly instead of nql segments
- updates setting model
2022-02-04 21:00:59 +05:30
Djordje Vlaisavljevic
0d30d98a9b Moving styling from Tachyons classes to custom classes
refs https://github.com/TryGhost/Team/issues/1252
2022-02-04 14:50:41 +01:00
Kevin Ansfield
019b22caa1 Added desktop/mobile switch to <GhBrowserPreview> component
refs https://github.com/TryGhost/Team/issues/1310

- we had a `<GhBrowserPreview>` component but it wasn't being used everywhere because it's behaviour didn't match the mobile/desktop switch with no iframe re-render that we needed for some screens
- updated component to match all required behaviour
  - include a switch between desktop and mobile views
  - default fallbacks for `@title` and `@icon` arguments
- switched design settings themes over to using the component instead of repeating the same set of markup
2022-02-04 10:28:20 +00:00
Djordje Vlaisavljevic
a05c9e4c76 Updated confirmation modal copy
refs https://github.com/TryGhost/Team/issues/1252
2022-02-04 10:36:55 +01:00
Kevin Ansfield
c44766e8d3 Collapsed @service injection definitions to single-line style
no issue

- find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax
2022-02-03 19:04:43 +00:00
Kevin Ansfield
e3c4eff84c Resolved use of {{action}} linter errors in <GhProductCard>
refs https://github.com/TryGhost/Ghost/issues/14101

- switched to `{{on}}` and `{{fn}}`
- updated linter todo list
2022-02-03 17:37:32 +00:00
Djordje Vlaisavljevic
2ec4a1fb5c Removed an extra div
refs https://github.com/TryGhost/Team/issues/1252
2022-02-03 18:07:41 +01:00
James Morris
637fbbd2e1 Fixed the green button text that appeared on the dashboard
refs: https://github.com/TryGhost/Team/issues/1308

- added more targeted selectors to revert back original color
2022-02-03 17:03:48 +00:00
Djordje Vlaisavljevic
5ab17e586f Updated free membership card
refs https://github.com/TryGhost/Team/issues/1252
2022-02-03 18:03:29 +01:00
Rishabh
40c78b6be6 Removed add complimentary option for member when no active tiers
refs https://github.com/TryGhost/Team/issues/1252

"Add complimentary subscription" doesn't make sense when there are no active tiers for site in member detail screen
2022-02-03 19:12:41 +05:30
Djordje Vlaisavljevic
c67e76a1ff Moved the welcome page URL input field to the bottom of the section
refs https://github.com/TryGhost/Team/issues/1168
2022-02-03 09:47:43 +01:00
Djordje Vlaisavljevic
333f6f2424 Updated tiers dropdown filter active state
refs https://github.com/TryGhost/Team/issues/1252
2022-02-03 09:16:25 +01:00
Gabriel Csapo
75a138cb39 [chore] Ran native classes codemod for app/services (#2240)
refs https://github.com/TryGhost/Admin/pull/2227

- a continuation of #2227 that runs the native classes codemod against app/services
2022-02-02 22:11:11 +00:00
Kevin Ansfield
850a223dd4 Dropped use of @classic decorator in transforms
refs https://github.com/TryGhost/Admin/pull/2242

- there was no further EmberObject specific usage to migrate for these classes so the @classic decorator is not necessary
2022-02-02 18:48:59 +00:00
Kevin Ansfield
83fb74613c Migrated session-store to native class syntax
no issue

- part of the push to standardize on native es6 classes in place of EmberObject syntax
2022-02-02 18:41:16 +00:00
Kevin Ansfield
f73837fba3 Finalized migration of serializers to native class syntax
refs d40740b0ec

- dropped use of `@classic` for auto-converted classes
- switched remaining EmberObject serializers to native classes
2022-02-02 18:35:18 +00:00
Gabriel Csapo
d40740b0ec [chore] ran native classes codemod for apps/serializers (#2243)
refs https://github.com/TryGhost/Admin/pull/2227

A continuation of #2227 that runs the native classes codemod against app/serializers.

Most of the serializers that are trying to be transformed are failing with the same issue:

```
Validation errors: 
	[attrs]: Transform not supported - value is of type object. For more details: eslint-plugin-ember/avoid-leaking-state-in-ember-objects
2022-02-02T05:54:58.571Z [warn] [app/serializers/role.js]: FAILURE 
```
2022-02-02 18:27:03 +00:00
Gabriel Csapo
f22a758a3b [chore] run the no-implicit-this codemod (#2244)
refs https://github.com/TryGhost/Admin/pull/2238

Follow up to #2238, this should remove the existing no-implicit-this lint errors and any new violations should be flagged right away.

* run the no-implicit-this codemod
* updated todos
2022-02-02 17:09:02 +00:00
Gabriel Csapo
fdc24103cc [chore] runs native classes codemod for app/adapters (#2239)
no issue

* ran native classes codemod for app/adapters
* migrated slug-url mixin to a utility
2022-02-02 16:57:22 +00:00
Kevin Ansfield
cc257f8576 Fixed noreferer typos
no issue

- should be `noreferrer`, caused duplication by ember-template-lint auto fixing
2022-02-02 16:20:01 +00:00
Gabriel Csapo
beb5ae1737 [chore] adds ember-template-lint and fixes all fixable issues (#2238)
no issue

- This will help with the octane migration and you can still run the lint rules even when they are todos. (Checkout the docs at 158b119667/docs/todos.md) The good news is any new code will be checked against the recommended config.
- I fixed all the auto fixable things we could get in this PR as well
2022-02-02 16:09:43 +00:00
Rushab Kumar
894cea5256 Fix incorrect color on hover for publish and send buttons (#2188)
- Use default primary button style in publish menu for dark mode
2022-02-02 15:27:27 +01:00
James Morris
10948af9be Added in basic styleing for the onboarding modal ready for testing
refs https://github.com/TryGhost/Team/issues/1303

- added rudimentary styling to the new onboarding modal
- added in three new icons to go with the new modal
- added the styling to the main.css for the moment
2022-02-02 12:28:08 +00:00
Thibaut Patel
151e647daa Removed the UI for the callout card feature flag
no issue

- The feature flag was removed in 7a270de050
- The UI was remaining, although it wasn't working
2022-02-02 13:27:36 +01:00
Rishabh
38b51fe192 Removed archive options for tiers without prices
refs https://github.com/TryGhost/Team/issues/1252

- on stripe disconnect, the prices on tiers are deleted, which causes the archive/unarchive on them to fail in admin
- this change removes the archive/activate option for such tiers, which will get properly cleaned up once we start removing tiers on stripe disconnect
2022-02-02 16:34:51 +05:30
Rishabh
61eeafbca7 Refined portal settings for multiple tiers
refs https://github.com/TryGhost/Team/issues/1252

- enables available tiers list for portal in case of a single tier as well, which was previously hidden
- allows site owners to enable a tier again for Portal if it was archived in past
2022-02-02 16:24:20 +05:30
Rishabh
9b0ba5968e Fixed broken offer screen for tiers missing price
no refs

- in an edge-case scenario, if an offer is using a tier with missing price, it will not throw an error because of lack of price
- this case will be auto-handled once we delete all existing offers in future on stripe disconnect
2022-02-02 16:24:20 +05:30
Rishabh
498efd00cb Refined tiers list to switch to active list on unarchive
refs https://github.com/TryGhost/Team/issues/1252

- on unarchiving a tier, we switch back to active tier list instead of staying back on archived list
2022-02-02 16:24:20 +05:30
Gabriel Csapo
b4c3e1ae40 [chore] runs native classes codemod for app/transforms (#2242)
refs https://github.com/TryGhost/Admin/pull/2227

- a continuation of #2227 that runs the native classes codemod against app/transforms
2022-02-02 10:40:43 +00:00
Gabriel Csapo
c849bea549 [chore] runs native classes codemod for apps/helpers (#2241)
refs https://github.com/TryGhost/Admin/pull/2227

- a continuation of #2227 that runs the native classes codemod against app/helpers
2022-02-02 10:38:52 +00:00
Sodbileg Gansukh
a1ba715d0a Remove commented style 2022-02-02 11:21:36 +01:00
Sodbileg Gansukh
442772c694 Fix dashboard chart width on wide screens 2022-02-02 11:21:36 +01:00
Peter Zimon
d5018cbb3a Fix tests 2022-02-02 10:57:34 +01:00
Peter Zimon
b5995419dc Updated default redirect for contributors 2022-02-02 10:12:16 +01:00
Sodbileg Gansukh
87738cb5de Fix close icon overlapping in the link input 2022-02-01 19:44:01 +01:00
Kevin Ansfield
8bc4309deb Added display of get-started modal after completing setup flow
refs https://github.com/TryGhost/Team/issues/1295

- moved `?firstStart` query param handling into `'home'` route as it seemed like a preferable location
  - switched to using `resetController` hook to manage removal of query param which seemed more reliable than the transition approach
- added `firstStart` query param to the transitions when completing step 3 of the setup flow
2022-02-01 18:20:26 +00:00
Sodbileg Gansukh
41edf44bee Fix post preview header pixel jump 2022-02-01 18:59:36 +01:00
Peter Zimon
6fa8dafa79 Contributors updates (#2235)
Updates Admin UX for Contributors

When logged in as a Contributor:

- removes sidebar, added floating account menu and dark-mode switch to right side. Updated mobile menu accordingly
- all post by the given user is listed in the Post list
- changed post filtering
- hides email columns in post list
- removes publishmenu for Contributors in Post preview modal
- visual tweaks
2022-02-01 18:59:20 +01:00
Kevin Ansfield
9760e67b3d Added "Get started" modal for first-load onboarding
refs https://github.com/TryGhost/Team/issues/1295

- modal is triggered by the query param `?firstStart=true`, eg https://localhost:2368/ghost/#/?firstStart=true
- clears the query param after triggering the modal so it doesn't get re-triggered after leaving and re-entering the dashboard route
2022-02-01 17:47:50 +00:00
Kevin Ansfield
f07940f0e7 Collapsed @service injection definitions to single-line style
no issue

- find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax
2022-02-01 17:03:54 +00:00
James Morris
b5521e0922 Fixed breadcrumb not working at narrow widths and member activity scroll gap
refs: https://github.com/TryGhost/Team/issues/1277

- added a z-index to fix breadcrumbs when filters overlap
- made the scrolling list longer on the member activity page to remove gap
2022-02-01 14:41:21 +00:00
James Morris
097aa5c228 Fixed the spacing with email links in activity without flag
refs: https://github.com/TryGhost/Team/issues/1298

- Removed the title class as it's not necessary when flag is off
2022-02-01 14:28:37 +00:00
James Morris
418d5ae11c Bug fix for member activity mini view when flag is off
refs: https://github.com/TryGhost/Team/issues/1298

- careful consideration for styles when feature flag is on and off
- removed an unnecessary class name that helped fix
2022-02-01 12:57:11 +00:00
Rishabh
66f1e57d81 Fixed action dropdown not showing for free tier card
refs https://github.com/TryGhost/Team/issues/1252

- we only want to hide the archive option for free tier, as that's only relevant for paid tiers.
2022-02-01 17:26:18 +05:30
Kevin Ansfield
b47667d8af Fixed <GhDropdown> not opening
refs https://github.com/TryGhost/Admin/pull/2227

- in the switch to native class syntax the `super()` calls for click handlers in the `<GhDropdown>` and `<GhDropdownButton>` components were lost, meaning the event propagation was not cancelled by the DropdownMixin's `click()` handler resulting in the click-to-open being immediately undone by the body click-to-close
2022-02-01 11:42:42 +00:00
Fabien "egg" O'Carroll
a70be14bd5 Merge tag 'v4.34.1'
v4.34.1
2022-02-01 12:43:29 +02:00
Kevin Ansfield
25b2fd4aed Fixed forced-scrollbar on members and members-activity tables
no issue

- some browser/OS setting combinations will always show a fixed scrollbar when `overflow: scroll` is used instead of `overflow: auto`
2022-02-01 09:53:55 +00:00
Kevin Ansfield
be432dc4ca Added email fallback for selected member details on activity screen
no issue

- if a member has no name when they are selected on the member activity screen we weren't showing anything in the header breadcrumbs or member filter
- switched to showing name or email
2022-02-01 09:50:40 +00:00
Gabriel Csapo
8d01fb5556 Switched majority of files from EmberObject to native class syntax using @classic decorator (#2227)
no issue

- ran [ember-native-class-codemod](https://github.com/ember-codemods/ember-native-class-codemod) to convert the majority of remaining EmberObject based controllers and components to native class syntax using the `@classic` decorator
- skipped older style modal components (`components/modal-*.js`) due to observed incompatibilities in some cases
2022-02-01 09:34:03 +00:00
Rishabh Garg
7c5b14d050 Updated specific tier visibility handling for posts/pages (#2233)
refs TryGhost/Team#1071

Specific tier visibility for a post was previously stored in `visibility` column directly, which had a limitation of 50 charts. Going forward, for the specific tiers visibility of post/page, we use `tiers` array in API that contains list of tiers with access for post. This change -

- replaces `filter` type to `tiers` for visibility
- adds new visibility filter segment component in post settings menu which stores array of tiers instead of nql string for visibility
- updates serializer and model for post/page
- updates tests
2022-02-01 12:24:06 +05:30
Rishabh Garg
baf6ec07a8 Wired UI for archiving tiers (#2231)
refs https://github.com/TryGhost/Team/issues/1252

- allows site owners to (un)archive existing tiers via Admin UI
- adds option to switch between archived or active tiers view

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2022-01-31 23:56:12 +05:30
Djordje Vlaisavljevic
0f718c5a99 Moved the welcome page URL field to the first section
refs https://github.com/TryGhost/Team/issues/1168
2022-01-31 15:53:25 +01:00
Kevin Ansfield
8f1cca9f9d Added per-user dismissibility of getting-started widget
refs https://github.com/TryGhost/Team/issues/1294

- added `dashboardHideGettingStarted` feature flag that uses the `user.accessibility` JSON blob
- added `{{toggle-feature}}` helper which returns a function that can be used with the `{{on}}` helper to toggle a feature flag on or off from templates
- hooked up the dismiss behaviour for the dashboard widget using the `toggle-feature` helper
- hid the dashboard when `dashboardHideGettingStarted` feature is enabled
2022-01-31 13:05:20 +00:00
Peter Zimon
3a3b2f7fb4 Remove alpha flag for Editor settings panel (#2230) 2022-01-31 13:33:59 +01:00
Kevin Ansfield
d8aaa77f37 Replaced dashboard launch wizard widget with getting-started widget
refs https://github.com/TryGhost/Team/issues/1294

- added new widget behind `improvedOnboarding` labs flag
- hid launch wizard widget when labs flag is enabled
2022-01-31 12:28:22 +00:00
Fabien "egg" O'Carroll
898af1b449 Put Tier welcome page urls behind feature flag
refs https://github.com/TryGhost/Team/issues/1168
2022-01-31 13:36:40 +02:00
Kevin Ansfield
fbf55bb29d Added improvedOnboarding labs toggle
refs https://github.com/TryGhost/Team/issues/1294

- feature flag and associated toggle for onboarding-related setup flow and dashboard tweaks
2022-01-31 11:31:58 +00:00
Kevin Ansfield
ed48cd6e3a Refactored custom-view-form modal
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Admin/pull/2227

- updated modal component to use newer ember-promise-modals modals implementation
  - removed use of "delayedColor" properties as the workaround for liquid-fire based animation is no longer required
  - added `validate` action to remove need for `{{action}}` - we can't call the `validate()` method directly from the template because it's not bound correctly with `@action` and binding it breaks other code that expects `_super()` for the validate method to work via the mixin (eg, staff invite modal)
- removed `customViews.toggleFormModal()`` and changed `customViews.editView()` to open the modal directly
  - updated templates to use `{{on "click" this.customViews.editView}}` in place of toggling the "showFormModal" property
2022-01-31 10:41:57 +00:00
Fabien "egg" O'Carroll
8fbb5eb04d Removed shared redirect inputs when Tiers enabled
refs https://github.com/TryGhost/Team/issues/1168

These are being replaced by Tier specific redirect which are set in the
Tier modal when Tiers feature is enabled.
2022-01-31 12:07:19 +02:00
Fabien "egg" O'Carroll
41c138640a Wired up welcome_page_url to Tier modal
refs https://github.com/TryGhost/Team/issues/1168

This allows users to set the welcome page url on a tier by tier basis
rather than globally for all paid tiers or all free tiers.
2022-01-31 12:07:19 +02:00
Sanne de Vries
7a7b473f89 Updated Email newsletter settings
No issue

- When disabling email newsletters, the "Subscribed to email" toggle in the member profile is hidden
- Copy changes to the Default newsletter recipients setting
- Moved tiers to the top of the segment selection in Default newsletter recipients
2022-01-27 21:40:30 +00:00
Kevin Ansfield
d3447315ee Excluded all email related events from feeds when newsletter is disabled
refs https://github.com/TryGhost/Team/issues/1290

- added `{{members-event-filter}}` helper that can be used to build an event filter string that will always exclude email events when the newsletter is disabled
  - useful when used in conjunction with `{{members-event-fetcher}}` because the filter is automatically adjusted for you without needing additional logic or JS backing files for components
- updated dashboard and member screen activity widgets to use `{{members-event-filter}}`
- updated members-activity screen
  - updated to use `{{members-activity-filter}}` helper in the template which allowed for removal of filter generation in the controller
  - changed `@hideMemberOnlyEvents` to `@hiddenEvents` on `<MembersActivity::EventTypeFilter>` so that we can control which events are available in the filter based on newsletter enable/disable and presence of a filtered member
2022-01-27 19:19:15 +00:00
Kevin Ansfield
5dda8832f2 Added showSearchMessage option to gh-input-with-select/trigger component
refs https://github.com/TryGhost/Team/issues/1290

- when set to `false` prevents the dropdown opening when it would only contain the "Type to search" message
- uses the `@extra` hash param. Would be preferable to be able to use `@searchMessage=""` but ember power select doesn't pass the searchMessage argument through to the trigger
2022-01-27 18:56:13 +00:00
James Morris
af6332cb6e Make the Activity header always clickable to reset any filters anytime
refs https://github.com/TryGhost/Team/issues/1277
2022-01-27 17:45:13 +00:00
James Morris
1bcc396442 Styled up the filters dropdown for activity with a few other tweaks
refs https://github.com/TryGhost/Team/issues/1277

- added new selected style to filters for activity
- added new subscription icon for filters for activity
- added in the GhMembersAvatar to events row
- fixed the green link for activity mini-view
2022-01-27 17:14:06 +00:00
Kevin Ansfield
073cdc7078 Replaced dashboard "Top members" widget with longer activity feed
refs https://github.com/TryGhost/Team/issues/1290

- when the activity feed labs flag is enabled
  - hide top members widget
  - increase number of events in activity widget from 5 to 10
2022-01-27 16:53:39 +00:00
Kevin Ansfield
f2594e26f6 Reverted accidental removal of dashboard "Top members" widget
no issue

- we want to remove it eventually but as part of the members activity feed changeset
2022-01-27 16:48:51 +00:00
Kevin Ansfield
5696762984 Switched to top-level input field for members activity member search
refs https://github.com/TryGhost/Team/issues/1290

- switched to using our `gh-input-with-select/trigger` power select trigger to get a search input with select
  - kept the replacement with a button once a selection is made for easier clearing of the selection
2022-01-27 16:41:44 +00:00
James Morris
fa224988e5 Updated styles for Activity to address latest feedback
refs https://github.com/TryGhost/Team/issues/1277

- changed breadcrumb for activity
- added back in three columns for activity when not filtered
- made adjustments to visual look and feel
2022-01-27 15:27:26 +00:00
Kevin Ansfield
266064fc8f Fixed <GhMemberAvatar> expecting an EmberObject object
no issue

- it should be possible to pass a POJO rather than an EmberObject object so the component is usable with raw data like we have with member events
- switched to using `get()` rather than assuming the passed in object has it's own `.get()` method
2022-01-27 15:09:08 +00:00
Kevin Ansfield
98eb75ef06 Added member search/filter UI to the members-activity screen
refs https://github.com/TryGhost/Team/issues/1290

- renamed `@updateExcludedEvents` to `@onChange` and updated associated action name so we have consistent naming for our select-like components
- added `<MembersActivity::MemberFilter>` component
  - utilises `<PowerSelect>` with a custom trigger component and  and a debounced search via the member's API
  - does not use `<PowerSelect>`'s default "selected" behaviour in favor of replacing the select with a button to provide a clearer "reset filter" UX that's easier to build/style outside of the power-select components
  - added `.ember-power-select-trigger-reset` class to reset margins, paddings, borders, and heights so that it's easier for a custom trigger's contents to control the display
2022-01-27 15:00:40 +00:00
Sanne de Vries
21b4b15a1c Improved Email newsletter settings page (#2207)
Updated email newsletter settings

- Added toggle to disable email newsletters
- Hides email related UI when email is completely turned off
- Rearranged email newsletter settings
- Added publish-menu preview in 
- Changed default-recipients setting
- Updated publish-menu to show Publish as default action
- Removed the confirmation modal during publishing when no emails are intended to be sent
2022-01-27 12:40:11 +01:00
James Morris
2f935163d5 Added basic activity filter styling with first round icons
refs https://github.com/TryGhost/Team/issues/1277
2022-01-26 17:54:26 +00:00
Sanne de Vries
beca9b13dd Updated Author user profile page and sidebar
No issue

- Authors don't need access to staff page and don't need to see breadcrumbs on their profile page
- There's enough space in the side navigation for the post views to be visible by default
2022-01-26 14:49:55 +00:00
James Morris
50502fa5a8 Styled activity mini-views and full-view to bring closer to design
refs https://github.com/TryGhost/Team/issues/1277
2022-01-26 14:37:34 +00:00
James Morris
f046fd3ccb Removed members column and combined with events in activity
refs https://github.com/TryGhost/Team/issues/1277
2022-01-26 11:19:03 +00:00
James Morris
f63328e2cf Added basic styling with icons for events and tided structure
refs https://github.com/TryGhost/Team/issues/1277
2022-01-26 11:19:03 +00:00
Kevin Ansfield
ee5aae8a90 Switched member activity feed widget from email_recipients to events feed
refs https://github.com/TryGhost/Team/issues/1277

- removed inclusion of `email_recipients` in member query when fetching member for display on the member details screen as it was only used for the activity feed
- added `<Member::ActivityFeed>` template-only component as a replacement for `<GhMemberActivityFeed>`
  - uses `members-event-fetcher` resource for consistency with main activity feed and dashboard widget. Allows for a template-only component because data fetching behaviour can be managed directly from the template rather than requiring a backing component
2022-01-26 10:55:05 +00:00
Rishabh
6d26bdcd1e Fixed enter key behavior on unarchive offer modal
no refs

- updates unarchive task method used on enter key for the unarchive offer popup
- wrong method was causing the enter key to not unarchive the offer as expected
2022-01-26 14:14:42 +05:30
Kevin Ansfield
5211e5f1c9 Fixed spinner flash on fast member activity loads
refs https://github.com/TryGhost/Team/issues/1277

- switched to using the `<GhLoadingSpinner />` component as it has a 200ms delay before it's shown to avoid flashing on fast data changes
2022-01-25 16:53:45 +00:00
Kevin Ansfield
d9e6466106 Removed members activity link from main nav
refs https://github.com/TryGhost/Team/issues/1277

- removed nav item in favor of links only from the dashboard and member details screens
- added params reset to the dashboard link so you don't unexpectedly land back on a member-specific events list
- updated the members activity screen header so it's clearer this is a sub-section of members
2022-01-25 16:40:51 +00:00
Kevin Ansfield
69e7bad5d1 Added member details and hid member column on activity feed when filtered by member
refs https://github.com/TryGhost/Team/issues/1277

- extracted member details display into a `<GhMemberDetails>` component for re-use in the member details and members-activity screens
- added loading of member record from the member id query param and displayed the member details above the table when a member filter is present
- hid the member column in the events table when a member filter is present
  - it's useless/repeated info at that point
2022-01-25 16:40:51 +00:00
Djordje Vlaisavljevic
88e71dec6c Added welcome page input field to edit tier modal
refs https://github.com/TryGhost/Team/issues/1168
2022-01-25 17:04:14 +01:00
Kevin Ansfield
bbf1f38703 Added email preview modal link to activity feed items
refs https://github.com/TryGhost/Team/issues/1277

- used the `<GhEmailPreviewLink>` component to display the email's subject inside the activity feed that when clicked opens the email preview modal
2022-01-25 13:29:14 +00:00
Kevin Ansfield
6dc733ae3a Fixed <GhEmailPreviewLink> default text and whitespace
refs 21f2a58a8a

- passed in arg is `@data` not `@email` because it can be an email or post object
- added `~` handlebars syntax to collapse white-space so links can be surrounded by other chars without spaces being visible, eg `"<GhEmailPreviewLink />"`
2022-01-25 13:27:58 +00:00
Kevin Ansfield
21f2a58a8a Refactored post email preview modal
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Team/issues/1277

- switched modal implementation to the newer promise-modal style
- added `<GhEmailPreviewLink>` component that renders a link that when clicked opens the modal
  - removes the need for templates/controllers to manually handle modal opening/closing and to pass actions down from parents
  - updated all places we were triggering an email preview modal to use `<GhEmailPreviewLink>`
2022-01-25 13:17:05 +00:00
Kevin Ansfield
de93c691cd Added member query param support to members-activity screen
refs https://github.com/TryGhost/Team/issues/1277

- added `member` query param that expects a member ID
  - using an ID as it makes the filtering simpler than using an email because there is no async member fetching required
- updated `filter` generation to build `type` and `member` parts and combine them in an AND query
- updated link in member screen to use a `member` param rather than a `filter` param
  - resets any `excludedEvents` param so all events for the member will be shown when following link from member->members-activity
2022-01-25 12:13:13 +00:00
Kevin Ansfield
acbc4233a8 Humanized event details on members activity screen
refs https://github.com/TryGhost/Team/issues/1277

- moved event parsing from a component to a helper
  - keeps code as a plain function
  - allows for per-event parsing which helps with rendering as we're not rebuilding/re-rendering a whole array each time the events data changes when a new page is loaded
  - updated to include full member and email objects (will be used later for email preview popup)
- updated members-activity table row component to use the event parser helper for better event details
2022-01-25 11:50:10 +00:00
Kevin Ansfield
5da8ee3c76 Switched members event fetcher to use data.created_at as cursor
refs https://github.com/TryGhost/Team/issues/1277

- updated to match API's expected filter format
2022-01-25 10:13:37 +00:00
Kevin Ansfield
05b1d85398 Fixed invalid filter query for members events
refs https://github.com/TryGhost/Team/issues/1277

- we were inadvertently adding an empty string to the excluded events set resulting in a trailing comma in the filter string (`type:-[x,y,z,]`)
2022-01-25 10:12:24 +00:00
Kevin Ansfield
e45dd1c3a7 Fixed "Members activity" nav link losing active class when filtered
refs https://github.com/TryGhost/Team/issues/1290

- added an explicit `current-when="members-activity"` so the active class is not tied to the default behaviour of matching specific query params
2022-01-24 17:44:09 +00:00
Kevin Ansfield
ae8cb00300 Added event filtering UI to members activity screen
refs https://github.com/TryGhost/Team/issues/1290

- changed query param from `filter` to `excludedEvents`
  - exposing filter directly creates problems converting back to NQL after parsing+modifying the query
  - removes suggestion that raw NQL can be manipulated by editing the URL
  - allows us to use a set of well-defined query params to build the underlying filter string from scratch each time a query param changes
- added `<MemberActivity::EventTypeFilter>` that renders a filter button with a dropdown containing a checkbox for each event type
- if no `member` property is set on the members-activity controller (soon to be another query param) any email event types are hidden because the API can't currently paginate those correctly and in any case they would drown out any other type of event
2022-01-24 17:31:32 +00:00
Kevin Ansfield
9c06b5e71f Switched from <= to < in members event pagination
refs https://github.com/TryGhost/Team/issues/1277

- using `<= created_at` requires client-side deduplication to prevent the same records appearing in the next page
- using `< created_at` does result in a possibility of records being missed between pages with the API's current pagination behaviour if many events occur within the same second but for our current requirements (no email events shown unless filtering by specific member) that is edge-case enough that simplified client code is preferable
2022-01-24 11:01:42 +00:00
Fabien "egg" O'Carroll
9c139a78e4 Removed Archived Tiers from Portal settings
refs https://github.com/TryGhost/Team/issues/1252

Archived Tiers are no longer able to be signed up to, and should not be
shown in Portal
2022-01-24 12:12:15 +02:00
Kevin Ansfield
5f51310714 Removed unused membersActivity service
refs https://github.com/TryGhost/Team/issues/1277

- fetching member event data is now handled by the `members-event-fetcher` resource as that gives better ergonomics for data loading in templates
2022-01-22 16:06:39 +00:00
Kevin Ansfield
b5db0d57d9 Updated dashboard member activity widget to use fetcher resource
refs https://github.com/TryGhost/Team/issues/1277

- re-uses same fetcher resource used on member activities screen
  - allows for component to be simplified as it no longer needs to care about handling data loading itself
  - drops use of 1-minute data caching as there is no real need for it in typical usage and can be confusing when the dashboard didn't update as expected
- exposed error message on `members-event-fetcher` if one is encountered
2022-01-22 16:04:54 +00:00
Kevin Ansfield
08538bbb0b Fixed linter error
refs a45f80fa82

- removed unused import left over from development testing
2022-01-22 15:38:25 +00:00
Kevin Ansfield
a45f80fa82 Added fetching of member events to members-activity screen
refs https://github.com/TryGhost/Team/issues/1277

- added `ember-could-get-used-to-this` dependency to get access to Resources
  - context: https://www.pzuraq.com/introducing-use/
- added MembersEventFetcher resource for loading members events
  - using a Resource allows for a better data loading experience using only components
  - uses raw data from the API rather than going through Ember Data because we don't need full models or session-length caching that gives us
  - data is kept around in memory for the lifecycle of the resource, if the `filter` param changes the resource is torn down and recreated so it starts from page 1 again, once it's no longer used by a component it's torn down so data isn't kept around
  - paginates by using a `created_at:<={lastSeenTimestamp}` filter - this assumes the API can handle that effectively as a cursor with no duplicate or skipped records
- updated `members-activity` template to use the new resource and control data loading using infinite scroll
- moved overall screen structure from the `<MembersActivity::Table>` component into the `members-activity` template so that the table component can stay focused on just the table display
2022-01-22 15:35:08 +00:00
Kevin Ansfield
d51e25888d Resolved ember-simple-auth deprecations
no issue

- many "The automatic session initialization is deprecated" were shown in test output due to an old method of initializing the session service
- switched to explicit session setup in the application route's `beforeModel` hook
- https://github.com/simplabs/ember-simple-auth/issues/2314
2022-01-22 00:30:56 +00:00
Kevin Ansfield
b71babfc51 Updated Ember dependencies to 3.22 (#2220)
no issue

- bumped `ember-source`, `ember-data`, and `ember-cli` to latest 3.22.x versions
- fixed errors caused by updating properties inside of a render
  - `<GhPublishMenu>` removed insta-call of `@setSaveType` when rendering sub-components in favour of pre-setting the default `@saveType` value when the underlying post status changes
  - updated `<GhNavMenu>` to use the run-loop to update the `firstRender` property once rendering has finished rather than mid-render
2022-01-22 00:05:05 +00:00
Kevin Ansfield
57b1ab4800 Ran ember-cli-update --run-codemods (#2219)
no issue

- part of ember upgrades
- removed all unnecessary usage of `.get`
- cleaned up imports where we had imports from the same module across multiple lines
- standardized on importing specific computed helpers rather than using `computed.foo`
- switched tests from using `wait()` to `settled()`
2022-01-21 19:25:47 +00:00
Kevin Ansfield
d494e01d6b Updated <MemberActivityEventParser> to handle email events
refs https://github.com/TryGhost/Team/issues/1277

- if email events were passed through the parser they had blank actions and objects
- added `opened`, `received`, and `failed to receive` actions for email events
- changed object to equal `an email` for any email events
2022-01-21 18:15:06 +00:00
Kevin Ansfield
ec6a5637e8 Added data-cache service for managing limited-lifetime cached data
refs https://github.com/TryGhost/Team/issues/1277

- `data-cache` service has a `.set(key, data, lifetime)` method that will store the data under the key and sets a timeout that will remove the data when the lifetime expires
  - data can be retrieved with `.get(key)`
  - allows for components to cache data for use when re-rendering without having to worry about keeping track of their state and it's expiration manually somewhere else
- moved caching concern out of the `members-activity` service and into the latest-member-activity dashboard component which is the one that cares about it's data and cache lifetime
  - frees the `members-activity` service up to be more generic as it's no longer tied to the dashboard component's concerns
  - component switched to using a task rather than a promise so it is automatically cancelled if it's destroyed before data fetching is complete
2022-01-21 18:15:06 +00:00
Fabien "egg" O'Carroll
98030859a5 Removed archived Tiers from complimentary select
refs https://github.com/TryGhost/Team/issues/1252

Archived Tiers should not be able to be used to create new subscriptions.
2022-01-21 15:42:33 +02:00
Sanne de Vries
4404dc179f Revert "Updated Author & Contributor views"
This reverts commit 8bcb534feb.
2022-01-21 13:01:52 +00:00
Sanne de Vries
0ddca821d6 Revert "Updated profile page for Authors & Contributors"
This reverts commit c5940ab57b.
2022-01-21 12:46:27 +00:00
Sanne de Vries
c5940ab57b Updated profile page for Authors & Contributors
No ref

- Removed breadcrumbs when profile page is loading
- Redirected Authors and Contributors to profile page when accessing /staff
2022-01-21 11:35:02 +00:00
Rishabh
941d4de4af Fixed default currency for new tier creation
no refs
2022-01-21 12:34:39 +05:30
Kevin Ansfield
c24bd50f10 Refactored <GhMembersRecipientSelect> to auto-update on @filter change
no issue

- we want to re-use this component as display-only on the email newsletter settings screen but the previous component design meant that changes to the `@filter` argument did not update the display
- moved to using getters for the internal base/specific filter Set instances so they are auto-updated when the `args.filter` param changes
- updated the `toggleSpecificFilter` action to store the current specific filter as temporary internal state when toggled off so it can be re-filled when toggling back on
  - this interaction was why the component state had previously been disconnected from the `@filter` param
- moved filter string generation into an explicit `updateFilter` method that is called when any action occurs that should update the filter string. Changes to the filters are passed in as arguments so that we call the passed in action which will then update the `@filter` argument and the component state can react accordingly
2022-01-19 14:29:49 +00:00
Kevin Ansfield
92ece7b373 Refactored member activity list components
refs https://github.com/TryGhost/Team/issues/1277

- renamed `<GhActivityTimeline>` to `<GhMemberActivityEventParser>` and modified so that it yields parsed events rather than directly renders them
  - makes the component re-usable as it can be used to decorate raw events ready for use in context-specific templates
  - switches to using a getter to yield the parsed events so that they will update automatically when the `@events` argument changes
- updated `<Dashboard::LatestMemberActivity>` to use `<GhMemberActivityEventParser>` and keep the member activity box output local to itself
- added integration tests for `<Dashboard::LatestMemberActivity>`
  - added Mirage setup for member activity event models/serializers/route
2022-01-19 12:58:09 +00:00
Sanne de Vries
8bcb534feb Updated Author & Contributor views
No ref

- Switched sidebar post navigation to be always open
- Removed breadcrumbs from profile page
2022-01-19 11:24:07 +00:00
Rishabh
e142812a68 Refined free tier UI
refs https://github.com/TryGhost/Team/issues/1037

- added default currency to free tier card
- updated benefit placeholder for free tier
- updated description placeholder for free tier
2022-01-19 13:04:08 +05:30
Djordje Vlaisavljevic
19b232640e Updated the placeholders and headings for edit free membership modal
refs https://github.com/TryGhost/Team/issues/1029
2022-01-19 02:19:51 +01:00
Kevin Ansfield
0fd16d504d Fixed linter error
refs 4b3fc52cf0

- removed errant console.log
2022-01-18 15:26:16 +00:00
Kevin Ansfield
4b3fc52cf0 Extracted dashboard member activity into separate component
refs https://github.com/TryGhost/Team/issues/1277

- first step of further refactoring to make member activity display more generic
- separates component data loading from overall controller logic and allows it to be tested in integration tests as well as acceptance tests
2022-01-18 15:16:22 +00:00
Kevin Ansfield
93b4262db5 Extracted member activity fetching into new service
refs https://github.com/TryGhost/Team/issues/1277

- pulled timeline fetching from `members-stats` service to `members-activity` service ready for further refactoring to make fetching/processing more generic
2022-01-18 13:55:42 +00:00
Peter Zimon
6579d8de5c Removed extra mobile class from Members list header 2022-01-18 12:55:57 +01:00
Peter Zimon
7f384b8516 Fixed members list header Safari bug 2022-01-18 12:55:57 +01:00
Sanne de Vries
23da2a57fe 🐛 Fixed modal to invite staff users not scrolling in Safari & Chrome
Closes https://github.com/TryGhost/Ghost/issues/13975
2022-01-18 11:28:51 +00:00
Daniel Lockyer
0f2faed20c Updated database warning wording
refs https://github.com/TryGhost/Toolbox/issues/175

- both cases now show the same message so I've reverted back to
  returning a boolean indicating whether it should be shown
- also pulls out the check for Pro so the if-statements are easier to
  read
2022-01-18 11:10:25 +00:00
Rishabh
209d3662d4 Fixed incorrect price amount formatting
no refs

- price amount formatting was incorrectly calling `toFixed` method on a string, which is not needed as we already round off the amount before formatting
2022-01-18 15:16:09 +05:30
Daniel Lockyer
4994e27838 Refined database warning message to reflect specific versions
refs https://github.com/TryGhost/Toolbox/issues/175
refs c4083967df

- the referenced commit added a warning message to the What's New page
  to notify the user that we're going to be requiring MySQL 8 in
  production as of v5
- this would also show if the user was already using MySQL 8, which
  isn't ideal
- I've added a library to Ghost which will return the specific version
  of MySQL used, so we can now detect that
- eb68e8d339 has updated the config endpoint to return `mysql5`, `mysql8` etc,
  so we can now change the logic here to reflect that
- this commit also adds another warning if we're in development mode and
  using mysql5, as this will not be supported as of v5
2022-01-18 09:41:04 +00:00
Rishabh
f47fee86e2 Refined free tier card usage
refs https://github.com/TryGhost/Team/issues/1037

- adds free tier card behind multiple tiers flag
2022-01-18 00:26:56 +05:30
Rishabh Garg
86b55b0f81 Added new free tier card with custom description/benefits (#2203)
refs https://github.com/TryGhost/Team/issues/1037

Adds new free tier card with option to add custom description and benefits for free tier, behind the tiers beta flag. Also:

- updates formatting of tier prices
- changes "Free" section to "Default"
- updates price formatting of membership tiers in admin
- updates currency code handling for product card
- updates default paid product handling

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-01-18 00:23:43 +05:30
Kevin Ansfield
eb2109499a Added initial setup of members activity feed
refs https://github.com/TryGhost/Team/issues/1277

- added `/members-activity` route with associated controller, template, and components behind labs flag
  - table component currently renders some dummy rows
- added navigation item to main menu
  - will use the currently set `?filter` query param unless clicked whilst already on the `/members-activity` screen in which case it will reset the query
- added link to dashboard members activity panel
- added link to member details activity panel
  - sets the filter param to `?filter=member:{member.id}` in preparation for the feed to be filtered to the member's activity
- updated the labs-flag test helper file to export both `enableLabsFlag()` and the new `disableLabsFlag()` so it's easier to test for flag-disabled functionality
2022-01-17 18:06:12 +00:00
James Morris
d1dba088ba Fixed audio card in What's New at narrow widths and header pop ups
- adjusted min and max widths of various elements in audio card in What's New only to stop it from visually breaking when at specific viewport widths
- quick fixes for z-index of certain elements across cards in What's New only so they didn't appear above the page header
2022-01-17 17:37:09 +00:00
Kevin Ansfield
daedbae155 Added membersActivityFeed alpha labs flag
refs https://github.com/TryGhost/Team/issues/1277

- used for prototyping a separate activity feed screen that can show all members activity, combining the events shown in the dashboard with the email events shown on the member screen
2022-01-17 12:24:40 +00:00
Kevin Ansfield
75abe76346 Migrated route objects to native class syntax
no issue

- ran the `ember-native-class-codemod` codemod to convert just the route classes to native class syntax and performed some minor manual cleanup
  - modern Ember uses native classes rather than EmberObject-based objects, this brings us closer to normalizing our code style across the codebase
- skipped the Application route as that requires deeper testing with a replacement for the `ShortcutsRoute` mixin
2022-01-17 10:06:57 +00:00
Kevin Ansfield
d09db70f43 Refactored use of ShortcutsRoute mixin on editor screen
no issue

- mixins are deprecated in Ember so we want to remove their usage
  - pre-requisite for easier automation for switching to native class syntax
- removed ShortcutsRoute mixin in favor of using the `{{on-key}}` modifier and standard controller action
2022-01-17 10:06:57 +00:00
Kevin Ansfield
c868dd6224 Refactored use of ShortcutsRoute mixin on tags screen
no issue

- mixins are deprecated in Ember so we want to remove their usage
  - pre-requisite for easier automation for switching to native class syntax
- removed ShortcutsRoute mixin in favor of using the `{{on-key}}` modifier and standard controller action
2022-01-17 10:06:57 +00:00
Kevin Ansfield
683a8584ce Refactored away CurrentUserSettings mixin (#2200)
no issue

Mixins are deprecated in Ember so we want to remove their usage. The `CurrentUserSettings` mixin was used in Route files to provide `transitionAuthor()` (that also transitions contributors) and `transitionEditor()` methods so the the consuming route could use them to prevent access to authors/editors. In practice the only reason this was used was to prevent access to admin-only routes.

- added an `AdminRoute` class that inherits from our `AuthenticatedRoute` class
  - when any route inherits from this class it will only allow access to admins and owners, any other user will be redirected to the home screen (dashboard or site depending on permissions)
- updated all of our admin-only routes to use the new `AdminRoute`
  - allowed for removal of `CurrentUserSettings` mixin usage
  - allowed for `beforeModel()` hooks to be removed from consuming routes in many cases
  - some admin-only routes were extending/inheriting directly from Ember's `Route` based on the assumption that the router hierarchy would have a parent route perform the redirect. Those have also been switched to `AdminRoute` for consistency and to prevent accidentally making them available if the router hierarchy changes
  - `/#/settings` does not use the `AdminRoute` so that it can redirect to the current user's setting page for non-admin users
- removed `CurrentUserSettings` mixin file
- cleaned up unnecessary computed property and function used for redirect-when-disabled in the Zapier route
2022-01-17 10:05:27 +00:00
Kevin Ansfield
f1e74516ac Cleaned up unused theme routes
no issue

- the controllers and templates for the old theme setting screens have been removed already but the route files had been missed in the cleanup
2022-01-14 19:09:58 +00:00
Kevin Ansfield
c4083967df 💡 Added database upgrade warning for required MySQL 8 in Ghost 5.0
no issue

- Ghost 5.0 will require MySQL 8 when running in production so we've added a warning to the whats new/about screen to give some visibility for self-hosters to prepare
- updated `whatsnew` controller to native class syntax
2022-01-14 13:27:32 +00:00
Kevin Ansfield
4e9a78c36d Cleaned up unused branding modal
no issue

- the branding modal was a hangover from before the design settings screen that hadn't been fully removed after the newer settings screen was released
2022-01-13 13:31:32 +00:00
Kevin Ansfield
d0f6dd7fef Refactored custom integration creation and limits modals
refs https://github.com/TryGhost/Team/issues/559

- switched to new ember-promise-modals pattern
- removed controller and template in favor of opening modals directly from the route
- removed unused `mousedown` event handlers - they are only necessary when an input blur would trigger validation errors
- fixed Enter key not triggering create action by adding an `{{on-key "Enter"}}` event handler to the name input
- fixed scroll not resetting to top of integrations screens when navigating between them by adding `{{scroll-top}}` element modifier to the main content sections
2022-01-13 13:16:13 +00:00
Kevin Ansfield
6a43cb27c3 Refactored leave-editor confirmation modal
refs https://github.com/TryGhost/Team/issues/559

- switched to new ember-promise-modals pattern
- simplified `willTransition` handling because we can now wait on the promise returned from opening the modal
  - the modal content was changed to use `{{on "click" (fn @close true)}}` on the "leave" button so we can check for that return value for leave confirmation
2022-01-12 10:18:25 +00:00
Kevin Ansfield
d3cebeec50 Refactored search modal
refs https://github.com/TryGhost/Team/issues/559

- changed modal to use new modal pattern
- fixes padding jump when opening due to improved animation behaviour not using duplicated elements
2022-01-11 17:59:48 +00:00
Kevin Ansfield
e8cb144317 Renamed offer modals
no issue

- offer-related modals were split across the top-level `modals` directory and the `modals/offers` directory
- normalized to the `modals/offers` directory
2022-01-11 17:45:10 +00:00
Kevin Ansfield
06aaf09336 Refactored <GhSearchInput>
no issue

- converted component to glimmer component and native class syntax
- reduced duplication by adding a description of each searchable model that is then used for data loading and searching
- removed convoluted use of computed properties as they weren't needed - the result of the search function is used by `<PowerSelect>` directly so we don't need any tracking/automated re-rendering
2022-01-11 17:35:32 +00:00
James Morris
adcd957eca Added a gradient for post list tables that works in dark mode
- in dark mode, the nice gradient to the left didn't show but this fixes that so matches light mode
2022-01-11 11:56:23 +00:00
Djordje Vlaisavljevic
54ca2a53d2 Changed Apple touch icon to the new Ghost logo
There's been some changes since iOS 7, so this commit also changes the <link> tag to reflect that.
2022-01-11 12:47:50 +01:00
James Morris
158bf6393e Fixed gradient showing for every column in Safari
- hovering over post lists showed a gradient for every column in Safari
- targetted the gradient differently which seems to fix issue for all browsers
2022-01-11 11:42:23 +00:00
James Morris
c8ee93c2e2 Fixed up icons in bottom nav for mobile when in dark mode
- fixes the colour of buttons when active in dark mode
- fixes the more icon when in dark mode
- uses css variables rather than fixed values
2022-01-10 09:11:35 +00:00
Daniel Kreiseder
fb45c57932 Fix kbd Tag color in dark mode (#2176)
refs: TryGhost#13616
From danimajo "fix the text color of the kdb tag in dark mode to dark text"
2022-01-07 18:12:27 +00:00
Rishabh
c3bb7163cf 🐛 Fixed broken Zapier links in Admin integration page
refs https://github.com/TryGhost/Team/issues/1270

- Zapier template links for example pre-built templates were broken due to a bug with Zapier
- updates links to use new zap creation template link which works
2022-01-07 17:12:39 +05:30
James Morris
3429ac6934 Fixed various tiny tweaks for members scrollable table
- double scrollbars showing at certain widths
- strange resizing of search members text box
- borders showing through when scrolling
- tidying table horizontal scrolling when viewport is narrower
2022-01-07 10:59:15 +00:00
Kevin Ansfield
73a6354135 Fixed "calling .set on destroyed object" error in gh-image-uploader tests
refs https://github.com/TryGhost/Admin/pull/2041

- the pretender upgrade highlighted an issue with the component's progress event handler where it could fire and attempt to set the progress property after the component has been destroyed
2022-01-06 10:20:06 +00:00
Kevin Ansfield
cdbba8530f Fixed ?search= empty param after members bulk delete
no issue

- the members query reset was using `""` rather than `null` due to a bug in an old version of search/filtering but that meant we could end up with an empty param
- switched to `null` as it no longer appears necessary to use a blank string, this matches behaviour of other params
2022-01-05 12:52:12 +00:00
Kevin Ansfield
7b41a0c2cc Fixed incorrect filter param being used after members import
no issue

- after importing members a filter is applied to the members list only shows imported members
- the query param used for this was still using an old format which correctly updated the list but meant that the filter selection UI was left in a bad state that didn't correctly show the selected label or allow easy clearing of the bad filter
2022-01-05 12:52:12 +00:00
Kevin Ansfield
f1bcb073a3 🐛 Fixed incorrect automatic CSV download when bulk-deleting members
closes https://github.com/TryGhost/Team/issues/1265

- we were generating the correct query params for the export endpoint but those query params weren't applied to the export URL before fetching it meaning the default GET behaviour of listing first 15 members was always being used when generating the backup CSV
2022-01-05 12:21:52 +00:00
Kevin Ansfield
6a673ce8e1 🐛 Fixed confusing wording change whilst saving in publish confirmation modal
no issue

- after clicking the "Publish and send" button in the publish confirmation modal the post is saved and an email is created which caused the wording to change to automatically switch to the "publish only" state because posts with existing emails can't be sent again
- changed the wording-choice data to be set statically based on data available when the modal is triggered rather than auto-updated based on overall system state
2022-01-04 18:05:34 +00:00
Kevin Ansfield
f56b52b8a1 Cleaned up headerCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals as feature is GA
2022-01-04 14:58:19 +00:00
Kevin Ansfield
8e9748131c Cleaned up fileCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals as feature is GA
2022-01-04 14:57:01 +00:00
Kevin Ansfield
29324f1a24 Cleaned up filesAPI labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and toggle UI as feature is GA
2022-01-04 14:55:39 +00:00
Kevin Ansfield
f40bff35de Cleaned up membersAutoLogin labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and toggle UI as feature is GA
2022-01-04 14:54:31 +00:00
Kevin Ansfield
06c7997ad9 Cleaned up mediaAPI labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and toggle UI as feature is GA
2022-01-04 13:09:57 +00:00
Kevin Ansfield
6c18628b8b Cleaned up audioCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 13:08:50 +00:00
Kevin Ansfield
f118b78113 Cleaned up richTwitterNewsletters labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and toggle UI
2022-01-04 13:05:52 +00:00
Kevin Ansfield
b8b40fafef Cleaned up productCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 13:04:26 +00:00
Kevin Ansfield
aeb0cb60e8 Cleaned up accordionCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 13:03:08 +00:00
Kevin Ansfield
a9a82107ed Cleaned up videoCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 12:57:42 +00:00
Kevin Ansfield
7a270de050 Cleaned up calloutCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 12:56:25 +00:00
Kevin Ansfield
0fcf89b1fa Cleaned up nftCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 12:55:04 +00:00
djordje vlaisavljevic
13d3d3ab14 Update product card title style in editor
refs https://github.com/TryGhost/Team/issues/1245
2022-01-04 13:29:37 +01:00
Peter Schulz
c433b567a4 Updated revenue number on membership settings (#2182)
no-ref

- Creators on Ghost have surpassed $12 million in revenue per year. We're updating the membership settings page to reflect that
2022-01-04 08:52:58 +00:00
Kevin Ansfield
40a48c1e99 Cleaned up customThemeSettings feature flag
refs https://github.com/TryGhost/Team/issues/1164

- removed flag and labs screen toggle
- removed all conditionals
- removed all old/unused route/controller/component files
- renamed labs components and classes to non-labs naming
2022-01-03 14:09:27 +00:00
Fabien egg O'Carroll
da189578bb Aligned cursor to left when header is empty
refs https://github.com/TryGhost/Team/issues/1253

Using text-align: left will shift our cursor to the left of the editor,
but this does not match up with the placeholder text, so we need to use
media queries and some CSS calculations for that.

Zimo did the CSS magics for this
2021-12-17 12:10:46 +02:00
Peter Zimon
fa29e50c7d Updated responsive styles for headers in Koenig 2021-12-17 10:09:38 +01:00
Peter Zimon
a8822a4a50 Updated what's new styles for header card 2021-12-17 09:43:57 +01:00
Peter Zimon
d9fa12a329 Fixed cursor blink bug in header subheading 2021-12-17 03:56:10 +01:00
Thibaut Patel
5056401c13 Renamed the header styles
refs https://github.com/TryGhost/Team/issues/1253

- The naming is easier to understand for theme developers
2021-12-16 18:22:08 +01:00
Fabien egg O'Carroll
83cbc6e72a Disabled links inside the header card
refs https://github.com/TryGhost/Team/issues/1253

These should not be clickable at all inside the editor, regardless of
whether or not the card is selected.
2021-12-16 18:59:18 +02:00
Peter Zimon
4667659211 Updated link styles for headers 2021-12-16 16:58:53 +01:00
Peter Zimon
79a0328105 Updated dark styles for header card 2021-12-16 16:32:54 +01:00
Peter Zimon
384b905eb3 Updated header placeholder text colors 2021-12-16 16:15:42 +01:00
Peter Zimon
b6da19df65 Updated header card placeholders 2021-12-16 16:11:50 +01:00
Peter Zimon
22eac4e86f Applied styles to various headers 2021-12-16 15:37:24 +01:00
Peter Zimon
7311c2bf7b Updated header paddings 2021-12-16 13:03:24 +01:00
Peter Zimon
c4c728d7a1 Refined header image styles 2021-12-16 12:59:03 +01:00
Peter Zimon
c018abb8cb Removed jump bug from header card subheading in edit mode 2021-12-16 12:39:27 +01:00
Peter Zimon
9afb0c7a94 Updated style picker for header 2021-12-16 12:25:01 +01:00
James Morris
cc55fa340e Quick attempt to fix up the placeholders for headers in editor
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 19:24:27 +00:00
James Morris
47e77ddcdc Little tweaks for header settings panel and added add icon
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 19:09:17 +00:00
James Morris
f031f6d2b4 Added small tweaks for header styles in editor
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 18:39:45 +00:00
Fabien egg O'Carroll
ee410a08c1 Updated slider for before/after to match frontend
refs https://github.com/TryGhost/Team/issues/1249

Adds a new element to use as the slider handle to match how we're doing
it in the frontend
2021-12-15 20:27:39 +02:00
James Morris
8c43671f77 Applied more advanced styles to the header card
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 17:42:54 +00:00
Peter Zimon
733b09b514 Added file card styles to what's new page 2021-12-15 17:47:29 +01:00
Peter Zimon
4f005f0ef5 Updated file card Koenig styles 2021-12-15 17:45:04 +01:00
Peter Zimon
4506dae3b3 Applied card styles to What's new page 2021-12-15 17:06:18 +01:00
James Morris
88ddcfeeff Improved the editor styles for header card
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 12:21:19 +00:00
James Morris
89a766bca1 Basic styling used for the older class names for new header card
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 11:58:47 +00:00
Peter Zimon
dd7066f23b Fixed input visual bug for file card in Koenig 2021-12-15 12:17:39 +01:00
Fabien egg O'Carroll
b031d8494c Centered before/after card within the editor
refs https://github.com/TryGhost/Team/issues/1249

When images are used which do not fill the space of the card - e.g. when
using a fullwidth card the slider is positioned to the left and doesn't
look good.
2021-12-15 12:07:22 +02:00
Fabien egg O'Carroll
cb24aa1914 Added replace image functionality
refs https://github.com/TryGhost/Team/issues/1249

This can resuse the image selection as after a successful upload the
image is replaced.
2021-12-15 12:06:46 +02:00
Thibaut Patel
e1bbc63bb3 Updated header card class names
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 10:02:17 +01:00
Sanne de Vries
b640a023f7 Refined video card in editor
Refs https://github.com/TryGhost/Team/issues/1229

- Fixed glitch on load
- Fixed error state
- Hid custom thumbnail when video is looped
2021-12-14 19:49:29 +01:00
Peter Zimon
526c92bad7 Refined file Koenig styles 2021-12-14 17:55:27 +01:00
Peter Zimon
09b221543f Updated file upload Koenig styles 2021-12-14 17:41:41 +01:00
Thibaut Patel
3742502f2d Updated the header card based
refs https://github.com/TryGhost/Team/issues/1253

- follows the latest design
2021-12-14 16:00:59 +01:00
Fabien egg O'Carroll
d3ee36e45d Moved image upload and slider settings into card
refs https://github.com/TryGhost/Team/issues/1249

Based on design wirefames
2021-12-14 16:40:51 +02:00
Sanne de Vries
7a74e83582 Updated video card player
Refs https://github.com/TryGhost/Team/issues/1229
2021-12-14 13:13:28 +01:00
Sanne de Vries
69aa98f9ca Updated video card and media player classes
Refs https://github.com/TryGhost/Team/issues/1229
2021-12-14 11:49:33 +01:00
Sanne de Vries
a011ee2d97 Updated video card settings panel
Refs https://github.com/TryGhost/Team/issues/1229
2021-12-14 09:37:45 +01:00
Thibaut Patel
f8caa3adce Added a first pass of the header card
refs https://github.com/TryGhost/Team/issues/1253
2021-12-13 19:31:23 +01:00
Sanne de Vries
6df5708c7f Refined audio and bookmark cards in editor
Refs https://github.com/TryGhost/Team/issues/1230
2021-12-13 19:09:00 +01:00
Sanne de Vries
06cb582fc0 Refined audio cards in editor
Refs https://github.com/TryGhost/Team/issues/1230
2021-12-13 16:18:32 +01:00
Fabien egg O'Carroll
12582c6cf4 Added initial Before/After card UI
refs https://github.com/TryGhost/Team/issues/1249

This adds a WIP for the Before/After card UI - behind an alpha flag.
It's completely missing design input and is intented to serve as a base
to work from.
2021-12-13 15:57:29 +02:00
Fabien egg O'Carroll
3b1696c57d Added check for payload property on error
no-issue

If the onUploadStart or onUploadSuccess methods error, and the error
does not contain a payload property then we recieve an opaque error
message which can be difficult to understand.
2021-12-13 15:57:29 +02:00
Fabien egg O'Carroll
1b9854b99f Added ability to attach metadata to uploads
no-issue

Currently the onUploadSuccess and onUploadFailure have no way to
identify which upload has succeeded or failed other than the filename.
However the filename is not guaranteed to be unqiue, so this can cause
bugs.
2021-12-13 15:57:29 +02:00
Sanne de Vries
f788cd6dfa Removed unnecessary hidden audio player buttons
Refs https://github.com/TryGhost/Team/issues/1230
2021-12-13 14:09:39 +01:00
djordje vlaisavljevic
ed18ca0bf3 Updated editor styles for product card
refs https://github.com/TryGhost/Team/issues/1245
2021-12-13 12:23:08 +01:00
Thibaut Patel
d91f2d253e Added headerCard feature flag
refs https://github.com/TryGhost/Team/issues/1253

- developer flag for enabling header cards in the card menus
2021-12-13 12:20:58 +01:00
Sanne de Vries
26265b6a11 Updated video card in editor
Refs https://github.com/TryGhost/Team/issues/1229
2021-12-13 11:43:11 +01:00
Sanne de Vries
2fe1ee2729 Fixed audio card responsive and dark mode issues
Refs https://github.com/TryGhost/Team/issues/1230
2021-12-13 09:09:27 +01:00
Kevin Ansfield
59def266de Fixed video card aspect ration change when uploading custom thumbnail
refs https://github.com/TryGhost/Team/issues/1229

- changed the video card image so it uses an aspect-ratio box set to the aspect ratio of the video, with the image using `object-fit: cover` to match the background image behavior in the front-end
2021-12-10 19:48:28 +00:00
Peter Zimon
6800a3fdb4 Updated file card styles in Koenig (#2175)
Added styles for file card in editor
2021-12-10 19:17:11 +01:00
Rishabh
ead37ff8c7 Refined audio card player slider design
refs https://github.com/TryGhost/Team/issues/1230

- updates seek position on audio player to 0 to match the current duration
2021-12-10 01:26:18 +05:30
Sanne de Vries
00d9d200f7 Added static player UI to video card
Refs https://github.com/TryGhost/Team/issues/1229
2021-12-09 16:22:58 +00:00
Rishabh
49aab60795 Added first version for new file card
refs https://github.com/TryGhost/Team/issues/1231
2021-12-09 20:30:28 +05:30
djordje vlaisavljevic
c605d92843 Updated editor styles for product card
refs https://github.com/TryGhost/Team/issues/1245
2021-12-09 13:40:52 +01:00
Kevin Ansfield
35c8be787c Changed confirm publish modal wording
refs https://github.com/TryGhost/Team/issues/1169

- switched from "no members" to "0 members"
2021-12-09 12:12:46 +00:00
Rishabh
69b06c49d2 Fixed title editing not working on audio card
refs https://github.com/TryGhost/Team/issues/1230
2021-12-09 00:38:19 +05:30