Commit Graph

35587 Commits

Author SHA1 Message Date
Ronald Langeveld
4a07e857e2
Added Header Card V2 feature flags (#17263)
refs https://github.com/TryGhost/Product/issues/3508

- added a feature flag for Header Cards that's being upgraded.

---

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

This pull request adds a new feature flag `headerUpgrade` to the server
and the admin settings, which allows the user to opt-in to a new header
design. The feature flag is only available if the labs toggle is
enabled.
2023-07-10 13:53:42 +02:00
renovate[bot]
ea9cc21a0c Update dependency @vitejs/plugin-react to v4.0.2 2023-07-10 13:48:58 +02:00
Daniel Lockyer
c158aa7397 Updated fetching latest base commit
- unfortunately GitHub makes this incredibly hard and this commit
  doesn't even provide a full solution, but it should allow us to fetch
  the latest commit for PRs and pushes to a branch, but not force pushes
2023-07-10 13:22:00 +02:00
Daniel Lockyer
fb0807c8c5 Prevented git tags from being created for apps
refs https://ghost.slack.com/archives/C02G9E68C/p1688983916615989?thread_ts=1687341349.559679&cid=C02G9E68C

- these cause issues with our PR workflow because we can't push tags in
  a PR and the commit is rebased onto `main` so the hash changes
- this disables tags for now
2023-07-10 13:09:28 +02:00
Rishabh Garg
dd7670859f Released Admin-x-settings v0.0.9 2023-07-10 14:39:39 +05:30
renovate[bot]
44d38e4d4e Update dependency vite-plugin-css-injected-by-js to v3.2.0 2023-07-10 10:29:23 +02:00
renovate[bot]
0e5a98e43e Update dependency postcss to v8.4.25 2023-07-10 10:20:30 +02:00
renovate[bot]
5fc6659423 Update dependency cross-fetch to v4 2023-07-10 10:19:26 +02:00
renovate[bot]
ae8be7c937 Update dependency semver to v7.5.4 2023-07-10 10:15:37 +02:00
Sanne de Vries
cc8b3ab9ad
Updated hiding page title and image interaction (#17256)
Refs https://github.com/TryGhost/Product/issues/3558
2023-07-10 10:02:56 +02:00
Daniel Lockyer
b4d9191522 Fixed --since parameter for partial executions
- if a branch is force-pushed, the existing value is incorrect and we
  get errors from Lerna
- this switches to finding the common commit between this branch and
  the head as reported by GitHub
2023-07-10 09:55:19 +02:00
Daniel Lockyer
5b7a89d8fc Deduplicated execution check in CI workflow
- we only need this on the metadata step because it trickles down to the
  other workflows that depend on it
2023-07-10 09:55:19 +02:00
Naz
cb8e009c14 Allowed for index collection to have empty filter
refs https://github.com/TryGhost/Arch/issues/25

- The built in index (soon -> "latest") collection does not require any filtering so that it could contain an index of all posts in the system. All other automatic collections should have a filter defined.
2023-07-10 12:43:52 +08:00
Daniel Lockyer
6f5f608bcd Fixed resetting database in migrations tests
- due to schema changes between versions, we need to completely nuke the
  DB between these tests
- this is definitely not the best way to do it but I'll fix properly next week
2023-07-07 18:42:18 +02:00
Ghost CI
7dfbaefa3e v5.54.0 2023-07-07 16:05:47 +00:00
Ghost CI
2ecdd01abf 🎨 Updated Casper to v5.5.3 2023-07-07 16:05:47 +00:00
Rishabh
f2b924ca96 Added hidden state for portal preview frame in adminX
refs https://github.com/TryGhost/Product/issues/3545

- hides portal frame till portal is ready and loaded
2023-07-07 21:28:26 +05:30
Kevin Ansfield
d8d0bc8bd9
Moved posts_meta.hide_title_and_feature_image to posts.show_title_and_feature_image (#17239)
no issue

`show_title_and_feature_image` leads to more intuitive logic in themes and we can use `posts` rather than `posts_meta` as there are no longer row-length issues with MySQL 8.

- removed original add-column migration that was never in a release
- added new add-column migration that puts
`show_title_and_feature_image` column with a default of `true` on the `posts` table
- renamed property and default value everywhere
- bumped `@tryghost/admin-api-schema` to allow the new property through at the API level
2023-07-07 16:40:22 +01:00
Daniel Lockyer
b433686944 Released Portal v2.33.5 2023-07-07 16:12:41 +02:00
Daniel Lockyer
c5aea0caee Fixed showing name in Portal notification
fixes https://github.com/TryGhost/Ghost/issues/17242

- we weren't passing the correct parameter to the translation function,
  so the name placeholder wasn't being replaced
2023-07-07 16:12:41 +02:00
Daniel Lockyer
b6131f0631 Fixed canary build triggering
- this previously wouldn't trigger if any of the `needs` are skipped
- this switches to waiting for the actual job which checks if all
  required jobs were completed successfully
2023-07-07 15:30:22 +02:00
Peter Zimon
ca3fe7d9db
Added routing to Portal (#17240)
refs. https://github.com/TryGhost/Product/issues/3545

Routing for Portal settings in AdminX was missing
2023-07-07 13:23:36 +00:00
Peter Zimon
702c88b9ba
AdminX Portal settings refinements (#17238)
refs. https://github.com/TryGhost/Product/issues/3545

- Device selector is not needed in Portal settings' preview
- Links page was too wide
- Scrolling for preview contents was on the whole modal instead of just the preview area
2023-07-07 13:03:06 +00:00
Rishabh
26c2590923 Wired save button state for portal settings modal
refs https://github.com/TryGhost/Product/issues/3545

- adds dynamic loading state for portal modal save button
2023-07-07 16:30:59 +05:30
Rishabh
ad0e52ac39 Wired tier selection for portal links
refs https://github.com/TryGhost/Product/issues/3545

Enables tier selection on Portal links page in adminX, allowing tier specific signup links to be copied
2023-07-07 16:30:59 +05:30
Peter Zimon
2642941be6
AdminX Portal links (#17227)
refs. https://github.com/TryGhost/Product/issues/3545

Static version of links page in AdminX Portal settings.
2023-07-07 11:36:31 +02:00
Rishabh Garg
31ff544e7a
Added account page in Portal preview in adminX (#17236)
refs https://github.com/TryGhost/Product/issues/3545

- adds switch to showing account page in portal preview
2023-07-07 14:47:17 +05:30
Fabien "egg" O'Carroll
2808df7f87 Switched to bookshelf repository 2023-07-07 14:24:42 +08:00
Jono M
4ffdab3c82
Added confirmation modal after setting portal email address (#17231)
refs https://github.com/TryGhost/Product/issues/3545
2023-07-07 02:05:14 +00:00
Jono M
e397368393
Improved Lexical behaviour in AdminX portal settings (#17232)
refs https://github.com/TryGhost/Product/issues/3545

- Fixed TODOs
- Fixed koenig editor not resizing as content expands
- Fixed placeholder in html field
- Updated signup options to validate terms length
2023-07-07 02:03:46 +00:00
Chris Raible
fc7e150cc2
Fixed importer breaking any posts written in the new editor (#17230)
refs @TryGhost/Product#3551

- PostsImporter would convert the HTML from the import file into
Mobiledoc, even if the post was written in Lexical
- As a result, the imported posts would have both mobiledoc & lexical
fields populated, which prevents the post from being updated in the
Lexical editor
- Added a check to see if the post was written in Lexical, and if so,
skip the HTML > Mobiledoc conversion
2023-07-06 18:37:19 -07:00
Rishabh
c6b8097ff9 Added portal preview frame in adminX
refs https://github.com/TryGhost/Product/issues/3545

- adds portal preview iframe in modal
- wires local settings to portal preview url to dynamically generate the Portal preview
2023-07-06 20:41:42 +05:30
Peter Zimon
4fff14fdac
Updated AdminX Portal button icons (#17223)
refs. https://github.com/TryGhost/Product/issues/3545

Portal button icons in AdminX styling was just placeholders.
2023-07-06 11:53:33 +00:00
Kevin Ansfield
22a7d1c374
Added animated icon for "hide title + feature image" toggle (#17220)
closes https://github.com/TryGhost/Product/issues/3577

- adds icon as a handlebars file to avoid SVGO breaking the styles needed for the toggle to work
2023-07-06 11:38:36 +00:00
Peter Zimon
c9f2271665
AdminX installed theme list updates (#17221)
refs. https://github.com/TryGhost/Product/issues/3349

The installed themes were not sorted and the active theme was not the
first one which made it hard to discover in the list.
2023-07-06 11:21:48 +00:00
Peter Zimon
a5b62707ef
AdminX theme navigation experiment (#17210)
refs. https://github.com/TryGhost/Product/issues/3349

It's a bit cumbersome how design and theme navigation is handled in
AdminX at the moment. On a high level, this PR applies the following
changes:

- Change theme is under Design settings
- After activating a theme, Design settings are automatically opened
2023-07-06 12:03:01 +02:00
Kevin Ansfield
a1d4b4cc9d
Wired up toggle for hiding page title and feature image (#17214)
closes https://github.com/TryGhost/Product/issues/3558
closes https://github.com/TryGhost/Product/issues/3559

- added property to post model
- updated post serializer to not send property when saving a post rather than a page
- added property toggle to post settings menu
- updated indicators next to title and feature image to show real property state
2023-07-06 08:51:19 +00:00
Michael Barrett
b49cf14287
🐛 Fixed member import newsletter subscription prefs (#17208)
fixes https://github.com/TryGhost/Product/issues/2947

When an import is performed and a member already exists:
- If `subscribe_to_emails` is set to `true` and the existing member
already has newsletter subscriptions, these are preserved
- If `subscribe_to_emails` is set to `true` and the existing member does
not already have newsletter subscriptions, no new subscriptions are
added in case the member has previously unsubscribed
- If `subscribe_to_emails` is set to `false` the existing member will be
unsubscribed from all newsletters regardless of their preference
2023-07-06 08:45:56 +01:00
Daniel Lockyer
f6aeff6524 Added handling for building arch branch
refs https://github.com/TryGhost/DevOps/issues/40

- this is an experimental branch that needs a separate canary build
- these changes should help support that by allowing canary builds on
  that branch
2023-07-06 09:24:45 +02:00
Daniel Lockyer
92120324eb Updated workflow for code coverage
- added separate Admin codecov step
- removed unit test until we figure out handling for partial runs
2023-07-06 09:24:45 +02:00
Jono M
e1fbfd3e12
Added HTML editor using koenig-lexical (#17217)
refs https://github.com/TryGhost/Product/issues/3545

Used in portal settings for the signup message.
2023-07-06 03:05:33 +00:00
Jono M
b9158215ee
Added portal icon picker in AdminX settings (#17216)
refs https://github.com/TryGhost/Product/issues/3545
2023-07-05 23:16:52 +00:00
Simon Backx
3d6848f5fd
Added Portal development --https option support for Safari (#17213)
no issue

This --https option allows to test Portal in Safari when the site is
hosted on https.
2023-07-05 15:04:39 +00:00
Kevin Ansfield
5d8ea79788
Implemented pages.hide_title_and_feature_image property in API (#17211)
closes https://github.com/TryGhost/Product/issues/3557

- bumped `@tryghost/admin-api-schema` to allow passthrough of the new property in API requests
- updated output mapper to ensure property always returns a boolean rather than `null` in the case where `posts_meta` doesn't exist for a page
- updated `PostsService.copyPost()` to include the new property when copying
- updated `checkResponse` test util and snapshots to expect `hide_title_and_feature_image` property in page API responses
- fixed pages e2e test so it doesn't inadvertently modify the match object breaking later tests
2023-07-05 14:01:24 +00:00
Kevin Ansfield
2a340bcab9
Added migration and schema change for posts_meta.hide_title_and_feature_image (#17187)
closes https://github.com/TryGhost/Team/issues/3550

We want to allow an option to hide the title and feature image on a
per-page basis, to do that we need somewhere to store the setting value.
The existing `posts_meta` table is the simplest candidate, especially as
this is a single setting and we don't have a desire to introduce many
such settings.

- added migration that adds the `hide_title_and_feature_image` column to
the `posts_meta` table with a `boolean` data type and a default value of
`false` (matches behaviour of all existing pages)
- updated schema file for initial database creation
- removed property from API output via serializers to keep migration PR
minimal
2023-07-05 14:48:25 +01:00
Naz
4372a7e1a8 Added feature flag for flatUrls
refs https://github.com/TryGhost/Arch/issues/24

- Enables generating Post and Page URLs in a flat `{slug}-{id}` format
2023-07-05 17:41:28 +08:00
Daniel Lockyer
289e459283 Added tests for migrations
refs https://github.com/TryGhost/DevOps/issues/39

- up until now, we've had a CI job which does a really basic test for
  migrations, but it barely functions and misses bugs all the time
- this commit removes that and switches to an actual test suite for our
  migrations, so we can ensure they function as expected
- also removes the env var hack I came up with for those migrations
  tests
- this should lead to safer migrations and faster tests
2023-07-05 11:00:06 +02:00
Daniel Lockyer
ebad10e242 Updated lockfile 2023-07-05 11:00:06 +02:00
Daniel Lockyer
2aa89f30c5 Moved dev script into subfolder
- we're going to start adding more scripts here so this helps keep the
  .github folder tidy
2023-07-05 11:00:06 +02:00
Daniel Lockyer
40e8bc09ce Optimized unit test workflow to only run for changed packages
- this implements a similar idea to linting by only running for changed
  packages, which saves ~3 minutes for this job
2023-07-05 11:00:06 +02:00