Commit Graph

14888 Commits

Author SHA1 Message Date
Daniel Lockyer
0d8bc06fb9
Merged v4.26.1 into main
v4.26.1
2021-12-07 09:36:54 +00:00
Daniel Lockyer
dd5c5b7551 v4.26.1 2021-12-07 09:35:14 +00:00
Daniel Lockyer
9f0d72f159 Updated Admin to v4.26.1 2021-12-07 09:35:14 +00:00
Fabien egg O'Carroll
2a1eb3de88 Improved rendering for twitter newsletter embeds
refs https://github.com/TryGhost/Team/issues/1001

This also adds the missing alpha flag so that we can release this when
it's ready.
2021-12-07 11:23:54 +02:00
djordje vlaisavljevic
aa7d1e240c
🎨 Made toggle card closed by default
refs https://github.com/TryGhost/Team/issues/1209
2021-12-07 09:00:43 +00:00
Daniel Lockyer
4673bd05fc
Destroyed connection before restoring DB file
no issue

- we've seen some instances of SQLite saying "database disk image is malformed"
- I think this happens because we copy the file whilst we are still connected to
  the old DB
- this commit destroys the connection before copying the clean file to the live
  DB file
2021-12-07 08:23:51 +00:00
Naz
9c0752896c Fixed error wording in fixture-utils
refs 404b2023e5
refs https://github.com/TryGhost/Toolbox/issues/129

- The previous error message wasn't helpful at all . Now we can tell "what?" fixture was looked-up and then go from there to find out why it is missing
2021-12-07 11:12:10 +04:00
djordje vlaisavljevic
67b6304807 Made toggle card closed by default
refs https://github.com/TryGhost/Team/issues/1209
2021-12-06 22:15:54 +01:00
Sam Lord
97451a93cb
Extract logging from DI patterns, only use @tryghost/logging package
refs: https://github.com/TryGhost/Toolbox/issues/146

Switched to @tryghost/logging instead of passing around the library. The main sticking points of this change are jobs. When jobs are launched we don't want them to use a separate @tryghost/logging instance because they would start parallel rotation jobs. @tryghost/logging v2.x passes all logs to the parent process if run in a child process, so that we can use the same patterns in jobs and the rest of the codebase.
2021-12-06 18:00:55 +00:00
Sam Lord
928a30bd98 Prevent TailScale from trying to run in pushes to main branch on forks. 2021-12-06 15:28:05 +00:00
Daniel Lockyer
a3cc66be50 Copied DB for faster SQLite tests
refs https://github.com/TryGhost/Toolbox/issues/136

- we nuke and reinitialize the DB many times between tests
- this forms a good portion of the time taken and we shouldn't be spending
  so much time on just resetting the DB back to a known state
- this commit switches out the knex-migrator reset + init calls for SQLite to
  a function which keeps a clean copy of the DB and copies the file back
  when we "reset"
- for MySQL, existing functionality is kept
- this massively speeds up tests because it saves ~700ms+ for every reset
- whilst this change seems to work, it's just the start so there's a
  lot more refactoring needed. this change is currently gated to CI until
  it's deemed safe/sane enough to run on local machines without blowing
  up
