Commit Graph

33644 Commits

Author SHA1 Message Date
Simon Backx
c3c2427992 Fixed gh-count-down-html-characters helper to support null values
no issue

The default null value for the sigup terms caused an error. This fixes that issue.
2023-04-11 17:49:37 +02:00
Paul Davis
b149ed79ae Change self-service domain 2023-04-11 16:16:48 +01:00
Simon Backx
66b353ed97
Added bulk destroy posts api (#16587)
fixes https://github.com/TryGhost/Team/issues/2921

Adds the bulk destroy API for posts, and implemented it in the admin UI.
2023-04-11 16:37:42 +02:00
Simon Backx
1ce4e4c522 Updated post context menu to take permissions into account
fixes https://github.com/TryGhost/Team/issues/2938

- Multi selection is disabled for contributors and authors (no actions available)
- Delete action is only available for admins and owners
2023-04-11 16:33:39 +02:00
Elena Baidakova
100b4880ee Bump Koenig packages
no issue
2023-04-11 18:08:30 +04:00
Simon Backx
e938c2d5cc Fixed clearing posts selection when navigating
fixes https://github.com/TryGhost/Team/issues/2983

When navigating, the posts selection will get cleared. This also fixes a bug with CMD+a that had an old event listener that was not cleared correctly, breakign CMD+A after navigation.
2023-04-11 15:53:01 +02:00
Simon Backx
114a6eb953 Fixed CMD+F and multiple post selection
fixes https://github.com/TryGhost/Team/issues/2939

When using CMD+F, the multiple selection list still thinks CMD is pressed because the keyup event is not fired. This is fixed by clearing the pressed keys when the window is blurred.
2023-04-11 15:37:12 +02:00
renovate[bot]
ee216038e9 Update dependency @tryghost/email-mock-receiver to v0.3.1 2023-04-11 11:47:08 +02:00
renovate[bot]
4b8f631563 Update dependency @playwright/test to v1.32.3 2023-04-11 11:14:38 +02:00
renovate[bot]
88e1f2c50f Update dependency semver to v7.4.0 2023-04-11 11:01:01 +02:00
Sanne de Vries
79947d2f45 Updated signup terms input field in Portal settings
Refs https://github.com/TryGhost/Team/issues/2897
2023-04-11 10:38:45 +02:00
Fabien 'egg' O'Carroll
d4fe7217d6
Removed feature action from context menu for email-only posts (#16606)
These posts make no sense to be featured, so we are removing the option
from the context menu when there is only a single email-only post under
selection.

We still allow featuring these posts in the PSM and when they are
part of a larger selection, but fixing all places for this is out of
scope atm.
2023-04-11 13:25:49 +07:00
Chris Raible
7a800ec06e
Fixed flaky test: posts API export can export with order (#16605)
closes Tryghost/Team#2975

- The test was failing because the order of the posts was not guaranteed
- The posts receive a published_at timestamp = new Date() when they are
created, unless a published_at date is passed in
- ~1/3 times the tests would run, the ordering would change and this
test would fail
- This commit fixes the test by passing in a published_at date to ensure
the order is always the same
2023-04-10 18:40:03 -07:00
Thibault Malfoy
b9014a47f8
Updated French translations to reflect feedback (#16593)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-10 16:47:32 +02:00
Daniel Lockyer
a97335f7f4
Removed translations for "Powered by Ghost"
refs https://github.com/TryGhost/Team/issues/2795
refs https://ghost.slack.com/archives/CFH10N79S/p1681131575137019?thread_ts=1680206445.643819&cid=CFH10N79S

- we want to keep this in English so this commit removes the
  translation wrapper and associated translations
2023-04-10 15:13:49 +02:00
Daniel Lockyer
7435b18c85
Added support for new locales
refs https://github.com/TryGhost/Team/issues/2795

- PRs for these locales were merged this morning so we need this to
  enable the languages
2023-04-10 14:05:33 +02:00
Daniel Lockyer
3a0768cfda
Reformatted locale files
- perhaps we need better config to enforce this from the get-go
2023-04-10 14:04:51 +02:00
Sanne de Vries
9b1dd2a4ab Updated featured-post indicator and post selection styles
Refs https://github.com/TryGhost/Team/issues/2923
2023-04-10 13:53:04 +02:00
martinverbic
d866993ce2
Added Slovenian locale (#16594)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-10 13:52:43 +02:00
Ugurcan Yildirim
e446e31a9e
Added Turkish locale (#16596)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-10 13:52:10 +02:00
Sag
ed28bba94d
Upgraded Lexical packages (#16600)
no issue
2023-04-10 10:39:15 +02:00
Daniel Lockyer
e30a386e67
Updated PR template to just auto-generate the summary
- Copilot for PRs is cool but quite verbose, so I think just showing the
  summary is more useful
2023-04-10 10:35:52 +02:00
renovate[bot]
3b8eea2c01 Update dependency html-validate to v7.15.1 2023-04-10 10:25:09 +02:00
Jordan Ostreff
f5f58994f7
Added Bulgarian translations (#16590)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-10 10:24:35 +02:00
Chris Raible
71aca468b3
Fixed flaky test: Can generate a mentions report (#16592)
refs TryGhost/Team#2844

- assertion was comparing a constant `now` with a `new Date()` that was
made on the next line — by passing now in as the end date to
`getMentionReport`, the end date should always equal the constant
- intent of the test is just to make sure a mentions report can
generate, so we can just use the variable now instead of creating new
Date() objects
2023-04-07 19:03:22 -07:00
Chris Raible
04e6b9763c
Added retries to a flaky batch sending test (#16591)
refs TryGhost/Team#2949
2023-04-07 17:44:11 -07:00
Simon Backx
bec71d7840 Added maximum signup terms count in HTML
refs https://github.com/TryGhost/Team/issues/2680

- Includes a new helper that is able to count HTML characters
- Prevent saving portal settings when maximum length is exceeded
2023-04-07 17:15:15 +02:00
Ghost CI
1c46e3d456 v5.42.2 2023-04-07 16:00:37 +01:00
Naz
cdc8cb2d16 Added email snapshot test to member suite
refs https://github.com/TryGhost/Team/issues/2691
refs 53fd78cc86

- One more example using emailMockReceiver instead of outdated mockManager's assertions.
2023-04-07 16:12:51 +02:00
Naz
f77aa03e91
Added missing snapshots for version tests
refs 7552873072

- These snapshot were missing with original refed commit.
2023-04-07 15:31:18 +02:00
Naz
53fd78cc86
Added email snapshot tests to newsletter suites
https://github.com/TryGhost/Team/issues/2691

- This change is meant to serve as an example for testing outbound emails. It uses emailMockReceiver and it's html/test/metadata snapshotting features.
- The wider goal is to move away from using "mockManager.assert.sentEmail" that only tested some of the outgoing email contents to more wide range testing through "emailMockReceiver"
- For more on best practices using emailMockReceiver check out codex section on "email testing" - https://ghost.notion.site/End-to-end-Testing-6a2ef073b1754b18aff42e24a632a007#cf33c7f0-fba6-4951-bf50-09080374719c
2023-04-07 14:34:57 +02:00
Naz
f264c1d1f8
Removed unnecessary mockMail call
no issue

- This test has nothing to do with outgoing emails, so no need to mock mail
2023-04-07 14:34:57 +02:00
renovate[bot]
11aacc0e6b Update dependency copy-webpack-plugin to v11 2023-04-07 13:47:46 +02:00
renovate[bot]
07545541a8 Update @tryghost 2023-04-07 13:47:12 +02:00
Simon Backx
cf4e6f80c5 Released Portal v2.28.1 2023-04-07 13:44:25 +02:00
renovate[bot]
9e888aeb15 Update dependency @babel/eslint-parser to v7.21.3 2023-04-07 13:43:07 +02:00
Adam Hunter
ef264e2263
Fixed typo in variable name for GeolocationService (#16574) 2023-04-07 13:23:15 +02:00
Sanne de Vries
c48ca09ff2 Moved signup terms above plan selection for non-free plans in Portal
Refs https://github.com/TryGhost/Team/issues/2878
- The free-only version of Portal will show the signup terms just above the signup button, whereas the non-free Portal version will show the signup terms above the plan selection
- The signup terms settings have been moved to the "Signup options" section
2023-04-07 11:53:59 +02:00
Simon Backx
f4d75388fd
Added post bulk edit api (#16576)
fixes https://github.com/TryGhost/Team/issues/2919

This pull request implements a new feature that allows bulk editing of
posts by a filter. It adds a new `bulkEdit` endpoint to the posts API
and new `PostsService` methods to handle the bulk actions.

The posts list component is duplicated, so we can keep working in a
copied version without affecting the old version without a flag. It
temporarily adds a star icon to indicate featured posts in the posts
list.
2023-04-07 11:48:14 +02:00
Simon Backx
ed1ae60bec
Fixed pasting links in koenig basic html input (#16584)
refs https://github.com/TryGhost/Team/issues/2680

When selecting a portion of text in KoenigBasicHtmlInput (caption input
for images, newsletter footer text input, new signup notice), and then
pasting a link, some funky things happen:
- Part of the text disappears
- The wrong part of the text is linked

The cause of this is that `KoenigBasicHtmlInput` deletes the selected
text range when pasting, even when pasting a link. so moving that part
below the code that detected a valid link, fixes the issue.

This also adds an option to not close an old style modal when pressing
the enter key (e.g. pressing enter when entering a link causes the modal
to close).
2023-04-07 11:19:37 +02:00
Thibault Malfoy
726246b80e
Fixed a few typos in the French translation (#16546)
refs https://github.com/TryGhost/Team/issues/2795
2023-04-07 11:16:30 +02:00
Chris Raible
d49241dd29
Fixing error in browser test (#16583) 2023-04-07 01:11:37 -07:00
Ghost CI
7b6805580c Merged v5.42.1 into main 2023-04-07 08:51:06 +01:00
Ghost CI
89cf224a2a v5.42.1 2023-04-07 08:51:02 +01:00
Daniel Lockyer
378dd913aa
🔒 Fixed path traversal issue in theme files
refs https://github.com/TryGhost/Team/issues/2843

- Using encoded path traversal characters in URL's path allowed to fetch
  any file within active theme's folder, which is disallowed
- credits to: fuomag9 https://kiwi.fuo.fi/@fuomag9
2023-04-07 09:45:59 +02:00
Fabien "egg" O'Carroll
c99016fd2f Limited post export size to 1000 posts
refs https://github.com/TryGhost/Team/issues/2936

We want to make sure that downloads complete in a reasonable number of
time, and the simplest way to do that is to cap the size of the file.
2023-04-07 14:44:28 +07:00
Fabien "egg" O'Carroll
a890f0b707 Updated the posts export button to be a GhTaskButton
refs https://github.com/TryGhost/Team/issues/2935

This allows us to track the state with a loading spinner and a
success/error message on completion. This is expecially important for
larger sites where the download can take a long time, and users are
unsure if something is happening.
2023-04-07 14:44:28 +07:00
Fabien "egg" O'Carroll
3dac3cb4e2 Added fetchAndDownloadFile method to utils service
The existing approach didn't expose when the download was complete.

By fetching the file upfront and downloading from a blob we can better
estimate when the download is complete because we load the file in
memory, and then download from there.

The promise resolves after the file is in memory, so the delay between
the promise resolving and the file actually being downloaded is a lot
shorter, and based on the size of the file.
2023-04-07 14:44:28 +07:00
Chris Raible
563793c7ed
Added retries for all known flaky tests (#16582)
refs TryGhost/Team#2833

- for mocha tests, we can add `this.retries(1)` to any flaky tests
- for playwright tests, we can add `test.describe.configure({ retries:
1})` to any `describe` block
- not a long-term solution, but it should help mitigate issues with flaky
tests in short term
2023-04-07 00:37:01 -07:00
Fabien "egg" O'Carroll
4225377436 Fixed links in Portal signup terms
Because we load Portal in an iFrame the anchor tags do nto work
correctly. We've intercepted all clicks on them and manually opened
the URL in a new window instead.
2023-04-07 14:26:35 +07:00