closes https://github.com/TryGhost/Team/issues/3307
This commit includes several important updates to add internationalisation (i18n) support within the signup form package:
- Modified the translate script in `package.json` to include translations for the signup form.
- Added a new test for the signup form resources in `i18n.test.js`.
- Updated `tsconfig.json` to allow synthetic default imports.
- Made updates to `package.json`, including adding a prebuild command for `@tryghost/i18n` to ensure typescript declaration files get built.
- added `vite-plugin-commonjs` so we can bundle commonjs packages to be useable by the browser.
- In `App.tsx`, imported the `i18n` library and created an `i18n` instance for the `signup-form` namespace. This `i18n` instance's `t` function was added to the application context.
- Updated the `AppContextType` in `AppContext.ts` to include the `t` function from i18n
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
refs https://github.com/TryGhost/Team/issues/3269
- fixes continuation of list sequence when a non-list-node separates list nodes bringing rendered output in line with editor depiction
refs https://github.com/TryGhost/Team/issues/3318
Adds error handling pattern for facebook and twitter account settings same as old admin, showing error message when incorrect value is added and also on blur updates the value to include the facebook/twitter URL
refs https://github.com/TryGhost/Team/issues/3338
* background and button color can be passed in the script tag dataset
* text color is calculated automatically from background/button color
- This includes changes to support PascalCase filenames for interfaces
- Also bumps newer packages to use the latest version to avoid conflicts
with the underlying eslint-plugin-filenames package
refs https://github.com/TryGhost/Team/issues/3307
Added TypeScript support and a new namespace for the `i18n` module. This
enables type checking and localisation for the new signup form component and future typescript projects that may need to add i18n support.
refs: https://github.com/TryGhost/Ghost/issues/16628
This adds a library for interpolating strings with React components, which allows us to pass HTML elements / React components into our i18n templates. We can further templatize those components to have fully translated, nested components.
closes https://github.com/TryGhost/Team/issues/3311
- added event handler to the mobiledoc editor for cut and copy operations that reads mobiledoc from the event data, converts to lexical using `@tryghost/kg-converters` and stores the converted data on the event under the `application/x-lexical-editor` mimetype ready to be pasted into a lexical editor
refs https://github.com/TryGhost/Team/issues/3151
- adds a new vite + typescript + storybook + TW package for setting up admin settings in react with base config that works with Ghost monorepo
- includes base components/design system for new settings UI
- adds eslint rule config to the package to match rest of Ghost codebase
- this is an experimental package as we figure out the best patterns for new admin packages in Ghost monorepo
Co-authored-by: Peter Zimon <zimo@ghost.org>
These versions use the latest version of @tryghost/errors, which uses
the correct import for @stdlib/utils-copy. This should hopefully stop
missing module errors when running locally.
As discussed with the product team we want to enforce kebab-case file names for
all files, with the exception of files which export a single class, in which
case they should be PascalCase and reflect the class which they export.
This will help find classes faster, and should push better naming for them too.
Some files and packages have been excluded from this linting, specifically when
a library or framework depends on the naming of a file for the functionality
e.g. Ember, knex-migrator, adapter-manager
refs 9d104c8511
- we've seen recurring instances where Ghost will hog memory after image
uploads
- we use `jemalloc` to try and help this, but it still seems to happen
- according to the sharp thread referenced in my commit above, memory
fragmentation can also be helped by reducing the concurrency within
sharp
- this is a bit of an experiment and we can revert if it causes issues
refs 27e4523aec
- we no longer use `oembed-parser`, so we can remove it from
package.json
- also pins the `@extractus/oembed-extractor` package and adds it into
`@tryghost/oembed-service` where it was missing
refs TryGhost/Ghost#16048
- When attempting to embed a Youtube video that has had embedding
disabled by its owner/author, Ghost displayed a generic error message
that didn't indicate the reason for the failed emebed.
- This change updated the error message when Youtube (or any provider)
returns 401: Unauthorized to indicate that the owner of the resource has
explicitly disabled embedding.
This is an initial start to using TypeScript in our non-core Ghost packages.
- Adds a prepare script to build the project after installing deps
- Adds an initial tsconfig.json which is compatible with our node env
- Migrates all of the code to TypeScript, including tests
- Updates tests to use ts-node so that we don't need to compile the tests
- ts-node is installed at the top level because the env is weird with lerna and
doesn't work otherwise
- Updates the yarn dev script to build the project with the --all and --revisions flag
fixes https://github.com/TryGhost/Team/issues/2385
The Sentry version has been locked to v7.11.1 for some time because Sentry still used a legacy Node feature, called domains. Due to a bug or change in in Noide 16+, those domains broke handling uncaught promise execptions. So Ghost crashed when a promise exception wasn't caught. But that shouldn't be the case because we have a global uncaught exception handler.
Luckily Sentry switched to AsyncLocalStorage in v7.48.0. This fixes the issue as demonstrated in c0cd62184c