2021-12-06 15:22:44 +00:00
Hannah Wolfe
40fee069c9
Moved locale testing out of casper fixture (#13850)
refs: https://github.com/TryGhost/Toolbox/issues/137#issuecomment-986829141

- Moving the weird customisation of Casper out of the test fixture
- Created a standalone theme for testing locales instead
- This should make it easier for us to update our Casper fixture
2021-12-06 15:11:54 +00:00
Daniel Lockyer
5d191e90b9 v4.26.0 2021-12-06 13:29:21 +00:00
Daniel Lockyer
070992b316 Updated Admin to v4.26.0 2021-12-06 13:29:21 +00:00
Daniel Lockyer
41d301d78b 🎨 Updated Casper to v4.3.1 2021-12-06 13:29:20 +00:00
Thibaut Patel
361033ead2 Added a callout card
refs https://github.com/TryGhost/Team/issues/1206

- The callout card displays an emoji and a paragraph of text inside a highlighted box.

Co-authored-by:
- Sanne de Vries (@sanne-san)
2021-12-06 14:13:43 +01:00
James Morris
5b34af9954 Tweaked AMP and email CSS and moved from REM to EM
refs https://github.com/TryGhost/Team/issues/1239
2021-12-06 13:08:02 +00:00
Fabien egg O'Carroll
e43296f1d7 Added include data to Twitter embed
refs https://github.com/TryGhost/Team/issues/1001

This data is required to render information for linked content, for
example images, polls, and mentioned users.
2021-12-06 14:24:59 +02:00
Rishabh Garg
ea54393e88
Added toggle card to editor (#13834)
closes https://github.com/TryGhost/Team/issues/1209

The toggle card allows adding collapsible content in pages and posts.
2021-12-06 17:43:33 +05:30
Rishabh
75b3ca80a0 Fixed toggle card showing style values in excerpt
refs https://github.com/TryGhost/Team/issues/1209
2021-12-06 17:40:22 +05:30
djordje vlaisavljevic
024f735844 Moved svg arrow styles from inline to CSS file
refs https://github.com/TryGhost/Team/issues/1209
2021-12-06 12:58:47 +01:00
Sanne de Vries
1bc64dc7e4 Fixed callout card link invisible on brand-color background in AMP 2021-12-06 11:02:21 +00:00
Kevin Ansfield
1f06cf7d2c Removed kg-width-wide class from alternative blockquote
refs https://github.com/TryGhost/Team/issues/1239

- bumped the mobiledoc-to-html renderer so it doesn't add the `kg-width-wide` class when rendering `aside` sections to `<blockquote>`
2021-12-06 10:22:54 +00:00
Rishabh
2aa353a1a0 Added custom audio player UI for audio card
refs https://github.com/TryGhost/Team/issues/1230

- adds custom css and js for custom audio card player
- bumps `kg-default-cards` to add custom audio player ui for theme
2021-12-06 14:24:41 +05:30
Naz
3c19a8f014 Cleaned up mock-express tests from unnecessary inits
refs https://github.com/TryGhost/Toolbox/issues/152

- Have skimmed through the test suites in hopes to find some quick performance wins to bring the runtime speed closer to the one in "main". Haven't been successful to identify major wins, cleaned up a couple of small bits.
- We'll have to live with a tradeoff between maintainability/unified boot VS cost of mainitaining a fake boot process. Imo extra couple seconds of runtime is worth it.
2021-12-06 21:28:53 +13:00
Naz
abcd715907 Fixed express app stacking
refs https://github.com/TryGhost/Toolbox/issues/152

- Because the root app module was initialized only once per runtime it caused all the express apps to stack on each other causing all sorts of strange behavior when trying to test redirects/vhost mounts etc. Lesson here: be very cautious of how the module is initialized, an explicit function is almost always a better way!
2021-12-06 21:28:53 +13:00
Naz
91338b23d9 Fixed typo 2021-12-06 21:28:53 +13:00
Naz
a58e9bb61c Added default options to regression test utils
refs https://github.com/TryGhost/Toolbox/issues/152

- Allows to override boot options form regression test level - needed in some cases for vhost tests
2021-12-06 21:28:53 +13:00
Naz
9dc096cb15 Fixed api vs frontend test suites
refs 3c7a8dead4

- The tests needed adjustments with the native boot mechanism.
- The number of returned posts changed in the test resutls because duing native boot we also insert fixtures which add to the number of initial posts
- The vhost regression suite is still failing and I had no strength to figure out why. The redirect it fails with makes no sense, the clue here is that the test doesn't fail when running in isolation, so probably has to do with some leftover overrides from the previous test cases.
2021-12-06 21:28:53 +13:00
Naz
9e53f36c42 Fixed regression test suite stubs
refs 3c7a8dead4

- The boot process has been using an asyc method to load the routes file, which is the case now for these tests since the switch to raw boot method instead of mimicking it manually
2021-12-06 21:28:53 +13:00
Naz
51a4a65eec Enabled frontend-only boot for mock-express tests
refs 3c7a8dead4

- Simplifies the state initialization code significantly and reuses native boot mechanism instead of mimicking it (it was a headache to maintain with all the internal services moving around)
2021-12-06 21:28:53 +13:00
Naz
de121e1219 Modified boot to conditionally return an express app
refs 3c7a8dead4

- The idea is a rip-off from the referenced commit. It allows to isolate initialization logic to "frontend" mounted on top of a "parent"
- Gives path to simplify the express-mock tests

Co-authored-by: Hannah Wolfe <erisds@gmail.com>
2021-12-06 21:28:53 +13:00
Naz
b19424acb3 Moved vhost mounts into boot file
refs https://github.com/TryGhost/Toolbox/issues/152

- This stops the mounting of the admin and frontend from being buried deep in express initialisation
- Instead it's explicit, which makes two things almost possible:
   1. we can potentially boot the frontend or backend independently
   2. we can pass services and settings loaded during boot into the frontend
- This needs more work, but we can start to group all the frontend code together
- Meanwhile we also need to rip apart the routing and url services to decouple the frontend from the backend fully
- BABY STEPS!

Co-authored-by: Hannah Wolfe <erisds@gmail.com>
2021-12-06 21:28:53 +13:00
Daniel Lockyer
f2ba9d3aac
Fixed notify library tests
refs ec28478435

- the method signature changed in
  9fa8800b9d
  and the usage wasn't updated in Ghost
- this commit updates the tests to reflect this internal change
2021-12-06 08:20:39 +00:00
Daniel Lockyer
71b647aab1
Removed unused import
refs ec28478435

- I removed use of the `logging` variable in the last commit so we no
  longer need the library import
- this fixes a linting issue
2021-12-06 08:17:07 +00:00
Daniel Lockyer
ec28478435
🐛 Fixed error when sending messages via bootstrap socket
refs https://github.com/TryGhost/Ghost/issues/13837

- a [refactor](9fa8800b9d) in `@tryghost/bootstrap-socket` changed the signature of the method it exprots, but the use of this
  library wasn't updated in Ghost
- therefore, the library was trying to send the `@tryghost/logging` library, which caused
  errors with Ghost-CLI down the line, as mentioned in the issue
- this commit updates the method signature to match what is expected
2021-12-06 08:04:26 +00:00
Renovate Bot
0ce992914f
Lock file maintenance 2021-12-06 00:37:59 +00:00
Peter Zimon
8515388ce6 Added Twitter styles to email template 2021-12-04 10:34:47 -04:00
Fabien egg O'Carroll
94cfbb19fc Added fallback for NFT title when name is missing
no-issue

Some NFT's are created without a title, for example the Bored Ape Yacht
Club collection does not name the tokens, instead just referring to them
by ID. This change falls back to the token_id, which is unqiue within
the collection to support these tokens.
2021-12-03 21:16:22 +02:00
Fabien egg O'Carroll
e5068a6557 Updated email content for paid signups
refs https://github.com/TryGhost/Team/issues/1067

Changes based on product feedback.
2021-12-03 21:15:55 +02:00
djordje vlaisavljevic
641996e5cd Updated default toggle card styles
refs https://github.com/TryGhost/Team/issues/1209
2021-12-03 18:07:46 +01:00
djordje vlaisavljevic
18be68a4bb Updated the spacing between toggle cards on frontend
refs https://github.com/TryGhost/Team/issues/1209
2021-12-03 17:55:26 +01:00
Daniel Lockyer
eaacdc761e v4.25.1 2021-12-03 16:00:37 +00:00
Daniel Lockyer
4716c76044 Updated Admin to v4.25.1 2021-12-03 16:00:37 +00:00
djordje vlaisavljevic
c229ada2b5 Updated toggle styles
refs https://github.com/TryGhost/Team/issues/1209
2021-12-03 16:41:50 +01:00
Sanne de Vries
c0d5711d6d Added link styling for callout card with brand color as background
Refs https://github.com/TryGhost/Team/issues/1206
2021-12-03 14:08:18 +00:00
Sanne de Vries
a07580b890 Updated callout card default styles
No ref

- Added default font sizes and line heights
- Switched from absolute to relative units to adapt to different themes
2021-12-03 13:28:19 +00:00
Renovate Bot
611d4e7155 Update dependency @tryghost/email-analytics-service to v1.0.5 2021-12-03 10:35:36 +00:00
Daniel Lockyer
a59a626c74
Updated lockfile
no issue

- this change seems to have been missed somewhere
2021-12-03 10:34:44 +00:00
renovate[bot]
917c39254d
Added CSS rules for new toggle card
refs https://github.com/TryGhost/Team/issues/1209
2021-12-03 15:35:52 +05:30