Commit Graph

1793 Commits

Author SHA1 Message Date
Kevin Ansfield
f1c8af662f Refactored modal for bulk unsubscribing members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full bulk unsubscribing logic out of the members controller and into the modal so logic is contained in one place
2022-02-09 22:04:02 +00:00
Kevin Ansfield
8052166cbe Refactored modal for bulk deleting members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full label-removing logic out of the members controller and into the modal so logic is contained in one place
2022-02-09 22:04:02 +00:00
Kevin Ansfield
efb7bc4c3b Refactored modal for bulk removing a label to members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full label-removing logic out of the members controller and into the modal so logic is contained in one place
2022-02-09 21:58:59 +00:00
Kevin Ansfield
24b222e927 Refactored modal for bulk adding a label to members
refs https://github.com/TryGhost/Team/issues/559

Members controller was becoming bloated and difficult to follow due to catering for many different concerns.

- converted old modal to newer promise-modal style
- pulled full label-adding logic out of the members controller and into the modal so logic is contained in one place
- added `{{members-count-fetcher}}` resource that allows for member counts to be fetched directly from templates avoiding duplicated code
2022-02-09 21:58:59 +00:00
James Morris
510b115329 Better styling for the Finishing Touches screen
refs: https://github.com/TryGhost/Team/issues/1303

- fixed glaring styling issues after technical implementation
- got to a place for testing, though small issues remain
2022-02-09 18:10:02 +00:00
Kevin Ansfield
8cc4c6c4a1 Dropped ember-concurrency-decorators dependency
no issue

- since `ember-concurrency@2.0` it's possible to use the standard imports as decorators removing the need for the extra `ember-concurrency-decorators` dependency and imports
2022-02-09 10:49:38 +00: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
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
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
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
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
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
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
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
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
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
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
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
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
Peter Zimon
b5995419dc Updated default redirect for contributors 2022-02-02 10:12:16 +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
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
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