Commit Graph

3293 Commits

Author SHA1 Message Date
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
Steve Larson
498c375240
Added placeholder for beta editor (#18339)
closes TryGhost/Product#3906
- show placeholder 'post' for posts and 'page' for pages
2023-09-25 15:39:54 +00:00
Naz
19306228b2 Removed visible route link for collections
refs https://github.com/TryGhost/Arch/issues/95

- Collections should not be visible in the UI for now. Only the API part is GA at the moment.
2023-09-22 22:33:50 +08:00
Djordje Vlaisavljevic
b5f110aabf Hide attribution table sort indicator when there are no paid tiers
no ref
2023-09-22 13:29:29 +01:00
Kevin Ansfield
43b76056ca
Prevented background click closing members import modal (#18296)
no issue

- we don't want accidental background clicks closing this modal as it contains complex UI rather than a simple notification
- the members import modal is still using the old/outdated modal pattern so there was no option for disabling background click, went with a quick-fix for now rather than updating everything to our modern modal patterns
  - added passthrough of arguments to the `close` action on `<GhFullscreenModal>`
  - updated `<GhFullscreenModal>` background click handler to pass "background" as an action argument
  - updated the action used for handling members import modal closing to skip closing when it receives "background" as the first argument
2023-09-22 12:01:34 +00:00
Sag
a04c691fa0
Added recommendations as suggestions to the Button, Header, Email CTA cards (#18293)
closes https://github.com/TryGhost/Product/issues/3933
2023-09-22 09:58:44 +00:00
Sanne de Vries
fd13712579
Added bookmark back to published posts in Beta editor (#18289)
No ref
- By popular request, a bookmark of the published post is now shown
after publishing
- The 'Published' status in the editor now links to the published post
2023-09-22 09:54:51 +00:00
Ronald Langeveld
f7b50456ea
Added Sentry integration to Admin X (#18288)
no issue

- Adds Sentry to Admin X settings to be able to monitor uncaught errors, etc.

---

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

Added Sentry integration to the admin-x-settings app to improve error
monitoring and reporting. Updated the `ErrorBoundary` and `HtmlEditor`
components, the `useFetchApi` hook, and the app component to use the
`@sentry/react` module. Passed the `sentryDSN` prop from the parent
component to the app component and the services context.
2023-09-22 09:17:04 +00:00
Ronald Langeveld
9339364dce
Added Unsplash selector to AdminX (#18216)
no issue

- Copied over the Unsplash Component from Koenig to AdminX and converted
it to Typescript.
- Changed the business logic to follow a bit of dependency injection to
make it more testable and easier to maintain.
- Ideally we move this out of Admin X Settings and perhaps into it's own
library so we don't need to deal with a duplicate code between Koenig
and Admin X.

---

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

This pull request adds support for selecting images from Unsplash in the
admin settings UI. It introduces a new `UnsplashService` class that
handles the Unsplash API requests and a new `MasonryService` class that
handles the masonry layout of the images. It also adds several new
custom components, such as `UnsplashButton`, `UnsplashGallery`,
`UnsplashImage`, `UnsplashSelector`, `UnsplashZoomed`, and
`UnsplashSearchModal`, that render the Unsplash modal and its elements.
It modifies the existing `ImageUpload`, `App`, `ServicesProvider`, and
`BrandSettings` components to integrate the Unsplash feature and pass
the necessary props. It also adds some new types, constants, and assets
related to the Unsplash data and UI. Finally, it adds some unit tests
for the `UnsplashService` and `MasonryService` classes.
2023-09-21 02:23:45 +00:00
Jono M
3928b628ca
Update labs settings in Ember when changed in AdminX (#18231)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-19 18:48:47 +00:00
Peter Schulz
72110d101e
Updated copy for broken links table (#18220) 2023-09-19 13:49:27 +00:00
Daniel Lockyer
5e466a90be Removed libs/ from Admin-X-Settings file path
refs https://github.com/TryGhost/DevOps/issues/80

- this makes the URL a little cleaner by removing a superfluous folder
2023-09-19 13:42:57 +02:00
Daniel Lockyer
f705dda314 Updated Admin-X bundling process
refs https://github.com/TryGhost/DevOps/issues/80

- as part of moving Admin-X-Setting towards GA, we want to change it from
  loading the settings externally via a CDN, to bundling it in with
  Admin
- the bulk of the changes here are removing the config in Ghost, setting
  up the copy to the Admin assets dir, and loading the new path in Admin
- several other changes have come along the way as I've cleaned up
  unneeded code
2023-09-19 11:31:55 +02:00
Kevin Ansfield
45bc917dea
Fixed collections card display when admin/front-end URLs are different (#18196)
no issue

- the Content API is served from the Admin URL not the Frontend URL but we were fetching from the Frontend URL. That resulted in a 302 response with no CORS headers so the request was blocked by the browser
2023-09-18 10:04:28 +00:00
Peter Zimon
dff8c38547
AdminX UI fixes (#18110)
refs. https://github.com/TryGhost/Product/issues/3349

- fix tiers save & close bug
- show trial days on tier card
- removed 0's from monthly and yearly tier prices
- added color to learn more link in tier modal
- set background to white in newsletter preview
- fixed newsletter default sender data
- removed underline in "View in browser" link in newsletter preview
- updated copy in newsletters
- added Integrations' active indicator
- scrolling menu under searchbar to give search more prominance
- updated Portal modal buttons to be consistent with design settings
- fixed bug in AdminX loading Orb so that it actually starts auto-playing
2023-09-14 12:04:31 +02:00
Jono M
00e598b365
Updated AdminX features for different roles (#18131)
refs https://github.com/TryGhost/Product/issues/3832

---

This pull request introduces a new `MainContent` component that handles
the role-based access and rendering of the settings page and the
sidebar. It also refactors and improves the UI and logic of the
`UserDetailModal` and the `Users` components, and updates the footer
component to use the new settings page and profile modal for editors.
Additionally, it removes unused code and adds new helper functions for
checking the user's roles and permissions.
2023-09-14 07:48:07 +00:00
Sodbileg Gansukh
7a49183bc8
Custom theme settings improvements (#18101)
no issues

- removed (default) label from the custom theme settings
- the label was redundant especially when multiple select settings are next to each other
- instead, the default value should always be the first option in the select fields
- more consistent spacing between settings with/without description
- less spacing between boolean settings
2023-09-14 10:27:33 +08:00
Kevin Ansfield
f06f83c45b
Updated collection card post fetching to use Content API (#18121)
closes https://github.com/TryGhost/Product/issues/3874

- fetch Content API key if we don't already have it
- use the `frontend` service to fetch posts via the Content API
  - uses same ordering and published-only filtering as default front-end requests
2023-09-13 16:51:00 +00:00
Michael Barrett
46897bdb3a
Ensure hidden settings return falsy when used with the @custom helper (#17920)
no refs

When a theme setting is hidden, it should return a falsy value when used
2023-09-13 08:38:31 +01:00
Peter Zimon
25e240357e
AdminX global loading Orb (#18076)
refs. https://github.com/TryGhost/Product/issues/3349

- we showed a "Loading..." text for people on super slow connection
instead of the animated Ghost Orb
2023-09-12 11:56:41 +02:00
Jono M
acae53d9ed
Updated AdminX to be preloaded to improve perceived speed (#18059)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-11 10:55:12 +01:00
Peter Zimon
7ebbf9d56e
AdminX dark mode (#18035)
refs. https://github.com/TryGhost/Product/issues/3349

- added basic support for dark mode
2023-09-08 20:53:41 +02:00
Jono M
9e45afddb8
Updated AdminX to load via ES Modules to enable code splitting (#17971)
refs https://github.com/TryGhost/Product/issues/3349
2023-09-07 06:38:20 +00:00
Sanne de Vries
5ca082cd7c
Added CSS variable to adjust card width when sidebar is open (#17919)
Refs https://github.com/TryGhost/Product/issues/3713
2023-09-01 09:18:31 +00:00
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
Sanne de Vries
c3a7e43286
Updated old Spirit class to stop overriding of Tailwind in editor (#17874)
No ref
2023-08-30 14:41:49 +00:00
Michael Barrett
0ea5f9228d
Added custom theme setting visibility (#17763)
refs https://github.com/TryGhost/Product/issues/3716
2023-08-21 11:26:51 +01:00
Jono M
f1266c6b9f
Wired up Zapier integration in AdminX (#17737)
refs https://github.com/TryGhost/Product/issues/3729
2023-08-16 18:59:31 +01:00
Simon Backx
13b732f905
Added Playwright tests for donations (#17699)
fixes https://github.com/TryGhost/Product/issues/3723

This also fixes usage of localhost instead of 127.0.0.1 as a test URL
for playwright. This caused issues for cookies because the member
impersonation navigated to 127.0.0.1 instead of localhost, meaning that
the next page.goto call would go to localhost and lose the cookies.
2023-08-15 15:20:18 +02:00
Ronald Langeveld
a7530720b4
🐛 Fixed Unsplash integration toggle in Koenig editor (#17725)
no issue

- since Unsplash can be toggled on / off in integrations, we need to
pass that to the Koenig-Lexical editor as well.
2023-08-15 14:59:26 +02:00
Sag
a045e7e50b
Added a preview link in Admin for Tips & Donations (#17711)
closes https://github.com/TryGhost/Product/issues/3724
2023-08-14 13:33:38 +00: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
Djordje Vlaisavljevic
99761242da
Improved how Stripe connect buttons are shown (#17697)
refs https://github.com/TryGhost/Product/issues/3666

- Improves the way Connect with Stripe buttons are shown in Membership settings
2023-08-11 15:56:23 +01:00
Sag
37bf804cf5
Updated copy of error messages for Tips & Donations suggested amount (#17696)
refs https://github.com/TryGhost/Product/issues/3695
2023-08-11 14:11:04 +00:00
Sag
6c481b74a9
Added an upper limit to Tips & Donations suggested amount (#17695)
refs https://github.com/TryGhost/Product/issues/3695

- also updated the "minimumAmountPerCurrency" helper to return a
standard price (not in cents), to keep the code more readable
2023-08-11 13:09:42 +00:00
Aileen Nowak
c23480030f Convert getIframeUrl to a getter and inject as source into iframe component 2023-08-11 10:47:47 +01:00
Aileen Nowak
00db25e314 Revert back to use did-insert hook 2023-08-11 10:47:47 +01:00
Aileen Nowak
d2ab69aeb6 Fixed linting issues 2023-08-11 10:47:47 +01:00
Aileen Nowak
ec14f78ba3 Removed usage of did-insert hook and simplified openExploreWindow method
- We don't actually utilise the history handling for Explore, as it's not a full screen modal and therefore don't need passing in previous routes before opening the iframe
- Removed usage of `did-insert` livecycle hook and reverted to usage of `contructor` and `willDestroy` instead to add and remove message event listener
2023-08-11 10:47:47 +01:00
Aileen Nowak
a72dfdddb7 Prevented Explore iframe to be loading before needed
no issue

- We were loading the Explore iframe together with all assets in Admin
- This change will avoid that and only start loading and rendering Explore, once it's clicked
2023-08-11 10:47:47 +01:00
Djordje Vlaisavljevic
aeff42811c
Updated tips & donations settings and email notification design (#17679)
refs https://github.com/TryGhost/Product/issues/3693, https://github.com/TryGhost/Product/issues/3666

- Updated Tips&Donations email notification design to put focus onto the
amount
- Removed unnecessary gap between Free and Premium tiers in Membership
settings
- Improved the copy to better explain the feature
2023-08-10 18:35:42 +01:00
Kevin Ansfield
f983e93090
🐛 Fixed overly small file drop area in beta editor (#17682)
closes https://github.com/TryGhost/Product/issues/3449

- added drop handler to the whole editor pane area (to match previous editor) that uses the external API plugin to pass files through to the editor when dropped
- allows images/files to be dropped outside of the main editor canvas which is especially helpful when creating images in a new post
2023-08-10 16:36:06 +00:00
Sag
02f4f11e7c
Reverted Offer links to absolute URLs (#17675)
refs https://github.com/TryGhost/Product/issues/3687

- We're not sure that relative URLs for Offers will work in production,
even though they seem to work locally. Reverting for now.
2023-08-10 12:14:11 +00: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
Sag
731773602c
Added relative URLs for Portal links in Button, Header, Email CTA url suggestions (#17669)
refs https://github.com/TryGhost/Product/issues/3687

- Today, in Button, Header, Email CTA cards, Portal links are used as
absolute URLs to the root, e.g. https://mysite.com/#/portal/signin. When
clicking on a Portal link, the reader is redirect to the homepage first,
loosing context of the post.
- With this change, the UX becomes smoother: clicking on a Portal link
keeps the reader in context, and open the Portal link on the same post
e.g., https://mysite.com/POST_URL/#/portal/signin
- Technically, this works by using relative URLs for Portal links.
Relative URLs work out of the box for web, but required changes on the
email side, cf. https://github.com/TryGhost/Ghost/pull/17630
2023-08-10 09:23:31 +00:00
Ronald Langeveld
04ce1154a1
Added new enhanced Header Card (#17654)
no issue

- Keep an eye on Ghost's changelog (https://ghost.org/changelog/) for
the full feature announcement. 🎉

---

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

This pull request removes the `headerUpgrade` feature flag and enables
the new header card by default in the editor. It also hides the old
header card from the editor menu unless the `labs.headerV1` setting is
enabled.
2023-08-10 10:40:10 +02:00
Simon Backx
874552bdbe
Added donation events to activity feeds (#17632)
fixes TryGhost/Product#3698
fixes TryGhost/Product#3699
2023-08-10 09:16:47 +02:00
Steve Larson
a2cb55f0b8
Added origin to beta editor feedback (#17664)
no refs
-added origin to beta editor feedback to more easily associate errors
2023-08-09 20:53:37 +00:00
Sag
ea75ca6188
Updated minimum price validation in Tiers, to support more currencies (#17661)
no issue

- Stripe imposes different minimum charges based on the currency used,
see
https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts
- Our validation uses double that limit, to take into account
conversions to the main currency in use in the Stripe account
2023-08-09 15:44:01 +00:00