Commit Graph

35964 Commits

Author SHA1 Message Date
Sodbileg Gansukh
dc5cc28036 Cleaned up the styles for the new Header card
no issues

- using .kg-v2 as an indicator to add the v2-specific styles
- .kg-header-card and .kg-header-card-button are the class names that confict with the existing Header card, so only using .kg-v2 to style those elements
2023-07-26 15:18:22 +08:00
renovate[bot]
8fed1abb71 Update peter-evans/create-or-update-comment digest to 716151b 2023-07-26 08:48:51 +02:00
Ronald Langeveld
c419306f30
Bumped Portal (#17499)
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 e0f948c</samp>

This change updates the `portal` package to the latest version, which
fixes some bugs and enhances the user experience of the members feature.
2023-07-26 08:36:27 +02:00
Djordje Vlaisavljevic
ae314679fa
Add Tips and donations section to Membership settings (#17497)
refs https://github.com/TryGhost/Product/issues/3561

- Added a static section to Membership settings with a button to copy
the Tips & donations Stripe link
- Added a `tipsAndDonations` feature flag
2023-07-25 22:46:34 +01:00
Fabien "egg" O'Carroll
322dda10ab Removed flag check for running the collection service
This ensures that collections are updated in the background regardless of
whether or not the labs flag is enabled, which is important for the stability
of the collections database tables. In order to make sure we don't add a tonne
of event listeners during the tests we have to add a flag to make sure that the
service is treated as a singleton and only instanciated once. This should only
affect code running in tests, as we don't initialise services multiple times
2023-07-25 17:35:43 +02:00
Fabien "egg" O'Carroll
3d0825ea2f Supported ?include=count.posts for Collections API
Unfortuantely our framework is bookshelf centric so we have to refer to the
`withRelated` property rather than a more generic `include` property.

The collection entity already contains the list of post ids, so we can just
return the length of that array.
2023-07-25 16:56:22 +02:00
Fabien "egg" O'Carroll
431f0ed842 Fixed the "Can add a Collection" test
The test was addign an extra collection, but not cleaning it up - which makes it
hard to reason about other tests, especially when running them in isolation and
the state is different. This just cleans up the test and updates the browse test
to match the right snapshot.
2023-07-25 16:56:22 +02:00
Daniel Lockyer
33e2b39295 Removed old versions of @typescript-eslint/{eslint-plugin,parser}
refs https://github.com/TryGhost/DevOps/issues/50

- this helps prevent old versions of the dependency from lingering
  around (especially when it's unused)
2023-07-25 16:48:54 +02:00
Daniel Lockyer
af320ab864 Fixed new package detection
- turns out new packages folders aren't generating an `A` status in `git
  diff`, so this line never worked
- if we create a `package.json` file, we can reasonably assume we're
  creating a new package, so this should fix the issues we were seeing
  with caching + new packages
2023-07-25 16:15:36 +02:00
Fabien "egg" O'Carroll
517c406e17 Added Collections Content API
The only usecases we need to support at the moment are reading individual
collections by ID and by Slug. We can extend this API as we get more usescases
in future.
2023-07-25 16:14:02 +02:00
Daniel Lockyer
b0cf1f949a Switched TypeScript eslint config to custom plugin
refs https://github.com/TryGhost/DevOps/issues/50

- this switches the .eslint configs from `node` to `ts`, which is a new
  config to support eslint for TypeScript
- also makes minor changes to adhere to these new rules
2023-07-25 16:12:35 +02:00
Daniel Lockyer
bf53f8ba6f Added missing dependency definition
- `@tryghost/collections` is used within
  `@tryghost/model-to-domain-event-interceptor` but there wasn't a
  dependency on this package, so the build script wouldn't always build
  the dependency first
2023-07-25 15:56:46 +02:00
renovate[bot]
cbdd2f0273 Update dependency @types/nodemailer to v6.4.9 2023-07-25 15:50:24 +02:00
Fabien 'egg' O'Carroll
63ab254e33
Removed posts from Collections API
The correct mechanism for fetching posts from a collection is via the Posts API.
This removes all functionality of getting posts from the Collections API.

Co-authored-by: Naz <hi@nazavo.com>
2023-07-25 13:19:19 +00:00
Daniel Lockyer
adc3f8e8ee Skipped dependency caching for new packages
- in this event, we don't want to cache the dependencies because the new
  package will need to be linked to the others
- this commit should add detection for new packages and skip the cache
  if so
2023-07-25 15:14:50 +02:00
Daniel Lockyer
87d234403f Deduplicated tsconfig.json to use base config
- this allows for easier maintenance
2023-07-25 13:50:45 +02:00
Daniel Lockyer
223109be9d Added ghost/nql-filter-expansions to TS dev script list
- this enables us to watch the directory for changes and rebuild when
  necessary
2023-07-25 13:50:45 +02:00
Naz
658adf0ab1 Fixed build command for nql-filter-expansions
no issue

- The newly generated package did not have the build:ts command needed for nx build to run
2023-07-25 19:01:56 +08:00
Naz
694ab1d32d Added support for expansions in collection filters
refs https://github.com/TryGhost/Arch/issues/46

- Similarly to post filters, collection filters now support both 'tag' and 'tags' nql filter keys when defining a filter for related tag slugs. For example, both `tag:avocado` and `tags:avocado` would both be valid collection filters that would filter by the same 'slug' property of the tags assigned to a post.
- Along with these changes had to rework the tags property of the collection posts to match the shape used in post resources. Moved from:
`tags: ['bacon', 'broc']`
to
`tags:[{slug: 'bacon'}, {slug: 'broc'}]`
2023-07-25 19:01:56 +08:00
Naz
8fa36916d7 Migrated admin and core modules to use nql-filter-expansions
refs https://github.com/TryGhost/Arch/issues/46

- Reused posts expansions from nql-filter-expansions module
2023-07-25 19:01:56 +08:00
Naz
9f979917e3 Added nql-filter-expansions module
refs https://github.com/TryGhost/Arch/issues/46

- This module with be a placeholder for "filter expansions" we use across the codebase. For now it will only contain the expansions for the "post" resource, but any new or refactored expansions should land here too.
2023-07-25 19:01:56 +08:00
Naz
c4351456c6 Made tag snapshots more accurate in collections test suite
refs https://github.com/TryGhost/Arch/issues/46

- Allows to actually verify in the snapshot itself if the tag filter is working correctly or not.
2023-07-25 19:01:56 +08:00
renovate[bot]
3830401d55 Update dependency @playwright/test to v1.36.2 2023-07-25 12:26:15 +02:00
Michael Barrett
8095843939
Added feature flag for import tier functionality (#17480)
refs https://github.com/TryGhost/Product/issues/3629
2023-07-25 10:52:52 +01:00
Sodbileg Gansukh
0b00c653cc Added margin override to the signup card input
no issues

- some themes have global styles applied to inputs and it breaks the card input layout because of the style conflict
- this adds some default margin values to fix the issue
2023-07-25 14:22:44 +08:00
renovate[bot]
ec46993e0f Update dependency @types/react to v18.2.16 2023-07-25 08:05:02 +02:00
renovate[bot]
7baa1b13af Update storybook monorepo to v7.1.1 2023-07-25 08:04:47 +02:00
Ghost CI
fc50d1e92c Merged v5.55.1 into main 2023-07-25 02:46:04 +00:00
Ghost CI
95d343a786 v5.55.1 2023-07-25 02:46:02 +00:00
Chris Raible
e50ad7561c
🐛 Fixed image rendering in Outlook email client (#17475)
refs TryGhost/Product#3647

- The latest version of juice (which Ghost uses to inline css in email
newsletters) included new functionality to add height="auto" and
width="auto" for any images with dimensions set to auto in css
- This was causing rendering issues in Outlook, which would render the
image at full width, which often added a horizontal scroll and generally
messed up the flow of the document
- This change prevents juice from modifying the height or width of `<img
/>` tags
2023-07-24 18:33:56 -07:00
renovate[bot]
5ca8c1f568 Update dependency vite to v4.4.7 2023-07-24 20:56:39 +02:00
Aileen Booker
eb303ec221 Fixed Segment event named wrong 2023-07-24 15:49:33 +01:00
renovate[bot]
ce2df20b53 Update dependency react-select to v5.7.4 2023-07-24 16:37:44 +02:00
Daniel Lockyer
d5cbb33e54 Pinned dependencies 2023-07-24 16:21:47 +02:00
Daniel Lockyer
bb4c3de992 Deduplicated ts-node and typescript dependencies
refs https://github.com/TryGhost/DevOps/issues/50

- this commit deduplicates where we define the versions of these
  packages to make them easier to maintain
2023-07-24 16:21:47 +02:00
Daniel Lockyer
d0f9c8cf0c Deduplicated eslint and eslint-plugin-ghost to top-level package.json
refs https://github.com/TryGhost/DevOps/issues/50

- this deduplicates where we define the version of `eslint` and
  `eslint-plugin-ghost` so it's easier to maintain
2023-07-24 16:21:47 +02:00
Daniel Lockyer
532a7cf6e3 Fixed loading assets from CDN URL
refs https://ghost.slack.com/archives/C027S85FS/p1690202522054729

- this is another set of places where we load assets slightly
  differently
- this should fix user profile images when using assets from a CDN
2023-07-24 16:12:29 +02:00
renovate[bot]
e2bb39b025 Update dependency webpack to v5.88.2 2023-07-24 11:03:33 +00:00
renovate[bot]
61b5615826 Update dependency terser to v5.19.2 2023-07-24 11:01:06 +00:00
renovate[bot]
b5453e740e Update dependency yjs to v13.6.7 2023-07-24 10:38:06 +00:00
renovate[bot]
7fc8fd1696 Update tiptap monorepo to v2.0.4 2023-07-24 10:33:33 +00:00
renovate[bot]
4441328576 Update dependency i18next to v23.2.11 2023-07-24 10:31:48 +00:00
renovate[bot]
3b9b8009e1 Update dependency mysql2 to v3.5.2 2023-07-24 10:29:26 +00:00
Michael Barrett
184c6ae951
Retain newsletter subscriptions on suppression (#17373)
refs https://github.com/TryGhost/Product/issues/2610
2023-07-24 10:47:57 +01:00
Djordje Vlaisavljevic
5d5d33b930
Changed NewsletterList to use new Table component (#17458)
refs https://github.com/TryGhost/Product/issues/3601

- `NewsletterList` now uses the new `Table` component, along with its
subcomponents `TableRow` and `TableCell` to be able to show more
relevant data
2023-07-24 09:50:02 +01:00
renovate[bot]
0aa5815b26 Update dependency nx to v16.5.5 2023-07-24 08:46:03 +02:00
Naz
baf0f4b692 Added /collections/slug/:slug Admin API endpoint
closes https://github.com/TryGhost/Arch/issues/45

- This endpoint is here to keep the convention of being able to fetch the resource by it's slug through a `GET /{resource_name}/slug/:slug`. It has identical output as the `GET /collections/:id` endpoint
- The alternative would be having an alias and try fetching by :id and then by slug if the result for id was null, but that would be a completely new pattern we have not used anywhere else yet.
2023-07-24 14:27:17 +08:00
renovate[bot]
ef3b6ea7e8 Update dependency @embroider/macros to v1.13.0 2023-07-24 08:13:49 +02:00
renovate[bot]
f606039fee Update dependency html-validate to v8.1.0 2023-07-24 08:13:34 +02:00
Kevin Ansfield
0b6c2e3421
Fixed logic for checking theme compatibility with @page properties (#17451)
no issue

- logic was incorrect in two places that meant we were showing the incompatibility warning for compatible themes
- `codedErrors` was looking at the Ember Data `errors` object instead of the renamed `gscanErrors` object
2023-07-21 16:39:13 +00:00