Commit Graph

8572 Commits

Author SHA1 Message Date
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
b38e21995a Fixed Cmd+S not saving on membership and members email setting screens
no issue

- routes no longer automatically trigger save for cmd+s, it should be explicitly tied to the action that should be performed
- added `{{on-key "cmd+s"}}` to the `<GhTaskButton>` save buttons
  - `{{on-key}}` with no explicit action triggers a click action on the attached element, in this case the screen's save buttons
2022-02-09 10:59:12 +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
Sanne de Vries
1e081aa000 Fixed test 2022-02-09 10:56:21 +01:00
Gabriel Csapo
4a6e175615 [chore] migrate app/controllers/settings/navigation.js to use native classes (#2254)
refs https://github.com/TryGhost/Ghost/issues/14101
refs https://github.com/TryGhost/Admin/pull/2245

- continuing migration to native classes with use of `@classic` decorator
- required as a part of https://github.com/TryGhost/Admin/pull/2245
2022-02-09 09:53:38 +00:00
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
Gabriel Csapo
f75d88cb2c [chore] migrates koenig-editor files to native classes (#2251)
refs https://github.com/TryGhost/Ghost/issues/14101

- continuing migration to native classes with use of `@classic` decorator
2022-02-09 09:19:45 +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
renovate[bot]
c75961a368 Update dependency ember-concurrency to v2.2.1 (#2255)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-09 09:10:21 +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
renovate[bot]
8be8eb05bc Update dependency tracked-built-ins to v2 (#2146)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-08 08:58:18 +00:00
renovate[bot]
21fafd08fd Update dependency ember-modifier to v3 (#2123)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-08 08:54:14 +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
renovate[bot]
d67cffa76b Update dependency ember-css-transitions to v3 (#2249)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-08 08:28:25 +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
renovate[bot]
7a07c431fc Update dependency @tryghost/kg-parser-plugins to v2.11.4 (#2248)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-08 00:15:30 +00:00
renovate[bot]
3a95e8bd8e Update dependency @tryghost/kg-clean-basic-html to v2.2.8 (#2247)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-07 21:21:41 +00:00
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
9459ad068f Updated linter todo file
refs 018a4ec5e9

- ran `yarn lint:hbs` to update the todo list for errors that were resolved in the `<GhUnsplash>` glimmer component refactor
2022-02-07 16:58:36 +00:00
Kevin Ansfield
c55084eeb4 🐛 Fixed Ctrl+Enter-to-edit keyboard shortcut not working on Windows for some editor cards
no issue

- Callout, Email, Email CTA, Header, Product, and Toggle cards all had the same typo in the Ctrl/Cmd+Enter keyboard handling
2022-02-07 16:55:01 +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
Kevin Ansfield
4ad99dadc4 Disabled linting rule that forbids use of <style> elements
no issue

- rule: https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-forbidden-elements.md
- we need to use `<stye>` in our application template to allow use of dynamic CSS variables
- the whatwg html spec says `<style>` is not valid inside `<body>` but all of the browsers we care about support it
2022-02-07 15:22:32 +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
19023a17a0 Disabled "no-inline-styles" template lint rule
no issue

- in general we only use inline styles when it reduces maintenance problems so the rule was providing too many false negatives
2022-02-07 10:21:03 +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
Daniel Lockyer
799dadd533 v4.35.0 2022-02-04 16:00:26 +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
bc1cede1f4 Updated lint todo file
refs https://github.com/TryGhost/Team/issues/1252
2022-02-04 14:58:47 +01:00
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
213170feaf Update .lint-todo
refs 019b22caa1

- the linter error had been fixed but the todo wasn't removed
2022-02-04 10:32:06 +00:00