Commit Graph

41 Commits

Author SHA1 Message Date
Chris Raible
680651aa58
🐛 Fixed admin error when trying to overwrite a default theme (#20299)
ref
https://linear.app/tryghost/issue/ONC-57/trying-to-overwrite-the-default-source-theme-crashes-ghost

- When attempting to overwrite a default theme (source or casper), admin
would crash because this is not allowed by the API and the error was not
handled
- This fixes that by showing a modal with an error message when the user
tries to overwrite a default theme, and instructs the user to rename the
zip file
2024-05-30 15:55:45 -07:00
Peter Zimon
58d9b8e382
Update migration in settings (#19278)
refs.
7b40393d77

We're improving the usability and possibilities for publishers to
migrate from other platforms such as Substack, Medium or Mailchimp. This
PR applies changes to Ghost Settings to support the new flows, more
specifically:

- moves import and export functions out of Labs to its own setting,
directly available from search and the menu
- adds direct access to various platform migrations
- moves "Delete all content" to a dedicated setting group at the bottom
of all setting

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-12-13 16:25:29 +01:00
Jono M
a8083960d8
Added test examples to AdminX demo (#19116)
refs https://github.com/TryGhost/Product/issues/4182

Updated framework to include shared test config for easier app setup.
2023-11-23 12:59:48 +00:00
Jono M
f19f32b132
Moved AdminX test config to framework package (#19096)
refs https://github.com/TryGhost/Product/issues/4180
2023-11-22 13:39:32 +00:00
Princi Vershwal
1d8adc6e86
Added tests for offer list 2023-11-07 17:41:32 +05:30
Princi Vershwal
bf855e88fd
Wired up Offer list (#18889) 2023-11-07 14:02:27 +05:30
Peter Zimon
6691f0da26
AdminX Settings UX improvements (#18741)
refs. https://github.com/TryGhost/Product/issues/4060

The new settings screen is too dense, lacks hierarchy and hard to scan. This update addresses some of the problems of the initial version:
- clear hierarchy in typography and larger spaces between sections to make the overall structure is easier to scan
- using icons in the sidebar to strengthen the groups + help visual thinkers to remember settings better + just to be a bit less serious
- updated colors for better contrast + orientation (bg on the sidebar)
- updated input fields to help focus on filling forms
- other small improvements for more consistency and simplicity

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-10-25 16:37:58 +02:00
Sag
1b82efe5d2
Added Recommendations feature (#18743)
refs https://github.com/TryGhost/Product/issues/3744


Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-10-24 11:00:11 -03:00
Kevin Ansfield
9b1f79f601
Cleaned up lexicalEditor labs flag, switched Post model to lexical-by-default (#18607)
no issue

- flag is no longer used in Admin so we can clean it up in Core too
- updated Post model to set blank document to `lexical` field rather than `mobiledoc` as a default value
- switched over to returning `mobiledoc,lexical` as default formats in Admin API
2023-10-23 17:51:34 +01:00
Sag
96065f9c94
Added more acceptance tests for Recommendation settings (#18696)
closes https://github.com/TryGhost/Product/issues/3955

- also, moved recommendations code to the "membership" folder for
consistency with the UI
- also, renamed "yarn test:slowmo" to "yarn test:acceptance:slowmo" for
consistency in the naming
- also, removed "limit: 1" when checking whether a recommendation URL
already exists. The limit defaults to 5 on the API side, and allowing
more than 1 result will lead to a more thorough check
2023-10-18 18:56:34 +00:00
Sag
5c43945b94
Revert "Added Recommendations feature (#18664)" (#18694)
refs https://github.com/TryGhost/Product/issues/3744

- this reverts GA commit 4e338114de, as
launch has been postponed by a week
2023-10-18 17:03:35 +00:00
Sag
4e338114de
Added Recommendations feature (#18664)
refs https://github.com/TryGhost/Product/issues/3744

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-10-17 13:04:35 +00:00
Jono M
81d2fa09da
Redesigned Admin settings (#18545)
refs https://github.com/TryGhost/Product/issues/3832

Last piece of cleanup, removing the old feature flag. See
https://github.com/TryGhost/Ghost/pull/18360 for the commit that
actually switched over the routes.
2023-10-10 07:37:01 +01:00
Simon Backx
9abd466397
Renamed reason to description in recommendations table (#18527)
fixes https://github.com/TryGhost/Product/issues/4005

We no longer use the 'reason' of a recommendation, but allow a flexible
description instead. Because this is a breaking change in the API, we do
this before making this feature GA.
- Added new database utils for renaming a column
- Added new migration to rename the column
- Updated all references in code
2023-10-09 11:19:44 -03:00
Jono M
fb7bf6d01e
Improved AdminX test coverage based on old admin tests (#18502)
refs https://github.com/TryGhost/Product/issues/3832

---

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

This pull request improves the validation, customization, and feedback
of various form components and modals in the admin-x-settings app. It
also adds new components for user detail modal sections and modifies the
user type to allow null values for social accounts. Additionally, it
adds `dirty` props to some integration modals and a `data-testid`
attribute to the exit settings button. It also deletes an unused file.
2023-10-06 10:06:05 +01:00
Ronald Langeveld
d0cd7f040d
Added Recommendations Acceptance tests - Admin X (#18513)
no issue

---

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

This pull request adds acceptance tests for the recommendations feature
in the `admin-x-settings` app. It also updates the test utils module to
use the appropriate type and fixture for the recommendations API.
2023-10-06 10:52:18 +07:00
Ronald Langeveld
e82f845d5c
Added flags helper for Acceptance Tests in AdminX (#18500)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696495250115289

Adds a new helper function `toggleLabsFlag` that allows toggling of lab
flags within tests. This function can be used directly inside a test
case or within `beforeEach` or `beforeAll` hooks to set the initial
state before tests run.

Usage:
- To toggle a flag within a test: `toggleLabsFlag('recommendations',
false);`
- To set initial state in a hook: 
  ```javascript
  beforeEach(() => {
    toggleLabsFlag('recommendations', true);
  });

---

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

This change adds a utility module for acceptance testing of experimental
features in Ghost. It allows tests to mock and change the labs settings
using `defaultLabFlags` and `toggleLabsFlag`.
2023-10-05 20:12:54 +07:00
Ronald Langeveld
a596b3aaca
Renamed e2e tests to acceptance tests in Admin X (#18439)
ref https://www.notion.so/AdminX-testing-plan-99b2dab27e794fc893767ccd01c84a63?d=26612fc2b9d84e65bbb269fa3bc5079e&pvs=4#f0089cd4d9f24e93bd7f8e2868987bf6

This pull request renames the end-to-end tests to acceptance tests in
the `apps/admin-x-settings` folder. It updates the `ci.yml` file, the
`package.json` file, the `playwright.config.ts` file, and the test files
to reflect the new naming convention. This change aims to better reflect
the purpose and scope of the tests.
2023-10-03 16:20:40 +07:00
Jono M
0e35baaf01
Refactored limit=all queries to be paginated in AdminX (#18324)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at 0095d23</samp>

The pull request adds support for asynchronous and creatable select
inputs in various components, using the `react-select` and
`@tanstack/react-query` libraries. It also adds pagination features to
the newsletters and tiers lists, using a `Button` component and infinite
queries. It refactors and fixes the type and null handling of the select
inputs and their options, using the `SelectOption` type and the
`useFilterableApi` and `debounce` hooks. It removes some unnecessary
props from the browse queries, and adds a new custom hook
`useDefaultRecipientsOptions` for the default recipients component. It
updates the stories and modals to use the new select inputs and options.
2023-09-25 14:03:47 +01:00
Simon Backx
b82a93beac
Added recommendation_notifications column to users table (#18304)
fixes https://github.com/TryGhost/Product/issues/3939
2023-09-22 15:35:55 +00:00
Jono M
343535116c
Updated select to use react-select (#18164)
refs https://github.com/TryGhost/Product/issues/3832

---

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

This file updates the global form select component to use a custom
`ReactSelect` component with better performance and style.
2023-09-18 14:51:59 +01:00
Jono M
9b2387a364
Fixed bugs in AdminX portal and theme settings (#18099)
refs https://github.com/TryGhost/Product/issues/3832

- Fixed portal preview when no tiers are enabled
- Fixed portal preview not respecting access setting
- Disabled portal customisation when nobody can sign up
- Fixed custom theme settings not updated when theme is changed
- Added publication icon setting in newsletters
- Added extremely rudimentary editor role display
- Fixed drag overlay position in modals
2023-09-13 07:10:33 +00:00
Jono M
d33a70f40d
Added limit checks to AdminX settings (#17784)
refs https://github.com/TryGhost/Product/issues/3751

---

This pull request adds limit checks and upgrade prompts for various
features in the admin-x-settings app, such as staff, members,
newsletters, custom integrations, and custom themes. It uses a custom
hook called `useLimiter`, which relies on the `@tryghost/limit-service`
package and the host settings configuration data.
2023-08-23 21:04:27 +00:00
Ronald Langeveld
d9cee38a77
Wired up Pintura integration to AdminX (#17759)
refs https://github.com/TryGhost/Product/issues/3729

- Wired up the Pintura Integration to AdminX.

---

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

This pull request adds the ability to customize the Pintura image editor
with custom JS and CSS files in the advanced settings modal. It
introduces a new `files.ts` file in the `api` folder, which provides a
hook and a helper function for uploading and retrieving files. It also
modifies the `PinturaModal.tsx` component to use these functions and
display the settings.
2023-08-18 14:54:13 +02:00
Peter Zimon
9bfbd5b3b9
History log in AdminX (#17666)
refs. https://github.com/TryGhost/Product/issues/3710

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-08-14 12:11:53 +00:00
Jono M
a413f2b54f
Added tests for Stripe and Newsletter settings (#17598)
refs https://github.com/TryGhost/Product/issues/3608,
https://github.com/TryGhost/Product/issues/3601
2023-08-07 12:44:30 +01:00
Jono M
c46761199b
Cleaned up AdminX API handling (#17571)
refs https://github.com/TryGhost/Product/issues/3349

- Simplified a few more places after switching to react-query
- Improved how mocking works in specs to be more scalable as the number
of queries increases
2023-08-03 09:29:14 +01:00
Ghost CI
e2a6d8b987 Merged v5.57.2 into main 2023-08-02 15:12:37 +00:00
Steve Larson
6936007052
🐛 Updated gscan error handling for page errors (#17575)
refs https://github.com/TryGhost/Product/issues/3676

- add filter for sidebar display of theme errors (angry red box)
- filter specific to each page feature, will need to add each one by this approach
2023-08-02 09:56:40 -05:00
Jono M
8000df963b
Temporarily fixed eslint rules being disabled in AdminX (#17565)
no issue
2023-08-02 08:37:51 +01:00
Steve Larson
5fe72462bc
Enabled page features (#17544)
no refs
-moved hide page title and feature image to GA
-updated gscan
2023-07-31 14:22:19 -05:00
Jono M
55d243f470
Replace custom data loading with react-query (#17537)
refs https://github.com/TryGhost/Product/issues/3349
2023-07-31 18:27:30 +01:00
Steve Larson
e45b947d61
Updated gscan (#17521)
no refs
- add check for unknown global use in themes
- removed `@page` check until ready for release
2023-07-27 15:43:22 +00:00
Steve Larson
b77521ece9
Updated gscan (#17509)
no refs
2023-07-26 15:58:22 +00:00
Steve Larson
005e80b466
Updated gscan (#17507)
no refs
2023-07-26 13:06:23 +00:00
Jono M
0137f498d7
Added tests for tier edit modal (#17369)
refs https://github.com/TryGhost/Product/issues/3580
2023-07-14 13:04:34 +00:00
Rishabh Garg
36b23b49a9
Wired archived and active tiers list in adminX (#17300)
refs https://github.com/TryGhost/Product/issues/3580
2023-07-11 19:59:35 +05:30
Jono M
1cc55eda2e
Updated portal popup to support selecting and updating tiers (#17192)
refs https://github.com/TryGhost/Team/issues/3545
2023-07-04 19:17:42 +12:00
Jono M
768511c7cc
Added tests for more areas of AdminX settings (themes, design, multiselect) (#17134)
refs https://github.com/TryGhost/Team/issues/3349

Tidies up the remaining major pieces which were not covered by tests.
Extends the existing test patterns, although the API mocks are getting a
bit unmanageable.
2023-06-28 14:59:05 +12:00
Jono M
9e325d6b38
Added tests for user management (#17128)
refs https://github.com/TryGhost/Team/issues/3349
2023-06-26 15:12:46 +12:00
Daniel Lockyer
8c5e2a53a9 Moved Admin-X-Settings to apps/ folder
refs https://github.com/TryGhost/Toolbox/issues/594

- we're moving all the external apps into a different folder so we can
  keep `ghost/` for internal code
2023-06-23 14:37:39 +02:00