Commit Graph

90 Commits

Author SHA1 Message Date
Daniel Lockyer
c2f2312ad2
Deleted Admin submodule
refs https://github.com/TryGhost/Toolbox/issues/365

- this is no longer needed because we've inline Admin into the monorepo
2022-08-03 15:56:53 +02:00
Daniel Lockyer
59c750a369 v5.7.1 2022-08-03 12:56:44 +01:00
Daniel Lockyer
068c52de1d 🎨 Updated Casper to v5.2.3 2022-08-03 12:56:44 +01:00
Fabien "egg" O'Carroll
8dc8ab88ca Added default values for comment_count helper
refs https://github.com/TryGhost/Team/issues/1695

We add english defaults for the singular and plural params leaving the
empty param blank so as to not draw attention to low engagement.
2022-08-03 12:23:37 +01:00
renovate[bot]
81ce63f584 Pin dependency @types/common-tags to 1.8.1 2022-08-03 13:05:20 +02:00
Daniel Lockyer
02e696bd2f
Pinned dependency
- this should be pinned because Ghost is an application
2022-08-03 12:56:14 +02:00
Fabien "egg" O'Carroll
b8e3eb55cd Updated GScan to support comment_count and comments helpers
refs https://github.com/TryGhost/Team/issues/1695

Since these helpers take params now, we need to explicity add them
to the list of known helpers.
2022-08-03 11:52:08 +01:00
Fabien "egg" O'Carroll
e6317e9da3 Fixed the count endpoint for the Members Comments API
refs https://github.com/TryGhost/Team/issues/1695

When a post does not have any comments we were not returning any data
from the API, which would cause issues with the comment counts helper
frontend script. This updates the endpoint to always include the count
when explicitly requesting the count for specific posts.

We've also pulled the logic out into a stats service so that the endpoint
can just refer to the controller.
2022-08-03 11:52:08 +01:00
Fabien "egg" O'Carroll
023d85d561 Updated comment_count helper and frontend script
refs https://github.com/TryGhost/Team/issues/1695

This updates the comment_count helper from a block to inline, and the
frontend script to replace the entire element with the comment count
text. This means that theme designers will have the most flexibility
as they can choose whether or not to wrap the text in an element, as
well as which element.
2022-08-03 11:52:08 +01:00
Naz
452132600b Fixed trailing whitespace in test file
no issue

- The linter does not seem to pickup the trailing whitespace problem in test files. This would be good to fix project-wise with the `--fix` options or something similar
- This change is for example purpuses :)
2022-08-03 11:48:02 +01:00
Simon Backx
b57ffc0258 Added underline and bold style to post link in comment emails
refs https://github.com/TryGhost/Team/issues/1739
2022-08-03 11:55:05 +02:00
Daniel Lockyer
a17dc84869
Fixed Admin HTML missing from NPM tarball
refs f59b88967b

- the npmignore rules meant that the Admin HTML was missing from the
  tarball produced by NPM
2022-08-03 11:31:58 +02:00
renovate[bot]
3c47d61e68 Update dependency analytics-node to v6.2.0 2022-08-03 08:26:33 +02:00
Daniel Lockyer
82e7a0f103
Cleaned up Grunt copy plugin
refs 0a34be4012

- the admin html is no longer stored in core/server, and we don't need to
  copy the production file to default.html
- this commit cleans up the grunt command to do this, and removes the
  plugin whose only use was doing this
- this takes us another step closer to removing grunt
2022-08-02 21:14:04 +02:00
Daniel Lockyer
b9a0cc04b9
Switched out @lodder/grunt-postcss for postcss-cli
- this commit switches out the Grunt postcss plugin with the official
  postcss CLI
- this means we can remove yet another step from Grunt, which helps
  towards our goal of removing Grunt entirely
- I've confirmed the minified output is exactly the same as before
2022-08-02 20:27:44 +02:00
Naz
f65c068442 Fixed failing tests
refs 492960b9a8 (diff-658dc5d7181e4b0fe52a60085b938fa830b22a82a0f58e7fe49a1455984c58ce)

- The `this` context binding was not set on some of the class methods causing all sorts of chaos
2022-08-02 19:21:32 +01:00
Naz
492960b9a8 Refactored settings cache to use class/DI pattern
refs https://github.com/TryGhost/Toolbox/issues/364

- This is a groundwork which moves the "cache" property in settings cache to be injectable parameter, so we can swap it out with different implementations.
- The module will be broken downn into two concepts - an injectable cache  and a cache manager (the update system)
2022-08-02 17:18:07 +01:00
Simon Backx
e112f1cd40 Added empty line trimming to comment messages
fixes https://github.com/TryGhost/Team/issues/1737

