- this commit switches our `yarn dev` workflow from heavily relying on
Grunt, to using `nodemon` and `concurrently`
- we're doing this to reduce reliance on Grunt, but also to fix several
nits with the way `yarn dev` works in the monorepo
- we now use `nodemon` to run the Ghost backend, and it should
auto-refresh whenever you change a file in any of the packages (except
`admin`)
- we use `concurrently` to simultaneously run `ghost` and `admin` at
the same time. it seems to handle process cleanup well and has nice
colored prefixes to help with differentiating between log output
- this commit ends up removing a handful of Grunt dependencies and
reduces the functionality stored in the Gruntfile
- on the whole, it should keep existing functionality but there may be
some small underlying changes to get used to
closes: https://github.com/TryGhost/Ghost/issues/14980
refs: cc276486f0
- Tenor is now operated by Google, and the old v1 Tenor API has been decommissioned
- At present anyone with a pre-configured tenor integration will get intermittent errors, whilst it is impossible to setup a new tenor API integration
- Sadly old keys do not work with the new API, and new keys do not work with the old API, so there is no happy path forward.
- After this lands, everyone will need to go and get a new Google API Key for Tenor, update their config, and then the integration will work properly again.
- This particular change renames the API key from `publicReadOnlyApiKey` to `googleApiKey` to reflect that the key itself changes in type and behaviour
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
refs https://ghost.org/docs/faq/supported-databases/
- the supported database changes we were putting in place for v5 are
now applicable, so the copy needs to change
- also including minor design updates to make it look like an error
- as part of our effort to reduce our usage of Grunt in favor of more
maintainable (and maintained) alternatives, this commit removes Grunt
from Admin
- the main difference here is switching from subgrunt to shell, which
should be a nice stepping stone to removing Grunt altogether one day
no issue
- has a default class of `koenig-react-editor` which can be added to by using `@className`
- adds classes of `koenig-react-editor-loading` and `koenig-react-editor-error` to the `<p>` elements rendered during loading or when loading fails
no issue
- when running locally with local development version of koenig-react without any proxies we were previously forcing `https://` even if the specific url in config was `http://` meaning a proxy was required
- switched to allowing both http and https urls in config
- we're meant to be running our CSS through csscomb in order to apply
specific code styles, but the reality is that it never gets used
- keeping csscomb around just adds to the package cruft and so this
commit cleans up references to it in order to
refs https://forum.ghost.org/t/admin-template-issues-default-install/31750
- we recently switched to using different folders within `core/built`, to
indicate the assets that are applicable for development/production
environments
- unfortunately, this came with the side effect of the "development" assets
missing in the published tarball, which meant Admin wouldn't load when
running in development mode
- this was a regression from how it previously worked because we used to
just copy the production HTML file to the development HTML name, and
use the same assets
- after thinking about it, I think we can get rid of the split folders
for assets, because I don't think the use-case is there for having
them:
- if you run Ghost from source, you're 99% only using the
development-built assets
- if you want production ones, you can run with a flag, but the
development ones get wiped anyway
- those running Ghost from a published package are using the same
assets and HTML file
- therefore, I think we can make our lives simpler by removing the env
folders and using a folder under `core/built/admin/...`
- this commit implements that across Ghost and Admin
refs https://github.com/TryGhost/Toolbox/issues/365
- some of this was barely used anyway, but now Admin is a package in the
monorepo, we don't need to be installing dependencies twice
refs https://github.com/TryGhost/Toolbox/issues/365
- the .github/workflows/test.yml in Admin needed to be merged with the
top-level GHA folder so this test needed porting
- there is still the browser matrix testing to port once things are
stable
refs https://github.com/TryGhost/Toolbox/issues/365
- these files are no longer needed now they're in the main Ghost repo
- re-adds the Renovate rules into the top-level Renovate config
refs: https://github.com/TryGhost/Ghost/issues/14980
refs: https://github.com/TryGhost/Ghost/pull/15087
- The Tenor v1 API has been decommissioned https://developers.google.com/tenor/guides/migrate-from-v1
- Updated the API to v2, but there are some differences we have to account for
- Swapped from using the old "trending" API to the new "featured" API, which at present seem to be the same thing
- Added a new client_key, which identifies the integration using the google API key, as google API keys can be used for multiple APIs and projects
- Fixed up the error handling to support Google's error format, and also caught and replaced the error that everyone with old keys will see to make it clearer. This includes adding an htmlError property so that we can output HTML safely in the frontend.
There is still an active TODO with the naming of the config key, but we will resolve this after merging admin into the monorepo.
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
no issue
- bumped dependency
- fixed all new lint failures
- removed deprecated `ember-cli-eslint`
- it was tying us to an old version of `eslint` resulting in missing rule definition errors when linting was run as part of `yarn dev` and `ember test`
- we run linting separately in CI so we don't need linting to run _again_ on each of our ember test runs
no issue
- The `adminKey.secret` property is already in the correct format of `admiKey.Id:adminKey.secret` so we were returning the id twice as query param
- Minor style adjustments for Explore
closes https://github.com/TryGhost/Ghost/issues/12214
- previously, when navigating back from the members page with the impersonate modal open, opening a new member showed the impersonate modal.
- Following styling from email events
- Includes other tweaks to bring consistency
- Added in text truncating for member activity page
refs https://github.com/TryGhost/Team/issues/1731
no issue
- followed the migration guide to switch to from lifecycle hooks to single `modify()` method
- https://togithub.com/ember-modifier/ember-modifier/blob/master/MIGRATIONS.md
- forced resolution of `ember-in-viewport@4.0.2` to avoid older version of `ember-modifier` being pulled in through `ember-infinity`
refs https://github.com/TryGhost/Team/issues/1731
- Includes the post title and url in the activity feed
- For now only implemented on the member page (not yet in remaining 2 activity feeds)
- No styling added
no issue
- the Koenig in-repo-addon's package.json didn't include `ember-keyboard` and with the recent `ember-auto-import` upgrade it wasn't being picked up correctly
- adding the dependency line fixed things
requires https://github.com/TryGhost/Ghost/pull/15128
refs https://github.com/TryGhost/Admin/pull/2252
- bumped `ember-auto-import` dependency
- updated `autoImport` config to match new format
- added dependencies for node packages that no longer have built-in polyfills in webpack@5
- updated `asset-delivery` to work with `ember-auto-import@2`
- reverted to standard ember `index.html` to let `ember-auto-import` handle it's insertion of multiple JS chunk files
- updated the `asset-delivery` addon to copy the the `index.html` and `/assets` to `core/built/admin/{development|production}/` directory rather than splitting the `index.html` file apart from the assets inside Ghost's directory structure
- switched to relative root URL in development/production
- required because assets are served from the same directory the index file is served from in Ghost rather than from the root
- Admin uses `/#/` URLs so it can be served from any subdirectory without requiring prior knowledge of that directory at build time
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
refs a4a4136c2f (commitcomment-79676720)
- `ember-auto-import` does the right thing automatically so manual `app.import` is not necessary and avoids potential pitfalls with multiple copies of react being bundled
- added the `window.*` global attachments after importing so that our async loaded UMD components have access to our bundled React and ReactDOM instances
- Fixes the horizontal overflow caused my longer warning/error messages. This means the <pre> tag is sized to fit the container and can now be scrolled and read in its entirety.
- Adds some top margin so these errors are not so bunched up to the text & input.
fixes: https://github.com/TryGhost/Ghost/issues/12219
- the WYSIWYG editor supports ^2^ for superscript and ~2~ for subscript
- with this change, the same syntax is supported in the markdown card, which was missing
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
no issue
- Added `/explore` route which requires min. Admin and is behind a feature flag
- Fetches Admin API key and ID to create a token and return back to Ghost Explore with the correct query params
- Fullscreen UI
no issue
- switched from needing to extend from `ReactComponent` to using a `{{react-render}}` modifier
- modifiers are modern idiomatic Ember for handing "did-insert" hooks and associated lifecycle
- moved code from `<ReactMobiledocEditor>` into `<KoenigReactEditor>`
- no need for the extra layering of components and need to remember two places to modify when adding passthrough args/props
no issue
- `react-editor` controller has much of the same code as the normal editor controller but not all of the editor-instance methods are supported in the react editor yet
- commented out the remaining `.cleanup()` calls that are intended to remove empty cards because the method does not exist and was throwing errors when leaving the react-editor route
no issue
- use the `didCreateEditor` hook to register the editor instance as we do with our Ember version of Koenig
- allows for initial handling of focus control for moving cursor between title and body inputs
- disabled card cleanup call because the react editor does not yet have cards or the custom `cleanup()` method
no issue
- switched to using the `window.ReactDOM` instance that is created when importing the react/react-dom libraries
- React stores state/component references inside of the ReactDOM instance when rendering so we need to make sure all renders use the same instance otherwise it loses track of which component a hook belongs to
- cleaned up unnecessary vendor shims and `prop-types` import
- `react` and `react-dom` vendor shims are unused when using the globals instead of imports
- `prop-types` import+shim is not required as it's part of the `@tryghost/koenig-react` build unlike the earlier direct import of `react-mobiledoc-editor`