Commit Graph

1006 Commits

Author SHA1 Message Date
Kevin Ansfield
100e7b70c6
Added TK Reminders feature (#19491)
no issue

- keep an eye on on https://ghost.org/changelog/ for full details
2024-01-17 08:57:35 +00:00
Steve Larson
549aaa4c5a
Added tests for TK indicators within editor (#19262)
closes TryGhost/Product#4225
- added basic tests for TK detection in title
- added coverage for TK reminder modal popping up
2023-12-06 11:29:27 -06:00
Chris Raible
a97e2b823e
Added error handling to Sentry's beforeSend (#19109)
refs TryGhost/Product#4175

- Added error handling to Sentry's beforeSend function in both Admin and
Core, so if there is any error in beforeSend, we will still send the
unmodified event to Sentry
- This is in response to an incident yesterday wherein the beforeSend
function threw an error due to an unexpected missing value in the
exception. The event sent to Sentry was the error in the beforeSend
function, and the original error never reached Sentry.
- If the original event had reached Sentry, even if unmodified by the
logic in beforeSend, we could have been alerted to the issue sooner and
more easily identified all affected sites.
- Also added defensive logic to protect for certain values in the
exception passed to beforeSend not existing and added unit tests for the
beforeSend function in admin and core
2023-11-23 02:46:50 +00:00
Sanne de Vries
e9e2b678c7
Updated Admin meta title to Ghost Admin – [site title] (#19023)
No ref
- In order to make it easier to distinguish between Admin and site in
browser tabs, we've updated the meta title to include `Ghost Admin` in
the title.
2023-11-16 13:15:48 +01:00
Jono M
e8e0d84d50
Deleted old Ember settings pages (#18740)
refs https://github.com/TryGhost/Product/issues/4055

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 3b24693</samp>

Removed unused components related to announcement settings, custom theme
settings, and file upload. These components were part of a deprecated
feature or a legacy UI.
2023-11-06 06:46:31 +00:00
Susheel Thapa
2e5fdffe32
Fixed typos (#18648)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-10-31 15:21:44 +00:00
Michael Barrett
b4d2dd0282
Handled ServerError to show a custom error message in the admin (#18709)
refs https://github.com/TryGhost/Product/issues/4040

Handled `ServerError` to show a custom error message in the admin when
an unhandled server error occurs (i.e 504). Supersedes
https://github.com/TryGhost/Ghost/pull/18703
2023-10-20 12:02:51 +01:00
Jono M
caae0edf19
Fixed and restored new AdminX E2E tests (#18606)
refs https://github.com/TryGhost/Product/issues/3831

---

### <samp>🤖 Generated by Copilot at 539c2d3</samp>

This pull request updates and adds some test cases for the date picker
and newsletter features in the Ghost admin panel. It introduces a test
helper function for the date picker in `editor-test.js`, and removes a
redundant test case from `publish-flow-test.js`. It also adds two new
test cases in `publishing.spec.js` using the Playwright framework to
verify the timezone and recipient settings for publishing posts.
2023-10-20 10:00:35 +01:00
Michael Barrett
88e49b4f0e
Added 504 error handling in the admin (#18703)
refs https://github.com/TryGhost/Product/issues/4040

Added error handling for 504 errors to improve the message shown to the
user when a 504 occurs
2023-10-20 08:53:54 +01:00
Jono M
b75a6d0e7f
Revert "Updated old admin acceptance tests to E2E with AdminX" (#18604)
Reverts TryGhost/Ghost#18599

There seems to be a timezone issue with one of the tests
2023-10-13 10:16:28 +01:00
Jono M
f0efbb7fbb
Updated old admin acceptance tests to E2E with AdminX (#18599)
refs https://github.com/TryGhost/Product/issues/3831

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 5af23a9</samp>

This pull request updates and adds some test cases for the editor and
the publishing flow in Ghost. It uses a helper function to test the date
picker component in the editor, and removes a redundant test case from
the `publish-flow-test.js` file. It also adds two test cases to the
`publishing.spec.js` file, using the Playwright framework, to check the
publish time and the newsletter settings of a post.
2023-10-12 20:27:16 +01:00
Kevin Ansfield
fa0b1c607b
Deleted all Admin code relating to the old editor (#18580)
no issue

- removed labs flag
- removed main editor component and all associated components
- switched usage of `<KoenigBasicHtmlInput>` and `<KoenigBasicHtmlTextarea>` over to use plain `textarea`, the only uses were in settings modals that have been replaced in AdminX
- cleaned up unused editor CSS
2023-10-12 13:17:39 +01:00
Peter Zimon
e68db848dc
AdminX: reroute settings-x to settings (#18360)
refs. https://github.com/TryGhost/Product/issues/3949

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-09 08:12:46 +01:00
Steve Larson
8bc653802d
Released new editor (#18422)
Promoted our beta editor to the default editor. Keep an eye on (or subscribe to) https://ghost.org/changelog/ for release announcements with full details.

- moved the beta editor (Lexical-based editor) to the default editor; all pages and posts will now use it
- all mobiledoc (previous editor) posts will remain mobiledoc until opened in the editor at which point will be converted to Lexical on the fly and open in the new editor
2023-10-04 12:22:54 +01:00
Daniel Lockyer
639be25f1d Updated Koenig-Lexical bundling
refs https://github.com/TryGhost/DevOps/issues/83

- this will now continue use the dev server assets if we tell it to,
  or copy the dependency package files to the built folder otherwise
- removes `editor` from config API because it's no longer needed
- removes dependency on `editor.url` in tests, as this no longer exists
- edits dev script to pass dev server URL as env var
- adds `@tryghost/koenig-lexical` dependency to Admin
2023-10-04 12:50:21 +02:00
Chris Raible
80a6fe17d0 Added Source as the new default theme
refs TryGhost/Product#3510

- Added `TryGhost/Source` as a submodule in `ghost/core/content/themes` so `Source` will ship with Ghost (along with Casper)
- With this change, new installs will use `Source` as the default theme. Existing sites will have `Source` installed, but not activated, as this is a large change and we don't want to drastically change existing sites without warning. Users can upgrade to use `Source` simply by clicking 'Activate' in design settings.
- Updated protections to prevent users from uploading their own conflicting version of `Source`
2023-10-03 14:02:08 +02:00
Princi Vershwal
3442fdfee6
🐛 Show specific tier posts under 'Paid-member only' filter in admin panel (#17043)
fixes https://github.com/TryGhost/Ghost/issues/16988
2023-10-03 14:43:11 +05:30
Kevin Ansfield
5f5ad4d5dd
Added automatic conversion of old content when opening in beta editor (#17876)
no issue

Previously the beta editor only worked for newly created posts/pages, any older content would open with the original editor. This change enables automatic conversion of old content to the new content format when a post/page is opened in the admin interface allowing new features like signup and advanced header cards to be used on existing content.

- removed `convertToLexical` feature flag
  - where necessary switched to using just the `lexicalEditor` feature flag in its place
- moved the "L"/"M" indicators on the posts list to a new `lexicalIndicators` feature flag to make debugging/development easier
- added a redirect to the original editor route so that any route to opening the editor (such as the `/edit` front-end shortcut, or other areas of Admin) will open in the beta editor
  - avoids confusing/inconsistent behavior
2023-08-30 16:54:03 +01:00
Michael Barrett
8d0eed2dcd
🐛 Fixed member filter by single newsletter subscription (#17668)
fixes https://github.com/TryGhost/Product/issues/3708

When filtering members by the `Newsletter subscription` parameter, If
the site has a single newsletter, members with disabled emails were
being erroneously returned. This fixes that 👍
2023-08-10 12:59:14 +01:00
Michael Barrett
184c6ae951
Retain newsletter subscriptions on suppression (#17373)
refs https://github.com/TryGhost/Product/issues/2610
2023-07-24 10:47:57 +01:00
Kevin Ansfield
ba6ae472c3
Renamed editor beta route
closes https://github.com/TryGhost/Team/issues/3369

- removes `lexical` from user-visible URL
- only renames path rather than renaming all associated files to keep changeset minimal prior to beta launch
2023-06-02 12:52:57 +01:00
Simon Backx
bd6b3099d8 Updated admin tests for feature helper change
refs 488aa983d0
2023-05-25 15:38:21 +02:00
Naz
cc4ff8c6d4 Added collections CRUD UI
refs https://github.com/TryGhost/Team/issues/3168

- This is basic scaffolding for collection resources UI in Admin. For the most part it's a copy-paste of tags code with slight modifications to fit the collections usecase
2023-05-23 17:26:47 +07:00
Elena Baidakova
ca46308abe
Added logic for showing feedback form in Labs (#16831)
refs TryGhost/Team#3247
- The feedback form UI is hidden by default
- Enabling “Lexical editor” doesn’t show the feedback form
- Disabling “Lexical editor” shows the feedback form below this lab item
and user can send the feedback
- Refreshing the page or navigating to some other page and then back to
Labs → the form is hidden again
2023-05-19 13:15:25 +04:00
Michael Barrett
94c863f189
Implemented post slug update on duplicated post title update (mobiledoc) (#16811)
no issue

Updated the slug generation logic so that when a mobiledoc post is
duplicated and the title is edited, the slug gets updated to reflect the
new title of the post. See lexical implementation here:
https://github.com/TryGhost/Ghost/pull/16802
2023-05-17 10:11:01 +01:00
Elena Baidakova
57d5f544d8
Updated inlined feedback form (#16794)
refs TryGhost/Team#3214

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 92b2412</samp>

This pull request refactors and simplifies the feedback system for the
lexical editor feature. It replaces the nested modal with a new
`FeedbackLexical` component that can be used in different contexts. It
also removes unused code and files related to the old feedback modal.
2023-05-16 16:16:57 +04:00
Steve Larson
26389507ed Revert "Reverted "Add lexical feedback (#16772)""
This reverts commit 0a9f280a75.
2023-05-11 08:12:25 -05:00
Daniel Lockyer
0a9f280a75
Reverted "Add lexical feedback (#16772)"
This reverts commit 72ed8f56f6.
2023-05-11 11:08:18 +02:00
Steve Larson
72ed8f56f6
Add lexical feedback (#16772)
no refs
- add lexical feedback modal in the editor, labs, and publish workflows
- modal is a basic textarea form

---------

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-05-10 17:40:55 -05:00
Jono M
62f7600aa4
Update search text highlighting to escape HTML (#16760)
refs: https://github.com/TryGhost/Team/issues/2390

Escapes each matched and non-matched segment of the post title in the
admin search field, to make sure they're displayed in plain text but
still have matches highlighted.
2023-05-11 09:53:05 +12:00
Sanne de Vries
f8273b7f1f Removed ember component test
No ref
- This will be replaced by snapshot tests
2023-04-17 17:12:31 +01:00
Chris Raible
79a95268b6
Added Post History modal to the editor behind postHistory flag (#16651)
no issue

- added modal-post-history component and wired it up to the
lexical-editor

### <samp>🤖 Generated by Copilot at b726dd5</samp>

> _`Post history` is the key to the past_
> _Unveil the changes in a modal so vast_
> _But beware of the doom that lurks in the edits_
> _The lexical-editor is a portal to the abyss_
2023-04-17 15:25:52 +01:00
Sanne de Vries
2325a359bb Fixed failing test due to CSS change
No ref
2023-04-12 08:45:56 +01:00
Chris Raible
6b8f5fe7aa
🐛 Fixed UI bug when selecting specific recipients by label (#16543)
closes TryGhost/Team#2859

- when removing all selected labels/newsletters, the UI would uncheck
the Specific People checkbox and hide the label/newsletter selection
- this change forces the Specific People checkbox to be checked even if
no labels/newsletters are selected
- test enhanced to cover this specific edge case
2023-04-03 14:45:58 -07:00
Rishabh Garg
dc811af070
Merged mentions UI and email lab flags (#16518)
closes https://github.com/TryGhost/Team/issues/2851

We had two separate flags to manage the Mentions beta, one for showing
UI and other for sending emails. This change combines them both under
the single `webmentions` flag that was previously only used to show the
UI.
2023-03-29 01:12:56 +05:30
Chris Raible
2a876ac7a8
🐛 Fixed UI bug when choosing email recipients (#16481)
- closes https://github.com/TryGhost/Team/issues/2786

- when trying to deselect all recipients, the UI would pass null as the filter to publish-options
- publish-options would then fallback to the default options, which is all recipients, and then the UI wouldn't update which made things even weirder
- we want to fallback to the default recipients when the recipientFilter is undefined (e.g. hasn't been set at all), but not when it is explicitly set to null (e.g. when the user has deselected all recipients)
2023-03-24 15:25:35 +05:30
Aileen Nowak
37383fde90 Moved Milestone emails to GA
- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA
2023-03-23 17:35:23 +00:00
Chris Raible
a5d3101ec9
🐛 Fixed broken editor breadcrumbs when opening a new post from analytics (#16463)
refs TryGhost/Team#2401

- Previously, if you opened a new post using the plus button on the sidebar while on a different post's analytics page, the breadcrumbs would point back to Analytics instead of the Posts list view. Going back to Analytics brought you back to the analytics page for the post you just created, which wasn't populating since it likely hadn't been published yet.
- This commit fixes the issue by setting fromAnalytics = false if transitioning to a new Post, even if the previous route was the analytics page.
2023-03-22 00:12:15 -07:00
Aileen Nowak
b374bd4b94 Added user notification toggle for Milestone emails
refs https://www.notion.so/ghost/Marketing-Milestone-email-campaigns-1d2c9dee3cfa4029863edb16092ad5c4?pvs=4

- Added a toggle to disable and enable receiving Milestone emails behind a feature flag
2023-03-21 15:41:32 +02:00
Chris Raible
8d4028bbb7
🐛 Fixed editor crashing with unknown cards in mobiledoc (#16430)
refs TryGhost/Team#2702

- adds a default handler for unknown cards: 
- logs a warning message to the console 
- removes the card from the mobiledoc
2023-03-16 16:06:56 -07:00
Simon Backx
3ded0bbee8
Added outbound link tagging setting (#16324)
no issue

Enable or disable outbound link tagging in both web posts and
newsletters.
2023-02-23 14:37:23 +01:00
Simon Backx
f6bc3479f9
Added webmentions emails flag (#16321)
fixes https://github.com/TryGhost/Team/issues/2599

Disables sending webmentions notification emails, and hides it behind a new flag instead.
2023-02-23 11:42:14 +01:00
Ronald Langeveld
ce567b9816
Added Mentions email notification settings (#16245)
closes https://github.com/TryGhost/Team/issues/2526

- Mention emails can now be toggled inside staff user' profiles, if they
have the webmention flag enabled on their Ghost site.
- Removed the flag dedicated to webmention email notifications and is
now handled by the `webmention` flag.
- Does not send email notification if `webmention` flag is not enabled.
- Updated tests.

---------

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2023-02-09 17:03:03 +08:00
Ronald Langeveld
24681398af
🐛 Fixed members tier filtering (#16212)
refs https://ghost.slack.com/archives/CTH5NDJMS/p1675194453354469 https://secure.helpscout.net/conversation/2127479135/94711

- replaced tiers filtering by `slug` with `id` as we hit an edge case where the NQL filtering is struggling to handle slugs with a single character, eg `a`, `b`. Now filters by the tier's `id` instead.
- added new member, `tier_id` relation to make it possible to filter by id, eg `/?filter=tier_id:<id>`.
2023-02-01 20:33:57 +08:00
Simon Backx
e879406659
Added outbound link tagging setting (#16146)
fixes https://github.com/TryGhost/Team/issues/2432
    
Adds outbound_link_tagging setting (enabled by default and behind
feature flag). If the feature flag is enabled, and the setting is
disabled, we won't add ?ref to links in emails.
    
This includes new E2E tests for email click tracking, which were also
extended to check outbound link tagging (for both MEGA and the new email
stability flow).

Also fixes a test fixture for the comments_enabled setting.
2023-01-20 13:41:36 +01:00
Ronald Langeveld
57bc14e00f
Added Mentions endpoint to Admin (#16136)
ref https://github.com/TryGhost/Team/issues/2421

- added the Mentions API endpoint to Admin
- setup initial mention model in the Ember Store to be able to dev with the endpoint
- added basic routing to access the `/mentions` page that is currently behind feature flags
- Setup basic testing with a mirage mock endpoint.
2023-01-17 20:16:18 +08:00
Rishabh
8d4bc97dbe Fixed admin utils test
refs 9fc9e4311d
2023-01-13 19:49:01 +05:30
Rishabh
9fc9e4311d Removed www prefix from newsletter link table
closes https://github.com/TryGhost/Team/issues/2206

- removes `www.` from the url shown on links table in post analytics
- we had previously removed http(s) protocol from it as well, and they are only shown while editing the url
2023-01-13 15:38:54 +05:30
Ronald Langeveld
0e2d1b3afd
Added redeemed offers filtering for members (#16071)
closes https://github.com/TryGhost/Team/issues/2011

- Gives publishers the ability to filter members based on which offer they used (redeemed) when they subscribed for a paid membership.
- On the offers page, the redemption count number links to a the members page with the filter already applied making it easy to have insight on which members used the offer / coupon.
2023-01-11 20:13:09 +08:00
Sanne de Vries
48ea2a871b
Updated editor re-authentication modal (#16102) 2023-01-11 12:39:04 +01:00
Ronald Langeveld
38174e0fd4 Added newsletters filter admin test
ref https://github.com/TryGhost/Team/issues/2012

- Added missing test for filtering members from specific newsletters
2023-01-11 14:49:23 +08:00
Elena Baidakova
69d4a96fb8
🎨 Add ability to send test email with chosen newsletter (#15783)
closes TryGhost/Team#1897

-
[Design](https://www.figma.com/file/RpEbPA7H7VHLtXjt3YyB2t/Multiple-Newsletters-Preview?node-id=0%3A1&t=YkDXy063OkCrAI4a-0)
-
[Discussion](https://ghost.slack.com/archives/C019B1K4FAM/p1667924062808939)
2023-01-09 17:48:30 +04:00
Kevin Ansfield
ea9c8c03fe
Update dependency ember-template-lint to v5.3.0 (#16062)
refs https://github.com/TryGhost/Ghost/pull/15550

Pulled out of the rolled up node+ember-js+ember-template rollup linter update PR as it required fairly extensive changes.

- bumped package
- renamed `no-down-event-binding` to `no-pointer-down-event-binding`
- disabled `no-pointer-down-event-binding` rule
- disabled `no-triple-curlies` rule
- ran `yarn lint:hbs --fix`
- updated integration tests to match Octane syntax
- fixed various one-off errors
- updated .lint-todo
2023-01-04 09:39:32 +00:00
Kevin Ansfield
c3487fea41 Refactored <GhBenefitItem>
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated component to Glimmer
- swapped usage of `ValidationState` mixin for `{{validation-status}}` modifier
  - updated modifier to accept custom error/success classes
- removed unnecessary/unused code in the `gh-benefit-item.js` backing class
2022-12-14 11:57:54 +00:00
Kevin Ansfield
9fd87f565d Migrated <GhValidationStatusContainer> to {{validation-status}} modifier
no issue

- moved logic from `<GhValidationStatusContainer>` to a new `validation-status` modifier
  - removes a usage of the `ValidationState` mixin
  - migrated uses of the component to a mixin
  - paves the way for full removal of the `ValidationState` mixin in later refactors (mixins are deprecated)
- migrated `<GhFormGroup>` to a glimmer component
  - swapped the extend of `GhValidationStatusContainer` to usage of the `validation-status` modifier with a template-only component
  - updated all `<GhFormGroup>` to use the standard `class=""` instead of `@classNames=""` and `@class=""`
  - allows `data-test-*` attributes to be added to uses of `<FormGroup>` to help when complex components are grouped as a form input
2022-12-09 12:38:35 +00:00
Simon Backx
b615c9f7d2
Added post scheduling Playwright test and loosened time restrictions (#15960)
refs https://github.com/TryGhost/Team/issues/2371

- Adds a test that schedules a post 5 seconds in the future and waits
for it to be published
- Reduced the time restrictions for scheduling: 
    - The minimum time in the frontend is now 5 seconds in the future (came
from 5 minutes in the future)
    - The time picker now suggests 10 minutes in the future instead of the
minimum scheduling time (came from 5 minutes)
    - In the backend, a post will be allowed to be scheduled if it is at
least 2 minutes in the past (came from 2 minutes in the future)
    - The scheduler will publish a post if it is at least 5 minutes in the
past, and maximum 5 minutes in the future (came from 2 minutes)
2022-12-07 17:29:36 +01:00
Kevin Ansfield
3817f583fa 🐛 Fixed unexpected "unsaved changes" modal when deleting a member
closes https://github.com/TryGhost/Team/issues/2275

When deleting a member, after confirming deletion another "unsaved changes" modal popped up. From that point, if you clicked to stay you remained on the member screen with stale data (the member was still deleted) resulting in further errors when any attempt to make changes was made.

- prevented the unsaved changes check running for a deleted member because it would always return `true` in that case
- ensured the data setup for the unsaved changes check still occurs when a member is accessed directly via the URL
  - previously it was skipped because the data setup only occurred inside `fetchMemberTask` but that isn't called when the route already loaded the model via it's `model()` hook
2022-12-05 11:48:37 +00:00
Elena Baidakova
95c3a68c34
Updated the filter naming in Post Analytics (#15898)
closes TryGhost/Team#2329
- Replace 'Received' on 'Sent' in member's filter
- Moved links for feedback analytics from chart to table
2022-11-30 17:39:37 +04:00
Hannah Wolfe
e4dbf9b0fd Updated error fallbacks to generic error message
refs: https://github.com/TryGhost/Team/issues/1121

- We've decided on one  preferred message for unexpected errors
- We want to use this everywhere where we don't know what to display
- We now have a GENERIC_ERROR_MESSAGE constant that we should use
2022-11-23 21:49:40 +00:00
Hannah Wolfe
c740eecaec Fixed duplicate error messages from API
refs: https://github.com/TryGhost/Team/issues/1121

- In certain cases our API sends the same data for message and context.
- We will also fix this server-side, but we should also be smart in the UI and not show duplicate info
2022-11-23 15:56:58 +00:00
Ronald Langeveld
08232bd538
Cleaned up GA Flags (#15762)
closes https://github.com/TryGhost/Team/issues/2126

- Cleaned up the following GA flags: `newsletterPaywall`, `freeTrial`, `compExpiring`, `searchHelper`, `emailAlerts`, `fixNewsletterLinks`.
2022-11-18 16:09:25 +07:00
Hannah Wolfe
dfffa309a8
Improved member importer error handling (#15843)
refs: https://github.com/TryGhost/Team/issues/1121

- This makes several key changes to the way errors are handled in the member importer, to ensure that we only show error messages to users that we wrote.
- Fundamentally, we no longer trust all API errors, and instead only trust a set of very specific API errors. Anything outside of that is replaced with a generic error message.
- Also switches the server-side error generated for email verification (which can throw during member import) to be a HostLimitError, as that is a more appropriate class.
- Note: there are many other parts of Ghost admin that need a similar overhaul, and a similar change we need to introduce server side to fully resolve the underlying issue of bubbling up code errors to the UI.
2022-11-17 19:41:39 +00:00
Kevin Ansfield
332dd4fbf1 Switched editor re-authenticate modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
- simplified unauthed save behaviour because we now have a promise for the modal enabling us to wait for the modal to close before continuing
2022-11-14 09:55:34 +00:00
Simon Backx
7c3d75ade7
🐛 Fixed pasting newlines in post titles (#15794)
fixes https://github.com/TryGhost/Team/issues/2193

- When pasting a title with a newline, we now trim the string and clear newslines before pasting.
- When sending the slug to the backend to generate a unique slug, we now sluggify it in the frontend before adding it to the URL to prevent issues with unsupported characters (causing possible routing problems in Pro).
2022-11-10 14:43:15 +01:00
Elena Baidakova
b526c4b719
Add tests to tabs and events pagination (#15757)
closes TryGhost/Team#2128
2022-11-07 16:32:06 +04:00
Kevin Ansfield
9bdb25d184
Fixed hosting management screen not loading after sign-in process (#15763)
refs https://github.com/TryGhost/Team/issues/2110

- dynamically defined properties on the config service did not have
autotracking set up properly if they were accessed in any way before the
property was defined, this caused problems in a number of areas because
we have both "unauthed" and "authed" sets of config and when not logged
in we had parts of the app checking for authed config properties that
don't exist until after sign-in and subsequent config re-fetch
- renamed `config` service to `configManager` and updated to only
contain methods for fetching config data
- added a `config` instance initializer that sets up a `TrackedObject`
instance with some custom properties/methods and registers it on
`config:main`
- uses application instance initializer rather than a standard
initializer because standard initializers are only called once when
setting up the test suite so we'd end up with config leaking across
tests
- added an `@inject` decorator that when used takes the property name
and injects whatever is registered at `${propertyName}:main`, this
allows us to use dependency injection for any object rather than just
services or controllers
- using `application.inject()` in the initializer was initially used but
that only works for objects that extend from `EmberObject`, the
injections weren't available in native-class glimmer components so this
decorator keeps the injection syntax consistent
  - swapped all `@service config` uses to `@inject config`
2022-11-03 11:14:36 +00:00
Kevin Ansfield
d1a061e5a7
🐛 Fixed comped subscription duration drop-down sometimes not being visible (#15764)
closes https://github.com/TryGhost/Team/issues/2110

- added failing test showing feature service `@feature` properties
weren't autotracking correctly if accessed before
authentication+settings fetch occurs
- shows labs and feature properties on the feature service are not
reacting to changes in the settings service
- removing the `@computed` on the `feature.labs` getter stops it being
cached but it then fails on the `feature.testFlag` computed property
- updated `settings` service to behave as expected with our current
version of Ember
- inspected the store schema for `Setting` to define the "proxied"
properties up-front rather than only after fetching
- updated the property definition to use `computed` so we're opting in
to the old style reactivity (required adding the `@classic` decorator to
pass linting)
2022-11-03 10:08:48 +00:00
Kevin Ansfield
2d2ac0102a Refactored signin controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to native class syntax and glimmer component patterns
- removed use of jQuery, the workaround to trigger change events no longer appears necessary
2022-11-01 14:12:23 +00:00
Kevin Ansfield
b272b34a44 Fixed linter error 2022-10-31 12:12:58 +00:00
Kevin Ansfield
5bf3fe9cb8 🐛 Fixed error preventing admin area being usable by staff users with Contributor role
closes https://github.com/TryGhost/Team/issues/2190

- added a guard around the tier fetches in `membersUtils` service so the fetch doesn't occur unless we have a logged in user and they aren't a contributor
- extracted the `withPermissionsCheck` mirage util function and added role checks around the mocked tiers endpoints
- added an acceptance test that loads the content screen and creates a draft post as a contributor to help catch regressions
2022-10-31 12:01:39 +00:00
Rishabh Garg
d10d4390f0
Removed duplicate newsletter tracking settings (#15717)
refs cca0f7d7dc

- newsletter tracking setting has now moved to analytics settings page. the duplicate settings on newsletter settings page is removed.
2022-10-28 02:35:39 +05:30
Hakim Razalan
b88a54fb71
🐛 Fixed redirect to signin modal not shown when logged out (#15522)
fixes:  https://github.com/TryGhost/Ghost/issues/15291

- An attempt to improve re-authenticate modal toggle - show re-authenticate modal every time user save (ctrl/cmd + s)
- An attempt to fix redirection when user re-login on different tab. Prevent redirection to sign-in page since the user already logged in on another tab.
- Re-enable `editor` test on `authentication-test.js`
2022-10-21 21:03:12 +01:00
Simon Backx
7c824556c2
Added new members filters and refactored filters (#15667)
fixes https://github.com/TryGhost/Team/issues/2112

- Removed a bit of duplicate code across templates and components that was used to handle filters
- Updated filter objects to contain information about the filter
- Added resource filters that are able to select a single resource, which can be used in columns
- Filters can now define columns by themselves. Not all columns already make use of this functionality, but we can move those over later (cleanup: https://github.com/TryGhost/Team/issues/2133)
- The filter definitions became quite long. We should move them to separate files in the future: https://github.com/TryGhost/Team/issues/2134
- Filters can now have custom NQL parsing
- Improved support for parsing recursive or grouped NQL queries
- Added support for filtering members by feedback
2022-10-21 17:18:00 +02:00
Elena Baidakova
c65b980ada
Added tabs component (#15652)
closes TryGhost/Team#2086
2022-10-19 15:20:15 +04:00
Elena Baidakova
67b65538cf
Added toggle to enable/disable audience feedback in admin (#15601)
closes TryGhost/Team#2043
- Added ability to enable like/dislike buttons for each newsletter.
- Buttons color calculated from accent color.
2022-10-13 10:24:46 +04:00
jbenezech
b9dd9f066d
🐛 Fixed settings overriden when updated from multiple tabs (#15536)
closes: https://github.com/TryGhost/Ghost/issues/15470

- When multiple browser tabs are open, each manipulate a different copy of ember data model, changes to the model in one tab are not reflected in the model of the other tab.
- When updating some settings, all current settings were sent to the API.
- As a result, when updating two different categories of settings (navigation/code inspection) in different tabs, the second update was overriding the first one.
- From a user perspective, this is not a natural behaviour. Only settings visible on-screen when clicking save should be modified.

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-10-12 14:03:54 +01:00
Kevin Ansfield
0de195d052 Updated component tests for moved nav item components
refs 48af4ab3a1

- updated test locations and component names
- updated tests to use angle bracket syntax to match component usage
2022-10-07 17:42:52 +01:00
Kevin Ansfield
7b443d4b63 Removed need for .get() with config service
no issue

The `config` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `config` service by grabbing the API response after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to a tracked object holding the API response data. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `config.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed unnecessary async around `config.availableTimezones` which wasn't making any async calls
2022-10-07 16:14:57 +01:00
Kevin Ansfield
060d791a63 Removed need for .get() with settings service
no issue

The `settings` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `settings` service by grabbing the attributes off the setting model after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to the model's getters/setters. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `settings.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed use of observer in the `customViews` service because it was being set up before the native properties had been added on the settings service meaning autotracking wasn't able to set up properly
2022-10-07 16:14:57 +01:00
Aileen Booker
c4188c1a9e
Added Ghost Explore in Ghost as iframe app behind feature flag (#15495)
no issue

- Added Ghost Explore screen behind alpha flag
- Moved existing /explore route to /explore/connect which we'll redirect to for outside requests
- Added iframe communication with Ghost Explore App
2022-10-07 14:32:54 +01:00
Simon Backx
7e3b41f643
Removed emailClicks feature flag (#15556)
fixes https://github.com/TryGhost/Team/issues/2028

Since link clicks became GA, some older components and templates are no longer used.
2022-10-07 14:27:57 +02:00
Simon Backx
07cb542b97
Improved timezone support date picker and improved tests (#15545)
fixes https://github.com/TryGhost/Team/issues/1946

Problem:
- When running the admin tests in a timezone that is later than UTC, the tests failed.

Causes:
- Some tests needed some adjustements
- The DateTimePicker did not always use the correct timezone.
- Test models createdAt times sometimes depended on the timezone of the test runner

Solution:
- All the input DateTimePicker gets should be processed in the blog's timezone.
- Make sure that all communication (properties, setters, minDate...) with `PowerDatepicker` happens in the local timezone. When setting, convert that date to the blog timezone and use that as the real value.
2022-10-07 12:20:06 +02:00
Kevin Ansfield
524b23c182
Migrated staff user screen to Ember Octane patterns (#15532)
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated staff user controller to native class syntax
- removed use of `{{action}}` helper
- moved from custom components to native `<input>` and `<textarea>` for form fields
  - added `{{select-on-click}}` modifier to cover the `<GhTextingInput @selectOnClick>` option behaviour for any input element
- added `submitForm()` test helper that finds closest `form` element and trigger's a `submit` event on it simulating <kbd>Enter</kbd> being pressed whilst a field has focus
2022-10-05 12:05:31 +01:00
Kevin Ansfield
289e8a8da6 Fixed staff acceptance test
refs e0430b4efc

- acceptance test had mixed up name/slug fields so was testing for incorrect values now that cmd+s inside the slug field is working as really expected
2022-10-04 18:55:25 +01:00
Kevin Ansfield
e0430b4efc 🐛 Fixed ctrl/cmd+s not saving focused fields on general/staff settings screens
no issue

- swapped from route actions triggered by shortcuts mixin to explicit `{{on-key}}` actions
- when saved via keyboard, blur any focused element to trigger it's on-blur action and schedule the save to run after those actions
2022-10-04 17:55:24 +01:00
Sanne de Vries
2c498ab193 Updated breadcrumb and title style across admin
Refs https://www.notion.so/ghost/Switch-breadcrumb-style-513a624c0e0d490ca39a2fdb97a6971a

- Separating out the breadcrumbs and the title makes it easier to navigate back on multiple levels for nested pages.
- Avoids very long titles, as it doesn't include breadcrumbs anymore
2022-10-04 12:35:29 +07:00
Kevin Ansfield
cd9a50841e Fixed tests
refs 85cce39af7

- removed out of date transfer owner modal integration test
- fixed missing `?` in optional chaining in `<GhImageUploader>` error handling
2022-10-03 22:05:02 +01:00
Stephen Sauceda
eb585f9c02
🐛 Fixed active state bug in sidebar nav (#15511)
closes: https://github.com/TryGhost/Ghost/issues/15506

- The sidebar items that don't open the editor were missing some relative current-when attributes so the nested views weren't considered "active".
2022-10-03 19:49:21 +01:00
Kevin Ansfield
258f56ded9
Added regression test for publishing as editor when over member limit (#15518)
closes https://github.com/TryGhost/Team/issues/2010
refs a67cb265fc

- wrapped all members endpoints in a permission check that returns a 403 response if the logged in member is not an admin
- added a publish-flow acceptance test that goes through the flow as an Editor user that fails if the stats endpoint is hit and throws a permissions error
- removed some unnecessary waits in members acceptance test that were added for earlier versions of Ember
2022-10-03 12:05:58 +01:00
Kevin Ansfield
485b793ee3 Deleted test for component that doesn't exist
no issue

- looks like the test file was left over from development
2022-10-03 11:26:00 +01:00
Daniel Lockyer
9818634b63
Merged v5.16.1 into main
v5.16.1
2022-09-27 11:21:48 +07:00
Kevin Ansfield
e3db911108
🐛 Fixed confusing error state when publishing if member count is over hosting plan limit (#15473)
closes https://github.com/TryGhost/Team/issues/1885

- adds limit check for members to the `PublishOptions` class when it's constructed to set a `publishDisabledError` property if the limit check fails
  - if `publishOptions.publishDisabledCheck` is present, all publish options in the publish flow are disabled, the underlying error message is shown, and the continue button is removed to prevent filling in everything only to find at the end of the process that publishing fails
- added handling for a `HostLimitError` error from the API when confirming publishing so the proper underlying message is displayed instead of the confusing "Host limit error, cannot edit post" error
  - this is a backup measure for any instances where you're under the max members limit when starting the publish flow but are over the limit when you reach the end of the publish flow
2022-09-26 17:37:35 +01:00
renovate[bot]
65a74f41c8
Update dependency ember-power-select to v4.1.7 (#15157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-09-24 15:08:42 +02:00
Kevin Ansfield
fa84808048 Dropped ember-cli-moment-shim dependency
no issue

Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling.

- dropped `ember-cli-moment-shim` dependency
- added `moment-timezone` dependency and updated all imports to reflect the different package
- worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency
  - added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package
  - added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
2022-09-24 13:28:23 +02:00
Sanne de Vries
47903962cc Updated post list layouts
Refs https://github.com/TryGhost/Team/issues/1895
2022-09-15 12:50:53 +01:00
Kevin Ansfield
2d9dd4639d Added redirect between mobiledoc/lexical editors
no issue

- mobiledoc and lexical editors will co-exist for some time so we want to make using both as straight forward as possible
- posts can only have one of `lexical` or `mobiledoc` properties set so in the `edit` route for each editor we detect the opposite property being present and redirect so the right editor is loaded for each post
2022-09-13 18:55:39 +01:00
Kevin Ansfield
8376f1f2fc Updated lexical editor acceptance test to match new behaviour
refs e97d5dd3fe

- `/lexical-editor` route now checks for `editor.url` config rather than `editor.lexicalUrl`
2022-09-13 11:45:49 +01:00
Daniel Lockyer
a766253a78
Merged v5.14.1 into main
v5.14.1
2022-09-12 16:06:43 +01:00
Kevin Ansfield
e230370b33 🐛 Fixed Admin freeze when filtering long tag lists
closes https://github.com/TryGhost/Ghost/issues/15391

- `vertical-collection` component was throwing errors during render when the tags list was filtered down causing slowdowns or full Admin crashes
- similar regression had popped up before and fixed in https://github.com/TryGhost/Ghost/pull/15207 but the dependency had been bumped again without realising it caused an error
- added a test that triggers the error-throwing behaviour in the tags input to help catch this in future dependency updates
2022-09-12 15:49:59 +01:00
Kevin Ansfield
8fde9a05d2 Switched User settings unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:12 +01:00
Kevin Ansfield
6e11a24002 Switched Unsplash integration unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:12 +01:00
Kevin Ansfield
5d5e77af85 Switched Slack integration unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:12 +01:00
Kevin Ansfield
2c10e53774 Switched AMP unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:12 +01:00
Kevin Ansfield
a6f19ca807 Switched navigation unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:12 +01:00
Kevin Ansfield
2396c6d615 Switched general settings unsaved changes modal to new modal pattern
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-09 17:44:11 +01:00
Kevin Ansfield
4ad040b4aa Improved display of recipient filter posts list sends column tooltip
refs https://github.com/TryGhost/Team/issues/1025

- added `{{humanize-recipient-filter}}` helper that converts an NQL recipient filter into a more readable format
- updated posts list to use the new helper in the sends column tooltip shown when hovering with the mouse
2022-09-08 11:03:20 +01:00
Kevin Ansfield
bd87ee3e2a Refactored delete custom integration modal
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-08 09:18:48 +01:00
Kevin Ansfield
5bbdad38a5 Refactored delete all content modal
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-08 09:18:46 +01:00
Kevin Ansfield
eca3cd7110 Moved tag screen components
no issue

- relocated screen-specific components into a separate `tags/` directory as part of the move to keep the top-level `components/` directory for re-usable components
2022-09-08 09:18:36 +01:00
Kevin Ansfield
4ce3d58e34 Fixed linting
refs aa53a1c71f

- missed some cleanup when replacing tests
2022-09-07 17:57:15 +01:00
Kevin Ansfield
aa53a1c71f 🐛 Fixed error when deleting tag and missing slugs on tags list
no issue

- fixes error that left the confirmation modal in place when deleting a tag by ensuring we return `true` in the task used by the confirm button, if we return the transition object it trips the "failed" state because the `/tags` route aborts and refreshes when transitioning to it
- fixes missing attached posts count in the tag delete confirmation modal by using the correct `tag.count.posts` attribute in the conditional
- fixes missing slugs in the tags list by using the properties on `@tag` rather than expecting a separate `@slug` argument
- replaced the skipped tags acceptance tests with an updated tests that match the recent redesign
2022-09-07 17:51:56 +01:00
Sanne de Vries
594e2ccb08 Removed all launch-wizard related code
No issue

- With the onboarding flow redesign, the launch wizard can no longer be accessed and is therefore deleted.
2022-09-02 13:20:01 +01:00
James Morris
4f8526fd77 Improving the members page on mobile
no issue
2022-09-01 13:09:23 +01:00
Kevin Ansfield
04c3de8ffc Fixed tests that compared .textContent instead of .innerText with inline SVGs
refs 038600c350

- SVGs have titles now and title text content will be included in `element.textContent`
- updated tests that failed to use `.innerText` instead
  - via chai-dom's `.rendered.text()`
  - via direct access `find('.elem').innerText).to...`
2022-09-01 10:01:30 +01:00
James Morris
2a198c367e Reverting back some changes to try and fix failed tests
no issue
2022-08-31 16:07:12 +01:00
James Morris
ae28cdffbb Fixed the test for new member page based on changes
no issue
2022-08-31 15:16:32 +01:00
Rishabh
5e2613b6ed Fixed lint
refs 594ef34871
2022-08-26 15:31:10 +05:30
Rishabh
74f94e85a4 Fixed lint for staff user test 2022-08-26 15:29:06 +05:30
Rishabh
76419f8ed4 Removed email alerts UI for non admin staff
refs https://github.com/TryGhost/Team/issues/1825
2022-08-26 15:24:28 +05:30
Rishabh Garg
da62355e18
Wired email alert settings for staff users on admin (#15313)
refs TryGhost/Team#1826

- allows staff users to manage their email alert settings behind the flag
- only owner and admin users are able to toggle their email alerts
2022-08-25 15:47:14 +05:30
Kevin Ansfield
3fd32ce3cf
Lexical-powered editor experiment (#15278)
no issue

We're spending a bit of time playing with an alternative to mobiledoc-kit to test it's feasibility as a base for future editor improvements.

- add `editor.lexicalUrl` config that points at the unpkg release by default
- set up a route on `/ghost/#/lexical-editor/post/` for the test playground which renders `<KoenigLexicialEditor>` as the editor
- adds `<KoenigLexicalEditor>` component that lazy loads the external react component
2022-08-23 11:45:50 +01:00
Aileen Nowak
515bf1cc14 Added Ghost Explore UI
no issue

- Added `/explore` route which requires min. Admin and is behind a feature flag
- Fetches Admin API key and ID to create a token and return back to Ghost Explore with the correct query params
- Fullscreen UI
2022-08-01 11:11:47 +01:00
Sanne de Vries
09794a7c05 Updated theme upload modal in Casper error state
No ref

- Updated modal default state to make it look more clickable
- Updated the Casper upload error state design
- Changed the 'try again' button to directly open the finder rather than only resetting the modal
2022-07-14 15:07:08 +01:00
Sanne de Vries
be0fb41636 Updated webhook actions to dotdotdot menu 2022-07-12 13:38:51 +01:00
Simon Backx
549e8c526f Added newsletter slug generation to mirage 2022-06-02 13:19:52 +02:00
Simon Backx
7c04c2c472 Added test to see if newsletter is saved 2022-06-02 12:58:10 +02:00
Simon Backx
d5887c6ac0 Added tests for newsletter limits
refs https://github.com/TryGhost/Team/issues/1477
2022-06-02 11:21:29 +02:00
Simon Backx
557e268445 Added newsletter archiving tests
refs https://github.com/TryGhost/Team/issues/1477
2022-06-02 10:39:17 +02:00
Kevin Ansfield
ed235b374d Increased publish flow acceptance tests
refs https://github.com/TryGhost/Team/issues/1586

- updated `?newsletter_id=id` handling in posts API mock to match the real `?newsletter=slug` behaviour
- added additional publish flow acceptance tests for single/multiple newsletter behaviour, scheduling, and sending
2022-05-31 22:59:20 +01:00
Kevin Ansfield
99f05e14b2 🐛 Fixed default publish type being "Publish and email" when default recipients set to "Usually nobody"
no issue

The default recipients setting "Usually nobody" was being respected with the email recipient list defaulting to no members selected. However the UI for that state was confusing because the default publish options ended up being "Publish and email" and "Not sent as a newsletter" but it was expected to be "Publish" with the newsletter option being disabled.

- updated the `PublishOptions` setup to reflect the desired outcome for "Usually nobody"
  - default publish type is set to "Publish"
  - default email recipients are set to match post visibility - this means there are fewer clicks required when switching from "Publish" to "Publish and send"
- updated mirage data setup so any members created are automatically assigned to any newsletter instance with `subscribeOnSignup` set
  - ensures we get proper member counts in the publish flow
2022-05-30 20:04:04 +01:00
Kevin Ansfield
3f0e46c7b0 Added initial tests for new publish flow
refs https://github.com/TryGhost/Team/issues/1586

- added test helper for enabling/disabling members and helpers for disabling mailgun and newsletters
- added `loginAsRole` helper that alleviates duplication of user+role creation and also handles log-out before log-in so it's easier to mix different role tests within a block that has a default role setup in `beforeEach()`
- cleaned up editor tests that were skipped due to using the old publish flow
- added `Publish flow` acceptance test suite with an initial batch of tests
2022-05-30 19:12:16 +01:00
Kevin Ansfield
b123b297b6 Improved test settings fixtures
no issue

- the settings fixtures file was becoming hard to use because settings have been appended to it on an as-used basis which meant it was difficult to reason about the base-state in acceptance tests and was never really in sync with the default settings state for a Ghost site
- added a utility function to create a settings object with the `id` defined to avoid problems with manually updating the ids in the list
- updated to include all default settings with their default values if not already set to a specific testing value in the old fixtures
2022-05-30 14:09:29 +01:00
Kevin Ansfield
8e9582d632 Migrated signup screen to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- dropped usage of `<GhTrimFocusInput>` and `<GhTextInput>` in favor of native input elements for more explicit behaviour
- switched `SignupController` to native class syntax
  - migrated to `@action` decorators and swapped all template action triggers to `{{on}}` and `{{fn}}`
2022-05-27 13:28:29 +01:00
Kevin Ansfield
c24ea5d0bc Fixed raw JS error messages appearing in alerts (#2407)
refs https://github.com/TryGhost/Team/issues/1613

We use `notifications.showAPIError()` in many of our try/catch routines but those can also pick up standard JS errors which can result in ugly and useless messages showing in alerts.

- added a list of known built-in JS error type names to check against and a generic error message to be used in place of ones we know shouldn't be displayed
- in `showAPIError(obj)` check `obj.name` against the known list and swap the message for a generic one
  - only the message is swapped, we still log the full/original error to Sentry
- in `handleNotification(msg)` which is the final method used when displaying any alert/notification, extract all words in the supplied message and check that against the known list and swap the message on a match. This handles situations where the API might give us a raw JS error message in the message string
2022-05-27 11:52:39 +01:00
Kevin Ansfield
aaef8f7d44 Deleted unused <GhProfileImage> component
no issue

- the component became unused when the staff user page design was updated but was never cleaned up
2022-05-26 10:42:10 +01:00
Kevin Ansfield
7356bfbcd9 Migrated notifications tests to Octane patterns
refs e021843e3f

- fixed closing of alerts due to missing `.args` after migrating to glimmer syntax
- updated related tests for glimmer component syntax
2022-05-25 12:45:26 +01:00
Simon Backx
49c0a64184 Cleaned up removed feature flags
refs https://github.com/TryGhost/Team/issues/1616
2022-05-25 10:11:24 +02:00
Simon Backx
bc1aa493fa 🐛 Fixed unreliable paid members enabled checks (#2405)
refs https://github.com/TryGhost/Team/issues/1650

- Some places only checked for Stripe being connected via the 'connect' method and ignored the 'direct' method
- Updated (where possible) admin to use the new calculated `paid_members_enabled` setting
2022-05-24 16:53:03 +02:00
Simon Backx
857a8e5ae0 Added tests for unsaved newsletter changes
refs https://github.com/TryGhost/Team/issues/1477
2022-05-18 15:57:02 +02:00
Simon Backx
59a1b8a31f Added tests for editing newsletters
refs https://github.com/TryGhost/Team/issues/1477

- Added default test fixture
- Added tests for validation of newsletter when editing
- Added tests for opening and closing tabs
2022-05-18 13:14:38 +02:00
Kevin Ansfield
ea98469e6e Cleaned up improvedOnboarding labs flag
no issue

- the feature has been GA for a while now so the conditionals are no longer required
2022-05-18 10:13:06 +01:00
Simon Backx
8502ebb96a Moving over the new Dashboard to replace the old (#2389)
refs: https://github.com/TryGhost/Team/issues/1631

Co-authored-by: James Morris <moreofmorris@users.noreply.github.com>
2022-05-17 09:34:34 +02:00
Rishabh Garg
8b5b3aa734 Updated usage of the Tiers API (#2388)
refs https://github.com/TryGhost/Team/issues/1575

- Update usage of Tier to read monthly & yearly price & currency from top level
- Updated usage of Tier to read benefit name from benefits[n], not from benefits[n].name

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2022-05-16 19:51:49 +01:00
Simon Backx
eee3a9aa90 🔥 Removed multipleProducts, tierWelcomePages, and tierName flags
refs https://github.com/TryGhost/Team/issues/1616
2022-05-16 17:25:03 +02:00
Kevin Ansfield
3b088cbd77 Removed usage of old publish menu for contributors
no issue

- updated `<PublishManagement>` and sub-components to handle contributors by replacing publish button with save button in main view and in preview
- removed feature flag gating and usage of `<GhPublishmenu>` in editor template
- updated tests that indirectly used the old publish menu so they work with the new design/behaviour
- skipped editor tests that used the old publish menu
2022-05-16 14:18:04 +01:00
Simon Backx
032f4d2ced Removed non multipleNewslettersUI tests 2022-05-16 14:11:51 +02:00
Hannah Wolfe
385240e03d Refactored to use individual slack settings (#2384)
refs: TryGhost/Team#1625

- we want to remove backwards compatibility code for slack being a single setting

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-16 11:38:32 +01:00
Kevin Ansfield
d353f5dff1 Skipped editor test that uses old publish menu
no issue

- CI keeps failing on this test because Firefox is being slow and hitting the 15sec timeout
- skipped for now as it's testing an old flow that no longer exists and the test will be replaced with an updated version soon
2022-05-12 15:06:52 +01:00
Hannah Wolfe
47d6c17135 Settings cleanup (#2377)
refs: https://github.com/TryGhost/Toolbox/issues/327
requires: TryGhost/Ghost#14791

- lang / locale has had a lot of churn, but we decided this setting should always be locale
- Removed test relating to unused editor_is_launch_complete setting 

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-12 14:53:18 +01:00
Hannah Wolfe
affe6743e5 Renamed products to tiers (#2372)
refs: https://github.com/TryGhost/Team/issues/1145

- this should allow us to remove the /products endpoint in v5

It avoids:

- `kg-product-card`, that really is meant to say product
- `product-cadence` on offers

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-05-11 22:41:54 +05:30