Commit Graph

497 Commits

Author SHA1 Message Date
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
Ronald Langeveld
a9ad08cf89
Fixed API Query permissions in User Settings (#18680)
refs
https://www.notion.so/ghost/Cannot-fetch-invites-error-shown-for-authors-edc00af822d844e7add114fd834fc8fc

- the problem is that certain users don't have permissions to make
certain API calls.
- This adds a new hook that validates the current user against
permissions before a query can be made.

---

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

Added a `usePermission` hook and a `permissions` option for custom API
queries to implement role-based permissions in the admin settings app.
2023-10-18 17:04:59 +07:00
Peter Zimon
e8768f040c
Fixed viewport width bug in AdminX (#18681)
refs. https://github.com/TryGhost/Product/issues/3949

- the viewport was getting really wide because of the whitespace
property of newsletter descriptions
2023-10-18 10:55:09 +02: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
Jannis Fedoruk-Betschki
40a2bdad20
🎨 Improved search keywords in Admin-X Settings (#18608)
fixes https://github.com/TryGhost/Ghost/issues/18661
2023-10-17 13:57:43 +02:00
Djordje Vlaisavljevic
fe90778816 Updated copy
refs https://github.com/TryGhost/Product/issues/4030
2023-10-17 10:50:15 +01:00
Jono M
422f486de4
Improved AdminX scrolling behaviour (#18640)
refs https://github.com/TryGhost/Product/issues/3832

Hopefully the scrolling finally works consistently

- Fixed a bug where clicking the navigated section wouldn't scroll to it
- Fixed a bug where the first click after opening settings wouldn't
animate the scroll
- Fixed a bug where the sidebar would always animate scroll even on the
initial page load

---

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

This pull request improves the scrolling and navigation functionality of
the settings page by using a custom hook and a context provider. It
refactors the `RoutingProvider` and the `useScrollSection` hook to
handle the route and sidebar changes more efficiently, and simplifies
the code by removing unnecessary components and state. It also adds new
functions to the scroll section context data to update and scroll to the
desired section.
2023-10-17 09:05:10 +01:00
Ronald Langeveld
a562cc7c7f
Fixed default theme button in theme settings (#18656)
no issue

- the default theme (currently Source) showed Activate despite being
active already, which may lead to confusion.
- This fix checks whether it's already to more accurately display the
wording of the button

---

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

Fix theme preview button label for default theme. Hide the activate
button for the default theme if it is already active in
`ThemePreview.tsx`.
2023-10-17 10:15:58 +07:00
Djordje Vlaisavljevic
0271928d1c Removed import
refs https://github.com/TryGhost/Product/issues/4024
2023-10-16 18:27:04 +01:00
Djordje Vlaisavljevic
95978bbffa Removed recommendations table header
refs https://github.com/TryGhost/Product/issues/4024
2023-10-16 18:27:04 +01:00
Djordje Vlaisavljevic
08f81dbf90
Updated recommendations design (#18614)
refs https://github.com/TryGhost/Product/issues/4024, https://github.com/TryGhost/Product/issues/3938

- Improved email notification template
- Added `for you` next to the click/subscribe stats

---------

Co-authored-by: Sag <guptazy@gmail.com>
2023-10-16 18:04:15 +01:00
Jono M
ce9f6ec69a
Fixed bugs with saving in portal modal (#18649)
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 8ad5f58</samp>

This pull request enhances the portal modal component in the admin
settings for membership. It improves how it handles errors, saves
changes, and communicates with the user.
2023-10-16 16:06:38 +01:00
MC Naveen
59d3882c9f
Added theme version in design settings (#18623)
### Why this PR?

This PR adds back the current theme version in Design Settings screen


![image](https://github.com/TryGhost/Ghost/assets/8493007/88f475f6-9bba-4dda-8db7-0bddd2fee8a3)


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

---

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

This pull request improves the code quality and user interface of the
design modal component for site settings. It applies code formatting
rules and shows the active theme version on the save button.
2023-10-16 15:37:04 +01:00
Jono M
c2f3721e41
Fixed page jump on modal close in Safari (#18624)
refs https://github.com/TryGhost/Product/issues/4018

---

### <samp>🤖 Generated by Copilot at 5c51ade</samp>

Fix modal scrolling bug in Safari by blurring active element and
delaying close. Affect `Modal.tsx` component.
2023-10-16 09:53:49 +01:00
Daniel Lockyer
39848883df Fixed Mailgun API key link
fixes https://github.com/TryGhost/Ghost/issues/18630

- the previous link was incorrect/outdated
2023-10-16 08:27:17 +02:00
Jono M
31b3905f8d
Fixed "delete all content" modal not closing in AdminX (#18620)
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
2023-10-13 17:50:44 +00:00
renovate[bot]
3a7de860e2 Update dependency @types/validator to v13.11.3 2023-10-13 16:11:49 +02:00
Adarsh Shrivastav
d47863940c
Fixed dark header issue for Admin-X (#18584)
closes #18579

* added the bg-black class for the header div conditionally for dark mode
2023-10-13 09:38:53 +02:00
Ronald Langeveld
7d493d61db
Cleaned up Unsplash component in Admin (#18603)
no issue

- Fixed a bug where the Unsplash button in site design didn't hide if
the integration was disabled.
- Cleaned up Unsplash in preparation for moving it to it's own package
in future.

---

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

Refactored and improved the Unsplash integration feature in the admin
settings app. Moved all files related to Unsplash to a separate
`unsplash` folder and renamed some classes and interfaces to avoid
confusion. Added a feature flag for Unsplash in the brand settings
component and a prop to customize the portal container for the Unsplash
search modal. Created a new class `PhotoUseCases` to handle the logic
for fetching, searching, and downloading photos from Unsplash.
2023-10-13 14:15:14 +07:00
renovate[bot]
b3116aaa4f Update react monorepo 2023-10-13 09:07:09 +02:00
Djordje Vlaisavljevic
ddf8cd1fdc Improved recommendation preview in dark mode
refs https://github.com/TryGhost/Product/issues/3948
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
45239fcc37 Added header to Recommendations table
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
d96eca7aaf Made cells only take up as much space as they need
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
3bc6d331e9 Added colspan support to TableHead
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Djordje Vlaisavljevic
e7b1d7afa9 Made it easier to override TableCell padding
refs https://github.com/TryGhost/Product/issues/4024
2023-10-12 13:50:53 +01:00
Ronald Langeveld
f4a36ecba4
Fixed link to release in About modal (#18588)
no issue

- the link to the release has `-moya` added to it, which breaks the link
to the github release. This ensures it gets removed should it be there
to avoid broken links.

---

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

Refactored the `About.tsx` component to extract some utility functions
to separate modules. Added unit tests for the extracted functions in the
`test/unit/utils` folder. The refactoring improves code organization and
reusability, and the tests increase the code coverage and reliability.
2023-10-12 08:37:56 +07:00
Sag
e0f9d2cd26
Fixed Explore link in the AddRecommendation modal (#18583)
closes https://github.com/TryGhost/Product/issues/4019
2023-10-11 18:29:31 +00:00
Djordje Vlaisavljevic
8822725c01 Improved recommendations stats design
refs https://github.com/TryGhost/Product/issues/4024
2023-10-11 17:03:21 +01:00
Djordje Vlaisavljevic
f917cf91ef Fixed Table wrapper overflow issue
refs https://github.com/TryGhost/Product/issues/4024
2023-10-11 17:03:21 +01:00
Djordje Vlaisavljevic
e025ffa085 Fixed Hint margin regression
refs https://github.com/TryGhost/Product/issues/4024
2023-10-11 17:03:21 +01:00
Jono M
704b041202
Fixed handling of null URLs in tier add form (#18575)
refs https://github.com/TryGhost/Product/issues/3832

Updates to match the old admin, where nothing in the text field means
null and the URL is not formatted until you enter something.
2023-10-11 15:21:16 +01:00
Peter Zimon
586efd1f60
Added "about" modal to AdminX
refs. https://github.com/TryGhost/Product/issues/3949

Added an about modal to the new admin x settings.
---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2023-10-11 16:09:56 +07:00
Sag
9e51a8be88
Updated sorting in the recommendations settings (#18560)
closes https://github.com/TryGhost/Product/issues/4020
- show most recently created recommendations first
2023-10-10 16:36:00 +00:00
Djordje Vlaisavljevic
17c0e3ee60 Updated "Show all" button design
refs https://github.com/TryGhost/Product/issues/3936
2023-10-10 16:10:25 +01:00
Michael Barrett
cfa5caaec5
🐛 Fixed theme demo when multiple themes with variants (#18558)
no refs

When multiple themes had variants, the theme demo functionality was not
working correctly and triggering the demo for all themes at once
2023-10-10 13:37:28 +00:00
Michael Barrett
9a18d43ea6
Refactored theme demo selector functionality (#18541)
refs https://github.com/TryGhost/Product/issues/3999

Refactored the theme demo functionality to remove the hard-coded
reference to the source theme and enable the functionality for any
theme.
2023-10-10 09:19:08 +01: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
Jono M
4b07de885a
Restored newsletter email verification flow (#18548)
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 8a40cbc</samp>

This pull request adds a feature to verify the sender email address for
a newsletter in the admin settings app. It implements a UI component, a
custom hook, and a server-side service to handle the verification
process. It also fixes a minor typo and a navigation issue in the
newsletters module.
2023-10-10 07:34:48 +01:00
Jono M
7f2dc6e5fa
Fixed popover "right" position in AdminX (#18549)
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 babb461</samp>

This pull request enhances the popover component in the
`admin-x-settings` app. It fixes a bug with the alignment of the popover
and refactors the style object for better readability and
maintainability.
2023-10-10 07:34:35 +01:00
Peter Zimon
e6f4144909
AdminX storybook updates (#18503)
refs. https://github.com/TryGhost/Product/issues/3949
2023-10-09 17:04:01 +02: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
renovate[bot]
a2dd0ea1ca Update react monorepo 2023-10-09 15:08:48 +02:00
Ronald Langeveld
00cfecadf4
Fixed subscription access route in Admin settings (#18538)
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1696844453572279

- we renamed the access route to members route and never updated the
link. 
- This adds the correct link in the newsletter sending setting.

---

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

Fixed a navigation bug in the email settings UI and refactored the
settings UI for better usability. Updated the `onClick` handler of the
`Banner` button in `EnableNewsletters.tsx` and other related files.
2023-10-09 10:16:41 +00:00
Ronald Langeveld
71a8df9f52
Fixed toasts not disappearing after settings reload (#18535)
refs
https://www.notion.so/ghost/AdminX-feedback-27fc7f549bbf4a53bfa2e7b6e5643963?p=d8bb2da9a6534494ad5baf840bbfd785&pm=s

- The error state remains visible after navigating away from settings
- this fix resets the toast on initial load to ensure it doesn't persist
if not needed
---

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

Improved notifications on settings page using `toast` function. Cleared
old notifications on initial load to avoid confusion.
2023-10-09 15:12:33 +07:00
Daniel Lockyer
8a4e81fadd
Fixed splitting string into characters (#18480)
- quite funny because it's such a sneaky thing to discover
- this code actually results in looping over
`'xxxxx<,t,e,s,t,f,o,o,t,>'` and not an array of characters
- adding brackets fixes that

---

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

Fix a bug in the code injection test case for the admin settings app.
Ensure that the test code is properly padded and split by using
parentheses in the string concatenations.

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-10-09 09:07:34 +01:00
Michael Barrett
bc3ad1a798
Refactored theme demo functionality (#18525)
refs https://github.com/TryGhost/Product/issues/3998

Refactored the theme demo functionality to remove the hard-coded
reference to the source theme and enable the functionality for any
theme. This also ensures the demo images are correctly referenced in
pro.
2023-10-09 09:05:43 +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
Ronald Langeveld
741a00fe05
Fixed confirmation modals on Integrations - Admin X (#18534)
refs
https://www.notion.so/ghost/AdminX-feedback-27fc7f549bbf4a53bfa2e7b6e5643963?p=39e45d28cd2643888b82d5e9cc0901a3&pm=s

- The logic was correct, but the string value from the API passed in
null when
  empty instead of an empty string.
- this takes a potential null into account to be able to make the
  condition comparison more reliable.

---

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

Fixed some issues with the state management and input handling of the
`AmpModal` and `FirstPromoterModal` components in the admin settings
app. These changes prevent errors and warnings when the integrations are
null, disabled, or unconfigured.
2023-10-09 11:52:56 +07:00
renovate[bot]
ac3714dee3 Update dependency @tanstack/react-query to v4.36.1 2023-10-09 02:02:14 +00:00
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