2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Commit graph

448 commits

Author SHA1 Message Date
Simon Backx
b868dd263d
Added plausible events to the recommendation modal (#18526)
fixes https://github.com/TryGhost/Product/issues/3841

- Wired up the trackEvent method in admin-X
- Send an event when a recommendation is added
2023-10-06 15:41:33 +02:00
Simon Backx
92b57b4bdf
Improved error handling in recommendation modals (#18524)
fixes https://github.com/TryGhost/Product/issues/3990

- Show errors on blur
- Show toast on submit (final modal only)
- Do an initial validation on mount
2023-10-06 12:23:18 +00:00
Jono M
3680c16362
Fixed AdminX CSS scoping to prevent overriding old admin styles (#18523)
refs https://github.com/TryGhost/Product/issues/3832

Tailwind raises errors if you try to use `important:
'.admin-x-settings'` and have custom styles for `.admin-x-settings`,
hence adding a new base class. We should sort these out when we extract
the design system.

---

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

Scoped base and theme styles to the `admin-x-settings` app by adding a
class to the app root element and updating the `index.css` file. This
improves the app's isolation and reduces code duplication.
2023-10-06 13:02:21 +01:00
Daniel Lockyer
07e603a5cd Reverted "Update sentry-javascript monorepo to v7.73.0"
- this reverts commit ec5e2cef20
2023-10-06 13:46:17 +02:00
renovate[bot]
ec5e2cef20 Update sentry-javascript monorepo to v7.73.0 2023-10-06 11:12:32 +02: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
renovate[bot]
caf104dbb4 Update dependency @types/validator to v13.11.2 2023-10-06 11:01:24 +02:00
renovate[bot]
5b46f246ef Update dependency @ebay/nice-modal-react to v1.2.13 2023-10-06 08:56:57 +00:00
renovate[bot]
b2cebdc9b0 Update dependency vite to v4.4.11 2023-10-06 07:55:29 +02: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
Kevin Ansfield
d812781888
Prevented Escape from closing the image editor (#18505)
no issue

`Escape` can often be hit when attempting to cancel or undo an action
through muscle memory despite it not doing anything in Pintura except
closing the modal and losing all changes

- added `willClose` option to the Pintura modal settings which only
returns `true` when we've detected a click on the close button
2023-10-05 17:30:56 +01: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
Nick Moreton
8122f02f17
Added resize option to Pintura (#18504)
Got some code for us? Awesome 🎊!

Please include a description of your change & check your PR against this
list, thanks!

- [ ] There's a clear use-case for this code change, explained below
- [ ] Commit message has a short title & references relevant issues
- [ ] The build will pass (run `yarn test:all` and `yarn lint`)

We appreciate your contribution!

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-10-05 13:08:23 +00:00
Nick Moreton
d454f18ad2
Removed sticker option from Pintura (#18497)
Removed the sticker feature from the image editor component in both the
new and the legacy admin apps. This simplifies the UI and the code of
the `usePinturaEditor.ts` and `koenig-image-editor.js` files.
2023-10-05 10:32:13 +01:00
Ronald Langeveld
929d05a33b
Fixed sidebar order of Newsletters section - X (#18493)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696490815762949

- Fixed a tiny issue where the Sidebar Navigation doesn't align with the
newsletter options.
- Got rid of some unused commented out code that's not needed.
2023-10-05 15:20:18 +07:00
Ronald Langeveld
d1b92a04a3
Changed HTML Editor to use Koenig's onFocus (#18492)
no issue

- we added a new plugin in Koenig which exposed a new onFocus plugin,
meaning we can get this directly from Koenig instead of hacking the html
dom.
- changed the HTML Editors onFocus function to use Koenig's / Lexical's
built in OnFocus plugin.

---

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

Fix editor toolbar disappearing bug in `HtmlEditor.tsx`. Use focus
plugin from `Koenig` package to handle editor focus.
2023-10-05 12:47:29 +07:00
Djordje Vlaisavljevic
27cec8b909
Improved "Copy link" design (#18486)
refs https://github.com/TryGhost/Product/issues/3974
2023-10-04 19:16:08 +01:00
Djordje Vlaisavljevic
cbd43d38a8 Added a tooltip to the "Copy link" button
refs https://github.com/TryGhost/Product/issues/3974
2023-10-04 18:21:32 +01:00
Djordje Vlaisavljevic
1e5b52b368 Added label showing if you're already recommending back a site recommending you
refs https://github.com/TryGhost/Product/issues/3978
2023-10-04 18:21:32 +01:00
Djordje Vlaisavljevic
9a45b0b785 Made recommendation modals footer sticky
no refs
2023-10-04 18:21:32 +01:00
Sag
15adb254f0
Added an option to recommend back in Admin Settings (#18478)
refs https://github.com/TryGhost/Product/issues/3978

- added "GET /incoming_recommendations/" browse endpoint to the Admin
API - we store incoming recommendations as mentions in the database. The
new endpoint reuses the Mentions API underneath to fetch verified
mentions of type recommendation - recommendation-specific attributes are
returned by the new endpoint, including calculated fields such as the
"RecommendingBack" boolean
- show "Recommend back" option for sites recommending me, only if I
haven't recommended the site already
2023-10-04 15:22:04 +00:00
Steve Larson
4bdd8366ea
Removed beta editor flag from admin x settings (#18473)
no refs
2023-10-04 13:35:34 +00:00
Peter Zimon
09af419db0
Update "Saved" button state in AdminX (#18469)
refs. https://github.com/TryGhost/Product/issues/3949

- "Saved" state of buttons in modals were not distinct enough to see
that there's been a successful save
2023-10-04 14:34:41 +02:00
Peter Zimon
223a1d7767
Adding CMD/CTRL+S to AdminX (#18466)
refs. https://github.com/TryGhost/Product/issues/3949

- it wasn't possible to save setting values in AdminX with CMD/CTR+S
2023-10-04 13:36:06 +02:00
Ronald Langeveld
70a805463a
Added Portal acceptance tests in Admin X (#18465)
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 7ab405d</samp>

This change adds a new file `portal.test.ts` that contains acceptance
tests for the Portal Settings feature in the admin-x-settings app. The
tests use Playwright to verify that the portal settings can be
customized and saved correctly. The change aims to improve the test
coverage and confidence for the new feature.
2023-10-04 11:06:59 +00:00
Peter Zimon
235b346fda
AdminX UX improvements (#18449)
refs. https://github.com/TryGhost/Product/issues/3949

- added `isSearchable` to Select component (default `false`) so that only specific selects are searchable
- added `onFocus` and `onBlur` to select so that it can search for "/" and doesn't jump to the searchfield
2023-10-04 12:09:04 +02:00
renovate[bot]
6ec3a600cc Update dependency vite to v4.4.10 2023-10-04 08:35:18 +02:00
Sodbileg Gansukh
58ccca378a Source theme improvements in AdminX
no issues

- now the crossfade effect starts immediately after Source theme thumbnail is hovered
- fixed theme category text shifting when transitioning
- the hover effect now only applies to Source theme thumbnail
2023-10-04 10:32:01 +08:00
Ronald Langeveld
f9478f5489
Added unit test for Embed Code Generator - AdminX (#18445)
no issue

Add unit tests for `generateEmbedCode` utility function. The tests
verify the HTML output for various options and parameters that affect
the appearance and behaviour of the generated embed script's output.
2023-10-04 08:43:02 +07:00
Michael Barrett
2373a51ee4
Fixed storybook failing to load due @tryghost/nql usage (#18453)
no refs

storybook was failing to load due to `@tryghost/nql` usage and the
global `vite` config not being used
2023-10-03 16:49:05 +01:00
Djordje Vlaisavljevic
84520f86f7 Updated recommendation preview design
refs https://github.com/TryGhost/Product/issues/3991
2023-10-03 16:34:30 +01: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
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