Commit Graph

1031 Commits

Author SHA1 Message Date
Djordje Vlaisavljevic
a5a5c2ea71 Updated recommendation preview design
refs https://github.com/TryGhost/Product/issues/3991
2023-10-03 12:06:55 +01: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
Simon Backx
8d1320a225
Wired up 'show all' recommending you (#18440)
fixes https://github.com/TryGhost/Product/issues/3975
2023-10-03 08:57:14 +00:00
Ronald Langeveld
514f36b4f2
Added install theme from URL in AdminX (#18435)
refs
https://www.notion.so/ghost/AdminX-feedback-27fc7f549bbf4a53bfa2e7b6e5643963?p=6fc16caf7f0d42f2933e28e1519c3623&pm=s

- added ability to install a theme directly from the Ghost Marketplace.
- uses the existing URL pattern / route to ensure they remain compatible with the existing Ghost Marketplace.

---

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

This pull request enables users to install and activate themes from the
Ghost Marketplace, a curated collection of themes for the Ghost
platform. It adds a new route and modal component to handle the theme
installation from a URL, and modifies the existing modal components to
support the theme activation and confirmation. It affects the files
`ThemeModal.tsx`, `RoutingProvider.tsx`, and `DesignAndThemeModal.tsx`.
2023-10-03 12:33:08 +07:00
renovate[bot]
965110f005 Update dependency @storybook/testing-library to v0.2.2 2023-10-02 21:47:09 +02:00
Simon Backx
2f09dd8880
Added click/subscriber based sorting to recommendations list (#18427)
fixes https://github.com/TryGhost/Product/issues/3957

- This change also defaults to show the click count when there are 0
subscribers from a site (otherwise sorting looks weird).
2023-10-02 15:25:59 +00:00
Michael Barrett
043c9bb35d
Port custom theme setting visibility to admin-x (#18367)
refs https://github.com/TryGhost/Product/issues/3962

Port custom theme setting visibility to admin-x based on previous
implementation in the Ghost admin:
https://github.com/TryGhost/Ghost/pull/17920
2023-10-02 15:54:14 +01:00
Djordje Vlaisavljevic
b4fa48539d Updated "Copy link" button design
refs https://github.com/TryGhost/Product/issues/3974
2023-10-02 14:47:41 +01:00
Djordje Vlaisavljevic
27caa288e2 Added "Recommend back" button to settings
refs https://github.com/TryGhost/Product/issues/3978
2023-10-02 14:47:41 +01:00
Sag
b1e4ead01c
Fixed uniqueness validation of Recommendation URL (#18383)
refs https://github.com/TryGhost/Product/issues/3818

- added a check to compare hostname and pathnames of URLs. Different
subdomain or different pathname = different URLs, but protocol, www,
query parameters and hash fragments are ignored.
2023-10-02 10:34:59 -03:00
Peter Zimon
8b6360f52e
Simplified Twitter logo SVG in AdminX (#18418)
refs. https://github.com/TryGhost/Product/issues/3949

- Twitter logo SVG had a lot of unnecessary classnames
2023-10-02 12:44:13 +00:00
Peter Zimon
b490057429
Refactor user detail modal in AdminX (#18414)
refs. https://github.com/TryGhost/Product/issues/3949

- the User detail modal class structure was way overcomplicated
- the top part of the outline highlight of a setting group which is first in a section was cut
- toggle label style was inconsisten in Newsletter settings
- Audience feedback was not enabled by default when creating a Newsletter
- the whole UI was using Twitter, instead of "X"
2023-10-02 14:14:46 +02:00
Djordje Vlaisavljevic
cb66447747
Improved recommendations settings design (#18412)
refs https://github.com/TryGhost/Product/issues/3974, https://github.com/TryGhost/Product/issues/3936, https://github.com/TryGhost/Product/issues/3948

- Added dark mode improvements
- Added "Show more" button in "Recommending you" list
- Added "Copy link" button to settings
2023-10-02 10:16:21 +00:00
Jono M
bb0dff3571
Updated to highlight searched keywords in AdminX settings (#18112)
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 1347a85</samp>

Added search functionality to the settings page using a custom hook and
a service. The `useSearch` hook uses the `useSearchService` function to
create a search service object that provides the filter and highlight
logic. The `highlightKeywords` function from the search service is
passed to the `SettingsGroupHeader` component to render the settings
with the matching keywords.
2023-10-02 09:33:24 +01:00
renovate[bot]
2ad0e73c42 Update dependency react-select to v5.7.7 2023-10-02 09:19:07 +02:00
renovate[bot]
de3a222231 Update dependency postcss to v8.4.31 2023-10-02 08:51:53 +02:00
renovate[bot]
18c6c70d3d Update dependency react-select to v5.7.6 2023-10-02 08:51:00 +02:00
Ronald Langeveld
9ae2e24315
Fixed overwritten theme duplication in ThemeList (#18405)
refs
https://www.notion.so/ghost/AdminX-feedback-27fc7f549bbf4a53bfa2e7b6e5643963?p=6a295239a38840f18b0a3b1710095074&pm=s

- There was an issue where an overwritten theme would be included in the
themes array twice when passed to the ThemeList component.
- We now remove the initial theme from the array when overwriting to
avoid duplications.

---

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

This pull request refactors the theme problem view component to make it
reusable and fixes a bug with theme name display in the theme modal. It
affects the files `InvalidThemeModal.tsx` and `ThemeModal.tsx` in the
admin-x-settings app.
2023-10-02 09:50:23 +07:00
renovate[bot]
f5b2bdd41e Update dependency @tanstack/react-query to v4.35.7 2023-10-02 01:18:34 +00:00
Daniel Lockyer
6e46e8b5ba
Refactored loading of Koenig-Lexical package (#18392)
refs https://ghost.slack.com/archives/C02G9E68C/p1695901801049219?thread_ts=1695035790.122589&cid=C02G9E68C

- DRY up all the fetching of Koenig-Lexical so we only do it from one place
- this will help when we switch to loading Koenig-Lexical from local assets

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-09-28 17:43:12 +02:00
Djordje Vlaisavljevic
e4f518868e
Updated Recommendations design (#18390)
refs https://github.com/TryGhost/Product/issues/3938

- Updated "Recommendation received" email design
- Slightly improved how dark favicons show in dark mode
- Added TabView with counter variant to Storybook
2023-09-28 15:22:00 +01:00
Simon Backx
f1a2565ac2 Removed paid conversions column from incoming recommendations
fixes https://github.com/TryGhost/Product/issues/3968
2023-09-28 15:36:31 +02:00
Simon Backx
44ad71e06a Centered recommendation spinner
no issue
2023-09-28 15:36:31 +02:00
Ronald Langeveld
1f73028729
Added invalid theme modal to AdminX (#18387)
refs
https://ghost.slack.com/archives/C0568LN2CGJ/p1695801433166809?thread_ts=1695741379.821479&cid=C0568LN2CGJ

---

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

This pull request adds a new feature to show a modal with the errors of
an invalid theme when uploading a theme fails in the admin settings app.
It creates a new `InvalidThemeModal` component that uses the
`admin-x-ds` library and the `ThemeProblemView` component to display the
error details. It also updates the `handleError` function to handle JSON
errors for theme uploads.
2023-09-28 11:09:29 +00:00
Simon Backx
05215734af
Added recommend back URL (#18382)
refs https://github.com/TryGhost/Product/issues/3958

- Disabled automatic network retries for external site lookups (=> timed
out to 5s in every situation because it returned 404 when a site doesn't
implement the Ghost api)
- Disabled representing a modal when it is already present on hash
changes
- Added support for search params in modals
- Handle `?url` search param in the addRecommendationModal
2023-09-28 10:54:16 +00:00
Sag
63ac90c603
Moved autoFocus to the title, when adding a recommendation (#18384)
no issue
2023-09-27 16:25:44 +00:00
Sag
3d91c37d5b
Added Enter as shortcut to go next, when adding a recommendation (#18381)
closes https://github.com/TryGhost/Product/issues/3953
2023-09-27 17:03:36 +02:00
Sag
488ef87a7d
Added limit to the description size, when adding/editing a recommendation (#18380)
closes https://github.com/TryGhost/Product/issues/3960

- recommendation description is limited to 200 characters, so that it renders nicely in Portal
2023-09-27 13:04:25 +00:00
Michael Barrett
d406d2ba6a
🐛 Fixed incorrect subscription status text when subscription is comped (#18369)
refs https://github.com/TryGhost/Product/issues/3963

The subscription status text was incorrect when a subscription was
comped and a member had multiple subscriptions (i.e a cancelled sub and
a comped sub). This was because the methods used to determine the status
of a subscription only took into account the status of the first
subscription associated with a member.
2023-09-27 08:46:55 +01:00
renovate[bot]
d9ec7a0b90 Update dependency @vitejs/plugin-react to v4.1.0 2023-09-27 09:36:39 +02:00
Ronald Langeveld
7bebe7daf4
Fixed theme preview on theme without styles (#18375)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695741379821479

- Fixes a bug in the preview renderer where a theme without styles
wouldn't be handled properly as it cannot inject new styles and cause an
empty page to be returned.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-09-27 12:32:11 +07:00
Peter Zimon
e5ef88de5b
Fixed Stripe modal bottom padding in AdminX (#18366)
refs. https://github.com/TryGhost/Product/issues/3949
2023-09-26 22:37:52 +02:00
Jono M
fb435cc115
Fixed minor issues with AdminX Ember sync (#18359)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-26 12:23:52 +00:00
Ronald Langeveld
5161009e56
Added progress spinner to the theme upload button (#18358)
no issue

- Added a progress spinner to the theme upload button in AdminX for
better UX.

---

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

Improved user feedback for theme upload feature. Added a loading
indicator to the `ThemeModal` component to show the progress of the
`uploadTheme` function.
2023-09-26 11:38:09 +00:00
Ronald Langeveld
6eb5dfa29b
Added null safety checks in AdminX actions (#18356)
no issue

- added additional null safety checks to the actions utility in 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 e10aa52</samp>

Refactored `action.context` access in `actions.ts` to use optional
chaining. This makes the code more concise and robust.
2023-09-26 18:29:43 +07:00
Jono M
d51322c95b
Updated AdminX API error handling to report to Sentry (#18300)
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 d434b20</samp>

This pull request refactors the error handling logic in various
components of the admin-x-settings app to use a custom hook called
`useHandleError`. This hook wraps the Sentry integration and provides a
consistent and reliable way of reporting and logging errors. This
improves the code quality, readability, and maintainability of the app.
The pull request also improves the Sentry initialization by passing the
DSN and the environment to the `ServicesProvider` component.
2023-09-26 11:09:42 +01:00
Ronald Langeveld
4f3b35e4dd
Fixed errors not displaying when uploading broken theme in Admin X (#18350)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695716107796769

- The main culprit here was that now since we moved to using some model data from Ember as opposed to just the API, the errors key had to be renamed to gscan_errors  as that's how it's named in the Ember theme model.

---

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

Updated the theme modal and the theme installed modal to use the new
`gscan_errors` property for theme validation. This improves the accuracy
and consistency of the feedback given to users when they upload or
activate themes.
2023-09-26 16:57:50 +07:00
Ronald Langeveld
6d0da713f0
Revert "Fixed actions crashing on post history"
Revert "Improved null handling on Admin X" and Revert "Fixed actions
crashing on post history"

no issue
2023-09-26 15:07:43 +07:00
Ronald Langeveld
1f2f0a7322
Improved null handling on Admin X actions (#18346)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695642553045059

- The previous commit didn't quite handle things as expected. This adds
more null handling.
---

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

This pull request improves the robustness and accuracy of the admin
settings API for actions. It adds checks and logic to handle missing or
invalid data and custom post types in `actions.ts`.
2023-09-26 06:58:35 +00:00
Ronald Langeveld
677c829c4b
Fixed actions crashing on post history - Admin X (#18344)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695642553045059

- this attempts to fix an undefined error on AdminX when accessing
history log.
- At the moment I only have it reproducible on staging, so if this doesn't fix it, it will potentially be reverted.

---

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

Improve context handling for action events in `actions.ts`. Use a
variable to simplify and customize the action name and title based on
the context.
2023-09-26 12:30:49 +07:00
Ronald Langeveld
41576d2dc3
Fixed Pintura url not handling relative config url on import (#18343)
no issue

- Fixed the Pintura hook not handling relative urls passed to it from the config.

---

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

Fixed Pintura asset loading from subdirectories by using the admin root
path. Updated `usePinturaEditor` hook to import and use a helper
function for getting Ghost paths.
2023-09-26 01:57:01 +00:00
Jono M
328a785065
Updated AdminX to sync data changes to Ember (#18327)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at 7a91ba3</samp>

This pull request enables data synchronization between the Ember app and
the React app for the settings module. It passes `onUpdate` and
`onInvalidate` functions as props from the Ember app to the React app
through the `ReactApp` component and the `ServicesContext`. It also
removes unused code and adds some debugging logs in the `setting`
serializer and the `settings` service.
2023-09-25 17:29:09 +01:00
Peter Zimon
731f0c2a5e
AdminX settings GA design refinements (#18332)
refs. https://github.com/TryGhost/Product/issues/3949

- some minor copy had to be updated
- we had a little bug in the small version of dropdowns
- the crash page was just a plain text without any way out (e.g. allowing navigating to dashboard)
2023-09-25 17:49:12 +02:00
Sag
b304a88a63
Hooked 'Maybe Later' button in the Recommendations modal (#18337)
closes https://github.com/TryGhost/Product/issues/3824
2023-09-25 15:25:28 +00:00
Djordje Vlaisavljevic
9b1be9dda7 Removed unnecessary check
refs https://github.com/TryGhost/Product/issues/3941
2023-09-25 15:29:38 +01:00
Djordje Vlaisavljevic
21bdd38b37 Added "Maybe later" button to recommendations modal
refs https://github.com/TryGhost/Product/issues/3824
2023-09-25 15:29:38 +01:00
Djordje Vlaisavljevic
c62483c95b Added recommendation favicon placeholder div
no ref
2023-09-25 15:29:38 +01:00
Jono M
aa8063d081
Slightly improved AdminX pagination behaviour (#18331)
refs https://github.com/TryGhost/Product/issues/3832

---

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

This pull request fixes pagination bugs and improves pagination features
in various components and hooks of the admin settings app. It uses the
`meta` object from the API responses to display and fetch the correct
number of items in the lists of newsletters, tiers, users and actions.
It also simplifies and refactors some of the code to avoid repetition
and unnecessary properties.
2023-09-25 14:09:35 +00: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
Peter Zimon
c4773b946b
AdminX handling '/' in textfields vs. searchbar shortcut (#18283)
refs. https://github.com/TryGhost/Product/issues/3349

- We've added a keyboard shortcut '/' to focus in on the searchfield in
AdminX. However this didn't handle the case when the focus is already in
a textfield and when tried to enter e.g. "https://", then at the '/'
character it focused on the searchfield.

---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2023-09-25 14:22:10 +02:00