ref https://linear.app/tryghost/issue/IPC-66/onboarding-checklist-v1
- Adds a basic version of a new onboarding checklist behind the feature
flag, without incomplete/complete state logic
- Links to Design settings, Members screen and new post
- Opens amodal that we’ll use as Share modal
---------
Co-authored-by: Daniël van der Winden <danielvanderwinden@ghost.org>
no-issue
This adds the barebones of a NestJS application wired up to the Admin API
behind a feature flag, so that we can experiement with how to use Nest in the
context of Ghost
no issue
- Adds the unsplash selector as a standalone typescript package inside
the Koenig monorepo.
- Currently we have 3 versions of the Unsplash Selector. One in
Koenig-Lexical, one in AdminX and the original Ember version.
- We can now start phasing out the application coupled version of the
selector and replace it with the reusable version.
- We can now import it via npm to any React application.
- This commit removes the Unsplash components from AdminX and imports it
instead.
This is the second commit for this as the previous commit broke styles
due to normalise styles leaking into the Ember app. Disabling preflight
(https://github.com/TryGhost/Koenig/pull/1169) in Tailwind fixed it.
closes https://linear.app/tryghost/issue/ENG-739
- `props.innerRef` in `<IFrame>` was inadvertently assumed to always exist, sometimes throwing an error on render when certain popups like the profile settings modal were opened resulting in the app crashing and the whole comments block disappearing
- added a guard to ensure the ref exists before trying to set it
- updated tests so the profile modal route is tested
closes https://linear.app/tryghost/issue/ENG-721
ref https://linear.app/tryghost/issue/ENG-708
Comments-UI loads `/ghost/admin-frame/` in an iframe to check if a Staff User is authenticated in order to show moderation options. That iframe request loads a HTML page which in turn contains a script that fires off an API request that attempts to fetch the logged-in user details, resulting in a 403 "error" showing up when not authenticated. In the vast majority of cases there will be no staff user authenticated so lots of extra requests and "errors" are seen unnecessarily.
- adjusted the `/ghost/auth-frame/` endpoint to check if the request contains an Admin session cookie
- if it does, continue as before with rendering the HTML page so the script is loaded
- if it doesn't, return an empty 204 response avoiding the script request and subsequent 403-generating API request
- eliminates the 403 error being generated for all typical visitor traffic, the error should only be seen when an Admin was previously logged in but their cookie is no longer valid (either from logging out, or going past the 6month validity period)
no issue
- Adds the unsplash selector as a standalone typescript package inside
the Koenig monorepo.
- Currently we have 3 versions of the Unsplash Selector. One in
Koenig-Lexical, one in AdminX and the original Ember version.
- We can now start phasing out the application coupled version of the
selector and replace it with the reusable version.
- We can now import it via npm to any React application.
- This commit removes the Unsplash components from AdminX and imports it
instead.
no ref
- The 'Get help' button was only adding margin on the left when accessed
through account management even though it is also shown on the
unsubscribe page accessed via link.
no refs
- Tests run locally (US TZ) often always failed because the dates are
pushed to the en-GB locale. The test now forces the same TZ onto the
compared to date.
refs https://linear.app/tryghost/issue/ENG-677
- Portal was completely missing tests for `UnsubscribePage`
- `UnsubscribePage` is unique for Portal in that it needs to be able to
handle logged in and not-logged-in member state/interactions
- Various parts of Portal don't use a shared `GhostApi` instance, making
mocking all functionality impossible
- `UnsubscribePage` was updated to use `onAction` to bring it in line
with other Portal interactions while logged in
- Added checks for UI components for more precision in tests checking subscriptions within the UI
---------
Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
no issue
- defers loading of `admin-auth` frame and it's API request until we are displaying some comments
- defers the frame load and API request until the comments box is scrolled into view
- eliminates the requests altogether for posts that have no comments
closes ENG-711
When an Admin is authenticated in Comments-UI we only add moderation options to the displayed comments so we don't need to pre-emptively load the `admin-auth` iframe and make the `/ghost/api/admin/users/me/` request until some comments are actually visible.
- used `state.comments.length` property to defer rendering of the admin auth frame until comments have been fetched (after box is scrolled into view) and the count is > 0
refs https://ghost.slack.com/archives/CTH5NDJMS/p1709230854358779
- Customer reported that some code they injected via the Code Injection
crashed the Preview in Ghost Settings.
- This wraps the function where the crash took place (according to
Sentry) in a try/catch to attempt to handle it gracefully.
- Added an additional Sentry log to better understand the situation
should it happen again.
refs https://linear.app/tryghost/issue/ENG-677
- UnsubscribePage is intended to be able to be used without logging in
to Portal. The app context (member state) was not synchronized when
logged in, causing conflicts in the client data vs. database.
- Now when a logged in member is found, the member object is manually
updated to reflect the API response(s).
no issue
- switches post browse requests to`/members/api/comments/post/:post_id/` to enable better cache bucketing
and invalidation
- removes `order` param from browse and replies requests
closes ENG-681
There's no need to provide an `order` param with every request in Comments-UI if the API has default ordering that matches our requirements. The order param makes logs more noisy/harder to read than they need to be so we want to get rid of it.
- modified comments API input serializer to add a default order param to the browse and replies endpoints when none is provided
- removed order param from the requests that Comments-UI makes
refs https://linear.app/tryghost/issue/ENG-676/
Now we have the case that there is no filter param, the simple string
approach fails. Instead we build up a URLSearchParams object which
makes it easier to handle conditional params & stringify it at the end.
closes ENG-678
The comments block is typically shown at the bottom of a post so it doesn't make sense to eagerly fetch comments from the API when we don't know if the comments block will even be viewed. By lazy-loading the data only when the comments block comes into view we can reduce both data usage for visitors and load on the site.
- uses IntersectionObserver API to delay comments app initialisation until the comments block has scrolled into view
- updated all iframe-related components to forward a `ref` so we can use the `<iframe>` element reference inside the `App` component
refs https://linear.app/tryghost/issue/ENG-673
This means that the initial load of comments can be cached for everyone.
We also improve the timestamp which is used when fetching future comments,
instead of using a locally generated timestamp, we use the created_at of
the first comment loaded, this drastically improved the likelyhood that the
timestamp will be the same, meaning that it will hit the cache.
no issue
- because we use hidden here, it prevents the Portal iFrame from
calculating the width and position correctly on the initial load.
- Changing it to `invisible` conditionally allows it to do the calculation correctly.
- Also had to reposition the loading indicator.
refs ENG-607
- added the option to rename the free tier
- added the option to render monthly or yearly pricing by default on
signup
- added a "% discount" summary on the yearly pricing tab
ref ENG-607
- also added the option to show the monthly pricing by default during
signup
Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
no issue
- Changed the textfields in custom theme settings to use onBlur instead
to trigger a rerender of the iFrame to avoid flashing.
- It will now instead update once the text field loses focus, similar to
the Announcement Bar.
ref DES-72
- current sorting makes it difficult to find themes when theme directory
and package name are different, because the sorting is based on the
directory name
- this new sorting is based on package name first
- as package name is optional, it then sorts based on directory name if
it doesn't exist
no ref
- includes run of `eslint --fix` to update changed classname ordering in Tailwind
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
refs.
https://linear.app/tryghost/issue/DES-113/clicking-customize-design-on-setup-page-lands-you-on-top-level
On the setup screen 60% of people choose "Customize your site" which ATM
just take people to the top level Settings screen. This is very
confusing as with all the settings people don't know where to click to
actually get to customizing their site.
This PR fixes it by showing the design settings when clicking on
"Customize your site" and to the Dashboard after closing it.
refs.
https://linear.app/tryghost/issue/DES-21/empty-screen-is-missing-for-search-in-settings
- Search is one of the most useful functions in Settings and currently
the screen when there's no result for a searchterm is just a plain white
screen. Very non user-friendly.
- This update gives us an opportunity to improve the overall visual
hierarchy and focus of Settings in general.
---------
Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
fixes DES-88
- preview iframes should have default background as they simulate
browser windows
- transparent background causes unexpected inconsistency when themes
don't have default background color set
There were two changes in the Email receiving FAQ page.
1. Add "a" to "If you're not receiving the email newsletter you've
subscribed to, here are a few things to check."
2. Remove unnecessary hyphens from "to-and-from this address."
@jonhickman
no issue
- adds 2 addition conditions for when the Portal iframe should be
visible.
- waits an extra 100ms before making it visible to give portal time to
properly load.
---------
Co-authored-by: Princi Vershwal <vershwal.princi@gmail.com>
refs PROD-215
- Showing toast notification instead of modal to all users (even
self-hosted and legacy (Pro)) now
- More compact toast notification message
- Updated tests
refs PROD-215 PROD-216
- Added toast notifications for successful sender and reply-to email
address change behind the flag, instead of the modal
- Updated email template for verifying new sender or reply-to email
fixes PROD-205
fixes PROD-219
- removed the right placeholder complexity
- the preview renders the current sender / reply-to address in
real-time, regardless of whether it's valid
- if the reply-to address does not match the custom sending domain, show
an inline error
no issue
- potentially fixes a small performance issues to avoid the homepage of
your publication from being loaded should an href from Portal not exist
when loading Offers, that could cause flashing.
Fix:- #19246
Resolved an issue with dark mode in the recommendation tabs footer by
making TailwindCSS adjustments. Previously, the footer stayed in light
mode when transitioning from light mode to dark mode.
**Changes Made:**
Implemented a TailwindCSS class for a dark background in the table
footer to ensure consistency with dark mode.
**Before Fix:**
![288238357-1801884e-a8a4-48ac-b59a-0b2260561cdd](https://github.com/TryGhost/Ghost/assets/24241624/787f695c-fa7c-4ae8-aa34-9c9c53df4686)
**After Fix:**
![Screenshot 2023-12-06 at 11 15
19 AM](https://github.com/TryGhost/Ghost/assets/24241624/4bb65ffe-735a-440c-801c-520f991585e6)
**This fix enhances the user experience when working with
Recommendations Tab in settings.**
Please let me know if any further adjustments or clarifications are
needed. Thank you!
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>
refs https://github.com/TryGhost/DevOps/issues/122
- this allows us to DRY up some of the other configuration we have
dotted around and fixes a niche bug with overlapping builds that we
were seeing before, because Nx should only allow one build at a time
refs PROD-60, PROD-222, PROD-223, PROD-89, PROD-94
- Indicator shows up in the monthly/yearly toggle if there are any paid
tiers with yearly discount, and shows the highest discount in order to
nudge visitors towards checking out yearly plan
- A couple of smaller portal improvements: typos, spacing, alignment
---------
Co-authored-by: Simon Backx <simon@ghost.org>
refs PROD-204, PROD-203
- Moved fallback value information from hints to placeholders for
consistency and cleaner layout
- Changed setting section label
fixes PROD-61
This adds a new default plan setting. It defaults to yearly, which is
the current default selected interval in Portal.
Behind the new portal improvements feature flag, the default plan can be
changed. It will also change automatically if the available intervals
are changed.
This PR also wires up passing the new setting to the Portal preview.
refs PROD-66
---------
Co-authored-by: Sag <guptazy@gmail.com>
Co-authored-by: Jono M <reason.koan@gmail.com>
Co-authored-by: Steve Larson <9larsons@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
Co-authored-by: Aileen Booker <AileenCGN@gmail.com>
fixes https://github.com/TryGhost/Product/issues/4222
fixes PROD-197
- links in signup terms were not opening properly, as we open Portal
within an iframe
- the previous fix in place did not work anymore, as the HTML structure
of the signup terms has changed
refs.
https://linear.app/tryghost/issue/ADM-59/add-support-and-email-address-to-portal-keywords
Searching for "support email address" (or any combination of this) in
Settings resulted in an empty screen. The setting is availble under
Portal which is pretty hidden so it should at least be searchable. This
PR sets up new search keywords for support email address in Settings.
fixes GRO-105
The newsletter value is mapped to an empty value when shown to the
users, this matches the backend behaviour.
When entering an empty value, this is stored internally as 'newsletter'.
The replyToInput component now uses its own state for the input value.
This avoids weird issues when the rendered value changes, e.g. when
entering the text 'support' or 'newsletter' in the field.
no issues
- consistent spacing between modal and preview modal
- no action button jumping between the modals
- cleaner stats section in the edit screen
refs https://ghost.slack.com/archives/C02G9E68C/p1701344186524289
- changed the ship command in portal to avoid checking the status of
files in all of Ghost and just checks for the status of files inside
Portal before publishing to NPM.
---------
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
fixes ADM-43 https://github.com/TryGhost/Product/issues/4213
- The slash '/' search was firing when it wasn't suppose to, eg via the
URL editor inside the minimal koenig editors.
- this fix makes sure that if any input field has focus, that the slash
search function doesn't get fired.
fixes GRO-103
When a custom reply-to address was set using one of the new flags, and
those flags were disabled - the dropdown showed an empty value and
saving was broken because of this value.
This change automatically reverts back to 'newsletter' as a default
value when editing a newsletter with an invalid reply-to value.
refs ADM-37
- backdrop click should be disabled for modals, especially when modals
contain user editable fields
- to make things consistent, all offers related modals are not closeable
by backdrop clicking
fixes ADM-22
- the mobile tab bar is shown within screen size of 800px and below
- this makes the preview visbility consistent with the mobile screen size range
fixes ADM-40
- removed layout switch feature, and made the list layout default
- removed the help link, because it will no longer be necessary on the
list screen
- fixed offers count in the table header
Google AMP is on the way out. In Ghost 5.0 we changed the integration's
default state to be `disabled`, and we have planned to remove it
completely in Ghost 6.0 for a while — but we haven't shared this
anywhere.
@gergelyorosz bumped into this today:
https://twitter.com/GergelyOrosz/status/1729778093777100973
This PR is to start communicating our intent to remove AMP in the next
major release of Ghost, by adding inline messaging to the integration
settings in Ghost Admin
fixes GRO-72
- added "default_email_address" and "support_email_address" to the
public settings
- when available, use these addresses in Portal. Otherwise, fallback to
current logic
no issue
When the from address of a newsletter is empty, and a custom sending
domain is setup the preview would display 'From: Sitename ()' instead of
'From: Sitename (default@address)'.
When a custom sending domain was setup, but a different from address was
saved, we'll also no longer display it in the input fields - as it will
also be ignored IRL.
refs GRO-76, GRO-90
- Reused `renderReplyToEmail` and `renderSenderEmail` from
`NewsletterDetailModal.tsx` like Simon suggested
- Changed Newsletter preview header in Newsletter settings to show
Reply-to address instead of the “To” mock placeholder
- When no custom sending domain is set, switched “Sender email address”
to disabled TextField for better visual rhythm
- Added a link to the help doc for (Pro) users without custom sending
domain set (the doc itself will still need to be updated though, but Sam
and the gang are already aware of this)
- When custom sending domain is set, added a hint about the default
value, which IMO is clearer than using a placeholder
fixes GRO-88
Instead of going to the previous page when visiting /#/portal, it will now go to the default page:
- Sign up if you are not signed in
- Account home if you are signed in
Previously, it had the same behaviour, with the difference that it would also go to the previous page if there was any.
no issues
- SortMenu component used to have only one global default direction
option, however, the sorting options needed individual default sorting
direction. e.g. desc for created data, or asc for name etc
- this adds an optional sorting direction option to sorting options, so
when they're defined, they'd override the global default sorting
direction
refs GRO-80
- added a new meta field "email_verified" to the /verification endpoint
for newsletters. This meta field contains which email has been verified,
"sender_email" or "sender_reply_to"
- updated copy in newsletter settings, based on which email has been
verified
no issues
- active/archived tabs are no longer hidden, they're always visible
regardless of if there's an offer or not
- same for the modal footer, it's always visible
- used a simple NoValueLabel component instead of custom no offers view
refs GRO-73
- fixed validation for reply-to address
- fixed rendering of default values for reply-to and sender-from fields
- added a temporary generic message for the verification confirmation,
so that it's compatible with both reply-to and from address changes. The
message will be improved in a follow-up commit (pending an API change).
fixes GRO-73
We need to avoid duplicating the complex logic for determining the
default email address and the support email address. So these are now
exposed as calculated settings.
refs. https://github.com/TryGhost/Product/issues/4169
- the detail page for the Admin X proto app was empty
- the asc/desc selector of the SortMenu component in the design system needed a bit of refinement
- page toolbar was not set
refs GRO-59
refs GRO-56
refs GRO-52
- When email is managed without a custom domain, do not allow the Sender
Email address to be changed, but allow Reply-to address to be changed to
any address the publisher can verify
- When email is managed with a custom domain, allow both Sender and
Reply-to addresses to be changed without verification, but not their
domain names
---------
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
refs. https://github.com/TryGhost/Product/issues/4169
- some of the new components were not prepared for mobile sizes and dark
mode
- Storybook settings had to be updated to include mobile sizes that
reflect the actual system
fixes GRO-34
fixes GRO-33
This is a revision of a previous commit, that broke the browser tests
because changes in the data generator (requiring bookshelf had side
effects).
This adds a new way to run all tests with enforced numeric ObjectIDs.
These numeric ids cause issues if they are used withing NQL filters. So
they surface tiny bugs in our codebase.
You can run tests using this option via:
NUMERIC_IDS=1 yarn test:e2e
Removed some defensive logic that could be explained by this discovered
issue.