Commit Graph

56 Commits

Author SHA1 Message Date
Peter Zimon 86c08eaf88
Email settings design update (#2359)
Updated Email settings and Portal settings design to make it more scalable and more consistent with the rest of the Admin.
2022-04-28 10:24:12 +02:00
Kevin Ansfield 981f1d3119 Fixed linter warning
no issue

- updated `.lint-todo` to fix linter complaining about an already-fixed error
2022-04-21 07:18:06 +01:00
Kevin Ansfield 905f37b0c5 Fixed interfering actions menus in newsletter management
no issue

When multiple newsletters existed, the actions dropdown menus were all rendered on top of each other but hidden with CSS. This resulted in clicks that you expected to open an actions menu immediately triggering actions on a newsletter higher up in the list.

- switched from `<GhDropdown>` to `<GhBasicDropdown>` which adds/removes the dropdown content elements rather than rendering everything and hiding with CSS
- updated styling to match previous implementation
- added `.anim-fade-in-scale` classes for use with `{{css-transition}}` so we can keep the open/close animation
  - `ember-basic-dropdown` does have support for transitioning in/out CSS classes but they are only triggered on the first open/close for each menu which resulted in oddly inconsistent behaviour with multiple menus in a list
  - close animation doesn't actually work because the outer elements are removed by `ember-basic-dropdown` preventing `css-transitions` from performing it's animation
2022-04-20 10:50:11 +01:00
Sanne de Vries a66ff27847 Fixed archived description in Email newsletter settings
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-18 11:11:51 +01:00
Sanne de Vries add0cfdc41 Added active and archived newsletter descriptions
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-18 10:57:23 +01:00
Kevin Ansfield 272202f89d Reset warning threshold dates on linter errors
refs https://github.com/TryGhost/Ghost/issues/14101

- the Octane-related codemods have not been fully completed yet meaning the linter error list is still too large to effectively manage piecemeal
- reset the `.lint-todo` file to add another 30 days before the warnings show up when running `yarn lint:hbs`
2022-04-06 19:41:12 +01:00
Peter Zimon bf0c3cbd1a
Updated Portal mock for offers (#2319)
Updated the preview block of offer creation screen to match the new style of Portal.
2022-04-01 13:22:41 +02:00
Kevin Ansfield f16afddb05 Resolved template linting errors in <Settings::MembersEmailLabs>
refs https://github.com/TryGhost/Team/issues/1441

- applying scout rule
- brings template closer to swapping backing class to glimmer
2022-03-31 11:27:39 +01:00
Kevin Ansfield 5ccd61256b Added missed .lint-todo update
refs d27db1091c
2022-03-31 11:09:42 +01:00
Kevin Ansfield 7b2bef99e7
Cleaned up `membersActivityFeed` labs flag (#2309)
no issue

- `membersActivityFeed` is GA so we don't need any of the conditionals or now-unused code
2022-03-30 12:43:52 +01:00
Sanne de Vries 74252bc080 Fixed linting error and updated .to-do 2022-03-24 12:47:49 +00:00
Sanne de Vries 88a4188919 Turned default email recipients dropdown into expandable setting
Refs https://github.com/TryGhost/Team/issues/1441
2022-03-23 15:46:14 +00:00
Sanne de Vries 2e0574ccae Updated .lint-todo file 2022-03-23 15:06:04 +00:00
Thibaut Patel f5f69d01b1
Added canceled subscriptions in member detail screen (#2287)
refs https://github.com/TryGhost/Team/issues/1141

Showing canceled subscriptions provide a more complete picture of the activity of a member.

- Given there is no `member.product` object when a subscription is canceled, use the `member.subscriptions.price.product` objects instead of `member.products`.
- applied boy-scout rule for linter errors and and code formatting
- removed `multipleTiers` flag conditionals as it's now GA
- set up subscriptions as a separate mirage resource so they are easier to work with
    - updated `PUT /members/:id/` endpoint to match real API's complimentary subscription behaviour
    - modified mirage member serializer to match API output

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-03-18 16:15:42 +00:00
Kevin Ansfield 836355f68a Fixed linter errors in <ModalProduct> template
no issue

- dropped unnecessary/invalid nested `<form>` elements
2022-03-14 10:51:19 +00:00
Rishabh Garg a8d8a9695f
Removed multiple tiers beta section (#2298)
refs https://github.com/TryGhost/Team/issues/1267

Multiple tiers is now available for all sites by default, so there is no need anymore for the beta section to enable it.
2022-03-11 20:14:47 +05:30
Kevin Ansfield 938b141ba1 Resolved linter errors in <GhMembersRecipientSelect>
no issue

- fixed duplicate `id` attribute on the specific people checkbox
- switched toggle behaviour from a click event on the surrounding div to a change event on the checkbox
  - the surrounding `<label>` has appropriate `for` attribute so it acts as the click-to-change target
- added `aria-label` attributes to the checkboxes because the label element we're using does not surround any content that labels the checkbox
2022-03-11 11:06:13 +00:00
Kevin Ansfield 00d4708b3e Updated .lint-todo file 2022-03-09 17:32:14 +00:00
Sanne de Vries f62a08d50e Fixed linter error 2022-03-09 12:24:36 +00:00
Rishabh c5f83b03e4 Fixed lint 2022-03-09 14:21:16 +05:30
Sanne de Vries c7c6f9ca41
🎨 Redesigned user authentication pages (#2286)
Refs https://www.notion.so/ghost/Invite-staff-users-steps-in-setup-guide-367737e13d97450a98a0f39ec6b68181

* Simplified the selfhoster setup flow to one setup page only
* Redesigned the reset password pages and the signup page for new staff members

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2022-03-08 17:30:46 +00:00
Peter Zimon 0fe822a9de Fixed linter error 2022-03-08 16:47:40 +01:00
Peter Zimon 028875514b Fixed linter error 2022-03-07 18:55:04 +01:00
Kevin Ansfield a671ef9b16 Reset linter todos
no issue

- the majority of our ignored linter problems had transitioned to warnings but we haven't yet reached a point where that is useful
- deleted and recreated the `.lint-todo` file to give us another 30 days to perform any automated cleanup
2022-03-07 12:21:57 +00:00
Kevin Ansfield f2deb7b750 Resolved linter errors in members-activity.hbs 2022-03-07 12:21:57 +00:00
Kevin Ansfield b231ef39a9 🐛 Fixed members table showing dates in UTC rather than site timezone
closes https://github.com/TryGhost/Ghost/issues/13611

- added `{{moment-site-tz}}` helper for transforming any date into the selected site's timezone
  - allows for use on any date in the system
  - keeps transformation a display-level concern
- updated members table to use `{{moment-site-tz}}` to transform the date before display
2022-03-03 16:16:46 +00:00
Sanne de Vries 14e3082b00 Fixed linting error 2022-03-03 10:52:05 +01:00
Kevin Ansfield 0fb37a0f35 Added "created at" members filters
refs https://github.com/TryGhost/Team/issues/1390

- added `membersTimeFilters` feature flag and labs toggle
- added `<GhDatePicker>` component that lifts functionality from the `<GhDateTimePicker>` component
  - `<GhDateTimePicker>` has not yet been refactored to use the new component internally as there are some odd/complex interactions with error handling with it's existing use-cases and they are in critical publishing paths so the refactor doesn't belong as part of this change
- added "Created at" filter type to members filters
  - uses new date picker component for input value
  - has "before", "on or before", "after", "on or after" operators
  - "on" and "not on" operators were skipped as they require two NQL statements to represent, breaking the current 1:1 statement:filter approach used in the NQL-based query param parsing
2022-03-02 21:59:48 +00:00
Sanne de Vries 1ccb48e770
🎨 Updated Member page layout (#2271)
No issue

- Changed the Member details page to be more scalable and flexible, depending on whether creators are using subscriptions, emails, and stats.

* Hidden email stats on member detail page when subscriptions are off
* Hid subscription box on member details page when Stripe is not connected
* Updated copy and layout of member details page
* Updated old activity feed styles on member page
* Fixed padding issue for empty activity feed
* Fixed current and new activity feed
* Added Last seen to member details page behind feature flag
* Updated lint todo file
* Fixed spacing issue in member details
2022-03-01 15:57:57 +01:00
Kevin Ansfield 77e6b1b8b6 Completed Octane migration of integration controller
refs https://github.com/TryGhost/Ghost/issues/14101

Applied scout rule to fix linter errors when touching a file.

- added local `updateProperty` and `validateProperty` methods to remove use of `target=`
  - our validation implementation does not properly bind `this` so direct usage of `this.integration.validate` fails
- added `on-input` argument support to our `TextInput` mixin so we we're not overwriting the native event handlers on classic input components
2022-02-21 17:54:47 +00:00
Djordje Vlaisavljevic f78117ec01 Fixed linting issues
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 17:30:03 +01:00
Djordje Vlaisavljevic 6fd9318b91 Added grouping to portal links table to fix linting issue
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 13:22:21 +01:00
Kevin Ansfield b58ec2a3cb Added non-Stripe members setting screen acceptance tests
refs https://github.com/TryGhost/Team/issues/1358

- added acceptance tests for members settings screen
  - subscription access management
  - default post access management
  - free tier management
- fixed `enableLabsFlag()` test helper overwriting existing flag settings when enabling another one
- updated API mocks and fixtures
  - matched product fixtures to default tiers-enabled products
  - updated product API mocks to include benefit handling
2022-02-18 22:36:01 +00:00
Kevin Ansfield 9e40fdad70 Resolved linter errors in `koenig-toolbar.hbs`
refs https://github.com/TryGhost/Ghost/issues/14101

- switched from the deprecated `{{action}}` helper to the `{{on}}` modifier
2022-02-15 13:46:49 +00:00
Peter Zimon 20e7df5943 Updated lint todo file 2022-02-15 11:22:54 +01:00
Kevin Ansfield 4eda1eac76
Disabled non-functional edit buttons in labels dropdown when importing members (#2258)
closes https://github.com/TryGhost/Team/issues/1320

- added `@allowEdit` argument to `<GhMemberLabelInput>` and changed the dropdown to only show the edit label when `@allowEdit` is truthy
- updated usage in the filter UI and members detail screens to allow editing
2022-02-11 15:20:28 +00:00
Kevin Ansfield 42839415dd Added acceptance test for members import modal display
refs https://github.com/TryGhost/Team/issues/1320

- start of acceptance tests ready for more detailed testing
- added ignore of `no-duplicate-landmark-elements` lint rule in import modal template
  - the rule was a false flag because the conditionals only allow one `<header>` element to be rendered at a time
2022-02-11 10:01:08 +00:00
Sanne de Vries 7b61392a20 Fixed linting error
Refs d89c699b69

- Fixed PSM error by moving the action on to the button and change the styling so the button is the main styled element that fills the whole area
- Hid the post-list-item error, which will warn in 30 and error in 60 days
2022-02-11 10:10:18 +01:00
Kevin Ansfield d6b66a2bfa Updated .lint-todo file 2022-02-10 10:26:55 +00:00
Gabriel Csapo 22975bab61
[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 797e6a9274 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
Kevin Ansfield 2e296efd3d 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 343ad982ea 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 f46111bb77 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
Kevin Ansfield 36a28e0c13 Updated linter todo file
refs 00ba87cf59

- 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 2f09357e6a 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
Kevin Ansfield b422bbe60a 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 e6b09d567b 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 a218b7c070 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
Djordje Vlaisavljevic 5ce1a11928 Updated lint todo file
refs https://github.com/TryGhost/Team/issues/1252
2022-02-04 14:58:47 +01:00