- Empty lines at start
- Empty lines at end
- Duplicate empty lines inside the comment message (max one allowed)
2022-08-02 17:45:42 +02:00
Simon Backx
3f8ddd61f9 Changed subject lines for comment emails
fixes https://github.com/TryGhost/Team/issues/1735
2022-08-02 17:45:42 +02:00
renovate[bot]
9652d5ab32 Update dependency luxon to v3 2022-08-02 17:17:29 +02:00
renovate[bot]
7147495f3a Update dependency @tryghost/html-to-mobiledoc to v1.8.7 2022-08-02 17:13:28 +02:00
Rishabh Garg
845718111e
Added free trial feature flag in labs (#15130)
refs https://github.com/TryGhost/Team/issues/1724

- adds new `freeTrials` alpha flag for feature development

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2022-08-02 20:02:18 +05:30
Daniel Lockyer
f59b88967b
Cleaned up unused npmignore references
refs 0a34be4012

- as of the referenced commit, we no longer store the HTML in the
  core/server folder so we don't need to keep this folder in the
  npmignore
2022-08-02 15:18:05 +02:00
Kevin Ansfield
0a34be4012
Updated admin asset serving for ember-auto-import@2 compatibility (#15128)
refs https://github.com/TryGhost/Admin/pull/2252
closes https://github.com/TryGhost/Team/issues/1182

- Admin now copies it's build output to a single env-specific directory rather than splitting html and assets
  - `core/built/admin/{development|production}/*`
- updated the admin app's `serveStatic` definition for assets and controller's html serving to reflect the new asset paths
2022-08-02 13:43:45 +01:00
renovate[bot]
f132475ff9
Update dependency @sentry/node to v7.8.1 2022-08-01 20:49:21 +00:00
Simon Backx
a5084c7ee6 Renamed #ghost-comments-root to #ghost-comments (fragment to jump to comments section)
fixes https://github.com/TryGhost/Team/issues/1730
refs db8d1120f4
2022-08-01 16:36:03 +02:00
Daniel Lockyer
9ca8e80990 v5.7.0 2022-08-01 15:23:39 +01:00
renovate[bot]
4cbb622334 Update dependency @tryghost/image-transform to v1.2.1 2022-08-01 15:28:09 +02:00
Simon Backx
b7f3892be0
Added format option to img-url helper (#14962)
fixes https://github.com/TryGhost/Ghost/issues/14323

- Fixed support for resizing images from Unsplash using the `img-url` helper (previously the size property was ignored for images from Unsplash)
- Added support for `avif` file formats (supported by sharp out of the box)
- Added support for setting the format of images, with a new  `format` option:

E.g. to convert an image to webp (only works in combination with size for now, except for Unsplash where you can use it without size):
```
{{img_url @site.cover_image size="s" format="webp"}}
```

This can help improve the performance of a theme, by serving assets in `<picture>` elements with webp and fallback image formats.

Usage example:
```html
<picture>
    <source 
        srcset="{{img_url feature_image size="s" format="avif"}} 300w,
                {{img_url feature_image size="m" format="avif"}} 600w,
                {{img_url feature_image size="l" format="avif"}} 1000w,
                {{img_url feature_image size="xl" format="avif"}} 2000w"
        sizes="(min-width: 1400px) 1400px, 92vw" 
        type="image/avif"
    >
    <source 
        srcset="{{img_url feature_image size="s" format="webp"}} 300w,
                {{img_url feature_image size="m" format="webp"}} 600w,
                {{img_url feature_image size="l" format="webp"}} 1000w,
                {{img_url feature_image size="xl" format="webp"}} 2000w"
        sizes="(min-width: 1400px) 1400px, 92vw" 
        type="image/webp"
    >
    <img
        srcset="{{img_url feature_image size="s"}} 300w,
                {{img_url feature_image size="m"}} 600w,
                {{img_url feature_image size="l"}} 1000w,
                {{img_url feature_image size="xl"}} 2000w"
        sizes="(min-width: 1400px) 1400px, 92vw"
        src="{{img_url feature_image size="xl"}}"
        alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
    >
</picture>
```
2022-08-01 14:45:54 +02:00
Rishabh
312e2330a1 Extended paywall card for newsletters
refs https://github.com/TryGhost/Team/issues/1680

- paywall card in Admin now inserts cta and restricts content for newsletters as well
- mimics paywall behavior in posts for newsletters
2022-08-01 18:02:25 +05:30
Djordje Vlaisavljevic
5d65655f51 Updated newsletter CTA design 2022-08-01 18:02:25 +05:30
Daniel Lockyer
a25b5dc2e3 v5.6.0 2022-08-01 09:23:35 +01:00
Aileen Booker
304b660c9d
Added migrations to change Ghost Explore integration type 2022-08-01 09:08:06 +02:00
Sam Lord
48550c81aa Improved performance of prepareContentFolder function
fixes https://github.com/TryGhost/Toolbox/issues/150

- up until now, the test framework has copied all theme fixtures to the
  test directory when it boots Ghost
- the vast majority of tests don't need all the themes, so this is quite
  a wasteful operation
- this commit disables copying all themes by default, and provides the
  `copyThemes` boot option to enable this
- also adds a `copySettings` option, and defaults `redirectsFile` to
  false to further reduce the number of file copies
2022-08-01 08:58:13 +02:00
renovate[bot]
2c27d45473 Update dependency knex-migrator to v5.0.3 2022-08-01 08:57:57 +02:00
renovate[bot]
9c65aa166f Update dependency @playwright/test to v1.24.2 2022-08-01 08:42:59 +02:00
renovate[bot]
f325241430
Update dependency eslint to v8.21.0 2022-08-01 04:27:05 +00:00
renovate[bot]
b88f989f5f
Update dependency sqlite3 to v5.0.11 2022-08-01 02:02:20 +00:00
renovate[bot]
828587378c Update dependency @sentry/node to v7.8.0 2022-07-28 21:19:39 +00:00
Naz
195973eae1 Added successful job run check
refs https://github.com/TryGhost/Toolbox/issues/358

- Allows to check for a **successfull** job run and restart/re-add the job in case it was a failed one off job
2022-07-28 19:07:49 +01:00
Rishabh Garg
be3a8db828
Fixed failing preview test email (#15105)
refs https://github.com/TryGhost/Team/issues/1680

- using test emails via email preview in admin were failing due to missing post data attached to them
- adds test to make sure email segment rendering doesn't crash even with missing data
2022-07-28 21:05:47 +05:30
Fabien "egg" O'Carroll
467cf51b74 Added comment property to posts in Content API
refs https://github.com/TryGhost/Team/issues/1695

This property can be used by theme developers to determine if comments
are available for the currently logged in member. It follows the same
logic as used internally in the comments helper, so that they can be
used interchangeably
2022-07-28 14:55:53 +01:00
Fabien "egg" O'Carroll
93694d837e Updated {{comments}} helper with new options
refs https://github.com/TryGhost/Team/issues/1695

This updates the comments helper based on the design document

Changes include:
 - `color_scheme` renamed to `mode`
 - `avatar_saturation` renamed to `saturation`
 - `saturation` default changed from 50 to 60
 - `count` option added
 - `title` option added

The count and title options allow theme developers to better customise
the output of comments, so that they can either pass in their own
title, or pass in no title, and instead provide HTML in the them to
handle it. The same is the case for the count option, which is used to
toggle whether or not the comment count is shown.
2022-07-28 14:53:33 +01:00
Ronald Langeveld
f2710c906d Added koenig-react cdn url to default config. 2022-07-28 13:46:17 +02:00
Djordje Vlaisavljevic
f0d1cf2d66
Updated newsletter paywall cta design (#15111)
refs https://github.com/TryGhost/Team/issues/1705

- Made `max-width` smaller to avoid super-long lines
- Added `span` elements with `nowrap` to avoid one or two-word orphans

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-07-28 16:10:09 +05:30
Naz
ec0d548031 Fixed CI
no issue

- The test was initialized backwards... causing the job manager to start without "models" being fully initialized
2022-07-27 18:39:28 +01:00
Naz
1606a10ff8 Moved members migrations to one off job
refs https://github.com/TryGhost/Toolbox/issues/358

- The execution of members migration only ever has to be done once in the lifetime of the Ghost instance. It is slightly slow and blocking process, which slows down instance boot time considerably. Putting the execution into one off job allows to execute migrations only once and save boot time on each consequent instance restart - less resource usage, save the planet!
2022-07-27 18:07:24 +01:00
Aileen Nowak
b0144a7f8f Added explore alpha feature flag 2022-07-27 14:53:50 +01:00
Fabien 'egg' O'Carroll
e36e5e16bc
Improved Members Comments API
refs https://github.com/TryGhost/Team/issues/1688


We've moved the BREAD logic out of the endpoint and into a controller which
interfaces with the `frame` object from our API framework. The service handles
the core logic of comments, and has been updated with several fixes. This
separation means we keep the HTTP API logic and the underlying comments logic
decoupled.

We've also updated the naming to make it clear that it is part of the members api.

Permissions have been implemented, ensuring that members cannot create comments
if they do not have the required access, but they are able to edit their existing comments,
regardless of access.

The edited_at field is now correctly updated when a comment is edited.
2022-07-27 13:56:16 +01:00
renovate[bot]
9973b5419c Update dependency @playwright/test to v1.24.1 2022-07-26 18:18:50 +02:00