no issue
- production sourcemaps are needed to have reasonably readable stack traces in error reporting
- will be excluded from Ghost release zips by `.npmignore` rules
no issue
- due to various levels of sub-dependency support across our postcss dependencies we'd ended up with three different versions of postcss installed (6, 7, and 8)
- pinned our dependencies to versions that all use postcss@^7
- we can't upgrade to postcss@8 because we make heavy use of `color-mod` which is no longer in the CSS spec and so the dependency providing it has not been updated
- switched from `postcss-easy-import` to `postcss-import` to drop the postcss@6 sub dependency (we weren't using any of the features that postcss-easy-import added over postcss-import)
- initial tests show CSS compilation times to have roughly halved
- disabled renovate for css dependencies to reduce noise for updates we can't merge
refs https://github.com/TryGhost/Ghost-Admin/pull/1701
- swap `ember-cli-uglify` for `ember-cli-terser` to match ember-cli 3.21.1's generated package.json
- swap `broccoli-uglify-sourcemap` for `broccoli-terser-sourcemap` used manually in our production builds to keep dependencies the same across custom and built-in build artefacts
refs https://github.com/TryGhost/Ghost-Admin/pull/1701
- swap `ember-cli-uglify` for `ember-cli-terser` to match ember-cli 3.21.1's generated package.json
- swap `broccoli-uglify-sourcemap` for `broccoli-terser-sourcemap` used manually in our production builds to keep dependencies the same across custom and built-in build artefacts
no issue
- some styles such as `border: none` inside `.gh-btn-white` were being stripped when ran through `clean-css` leading to visual differences between development and production
- disabled `ember-cli`'s default CSS minification as we already use `cssnano` for minification in our postcss pipeline for both dev and prod builds
no issue
- enables `prefixIds` svgo option to guarantee all `id` attributes are unique across svgs
- disabled `cleanupIds` option so that it doesn't interfere with id uniqueness
- fixes instagram icon background not showing
closes https://github.com/TryGhost/Ghost/issues/10135
- `focusOut` events are fired before the `click` event is fired when clicking buttons whilst an input has focus, this has the effect of triggering our on-blur validations that can cause UI to jump which then results in the `mouseUp` being outside of the button which means no `click` event is fired
- stops `mouseDown` event from bubbling from modal cancel/close buttons so that `focusOut` validations aren't triggered
no issue
- Travis runs all `script` tasks even if an earlier one fails so moved to using `&&` so ember tests aren't run if linting errors
- Added `ember-cli-eslint` to the addons blacklist when building in Travis so that we aren't running linting twice (also reduces build log output)
no issue
- the polyfill is no longer required for latest browsers (tested on Chrome, FF, and Safari)
- Edge may have problems but it's not currently supported
- reduces build size. Before/after:
- `vendor.min.js: 3.29 MB (706 KB gzipped)`
- `vendor.min.js: 3.2 MB (672.92 KB gzipped)`
no issue
- use broccoli-funnel to avoid polluting the `dist/` dir with unused build artefacts
- load codemirror and simplemde CSS up-front to avoid duplicate styles and specificity problems
- pull simplemde dependency out into a separate JS file and lazy-load in `{{gh-simplemde}}` component to reduce main bundle size. Before/after:
- `vendor.min.js 3.58 MB (795.88 KB gzipped)`
- `vendor.min.js 3.32 MB (710.66 KB gzipped)`
refs https://github.com/TryGhost/Ghost/issues/9623
- switch to custom `mobiledoc-kit` build
- fixes top-level elements not being run through parser plugins (https://github.com/bustle/mobiledoc-kit/pull/627)
- fixes <kbd>Alt</kbd> getting stuck and causing <kbd>Backspace</kbd> to delete whole words (https://github.com/bustle/mobiledoc-kit/pull/626)
- fixes error that can occur when a paste results in blank insert (https://github.com/bustle/mobiledoc-kit/pull/620)
- add new `figureToImageCard` parser
- replaces hacky workaround to detect an image+figcaption inside the `imgToCard` parser plugin
- remove wrapping of html in a `<div>...</div>` when pasting
- no longer necessary now that top-level elements are parsed
- fixes rich-text pastes where multiple paragraphs would be collapsed into a single paragraph
refs https://github.com/TryGhost/Ghost/issues/9623
- wrap all embeds in an `<iframe>` so that their scripts are isolated (fixes FB Video)
- add `MutationObserver` implementation to adjust iframe height as embed's content is loaded
- add `noframe.js` to resize embedded iframes such as YouTube videos
no issue
- doing so causes a double pass through asset-rewrite and forces both to take much longer. This cuts 3s off of rebuilds. Using asset-rewrite as is done in dev mode is also suspicious, likely a better setup could be devised that doesnt require rewrite to interop with the local ghost server
no issue
- Convert validator to an npm dependency
- clean up validator imports
- fix validator function imports
- remove unused validator extensions
- Convert devicejs to an npm dependency
- Convert remaining used bower deps to npm deps
- 🔥 Remove bower & unused bower dependencies
- remove globals imports in favor of direct module imports where possible
no issue
- https://github.com/TryGhost/Ghost-Admin/pull/970 worked for the general public icons but failed for koenig icons because of the incorrect config parameter name (`paths` -> `sourceDirs`)
- disabled the `stripPath` config so that there's no conflicts between public (`icon`) and koenig (`koenig/icon`) icons
no issue
- copy Spirit styles over (eventually these will live in an addon)
- update `ember-cli-build` to output a separate CSS file for Spirit
- update `asset-delivery` addon to output Spirit CSS link
- add `{{kg-style}}` helper for Spirit class names
- update `{{koenig-card}}` and the `{{koenig-card-markdown/html}}` components to use Spirit class names and markup
- replace markdown icon with new version from Spirit
refs https://github.com/TryGhost/Ghost/issues/9311
- use the `{{inline-svg}}` helper instead of having SVGs inlined manually in the component template
- rename the koenig icons directory
- add the koenig icons directory to the list of locations used by `{{inline-svg}}`
requires https://github.com/TryGhost/Ghost/pull/9277
- added a `koenigEditor` feature flag
- modified the feature service to accept a `developer` boolean on the options object passed into the internal `feature` method, if `true` the feature flag won't be enabled unless the `enableDeveloperExperiments` config option is also enabled
- added "developer feature testing" section in labs that's only visible if `enableDeveloperExperiments` config flag is enabled
- added koenig editor toggle to the developer section in labs
- enabled a switch between the markdown and koenig editors
- modified the default value of the `mobiledoc` attr in the Post model to be a blank mobiledoc or blank markdown mobiledoc depending on the feature flag
- modified the `autofocus` switch in editor controller's `setPost` method so that it is always switched, even for new->edit where the post model isn't swapped
- added a compatibility check to the editor controller's `setPost` method that shows an alert and force enables the koenig editor if the koenig flag is not enabled and the opened post is not compatible with the markdown editor
- fixed various issues that have appeared due to the old koenig alpha becoming out of sync with master
closes https://github.com/TryGhost/Ghost/issues/6458
- swap `ember-sortable` for `ember-drag-drop` in navigation UI
- extract PSM tag input into new `{{gh-psm-tags-input}}`
- add new `{{gh-token-input}}` that wraps `ember-power-select` and `ember-drag-drop` to replicate the previous selectize based tags input
- enhance `{{gh-psm-tags-input}}` behaviour to highlight selected primary tag and show "primary/internal" in selected tag titles
- 🔥 remove `selectize`
- 🔥 remove `jquery-ui`
- 🔥 remove unused `{{gh-navigation}}` component
no issue
- ember/ember-data/ember-cli@2.16
- bump all outdated dependencies that do not require additional work or more extensive tests
- bump sub-dependencies in yarn.lock
- use `broccoli-uglify-sourcemap` (same dep as already used in `ember-cli-uglify`) instead of a separate `broccoli-uglify-js` package for building production codemirror assets
- add `/concat-stats-for` to `.gitignore` so that filesize stats from `CONCAT_STATS=true ember build` don't end up in the repo
closes https://github.com/TryGhost/Ghost/issues/8504
- allow `.settings-code-editor` to inherit from `.gh-input` - fixes border colours
- change `gh-cm-editor`'s "focused" class from `.focused` to `.focus` so it can inherit `.gh-input` styles
- add lazy loading of CM styles back in `gh-cm-editor` but prevent `lib/codemirror.css` from being compiled into the codemirror styles so that we get the theme colours without causing conflicts with the main editor
no issue
* fix title input padding and placeholder weight
* 🔥 remove unused showdown-ghost dependency
* implement full screen mode via CSS rather than autonav toggle
* implement custom split pane editor preview
- replace SimpleMDE's split pane handling with our own so that we have more control over the element positioning, toggling of our custom fullscreen code, and so that the preview pane can be scrolled separately as per our old editor
* use forked version of simplemde that has the latest CodeMirror compiled
- SimpleMDE hasn't been updated for 11 months and the version of CodeMirror is baked into the SimpleMDE code, to get an up to date version I've forked and re-compiled
- pull in the unminified SimpleMDE source so that it's easier to debug in development, our asset compilation steps will take care of minifying it for production
* fix gh-markdown-editor teardown
no issue
* move "save on first change" behaviour into editor controller
* allow TAB events to be specified in keyEvents hash of gh-input
* replace mobiledoc-kit/gh-koenig with a SimpleMDE based editor
- remove `gh-koenig` in-repo-addon from `package.json` so that test files etc aren't loaded
- remove `mobiledoc-kit` dependencies
- extends `gh-editor` to handle file drag/drop
- adds `gh-uploader` and `gh-progress-bar` components to handle file uploads in a more composable manner
- adds `gh-simplemde` component that wraps SimpleMDE
refs https://github.com/TryGhost/Ghost/issues/7515
- add a `retry` icon that better matches button text dimensions
- add a spin animation for the retry icon
- use the new retry icon in the default `gh-task-button` template
- add a "restart animation" method to `gh-task-button` so that repeated clicks on a button appear to register the action when local validation means that there's no transition from failed->running->failed
no issue
- preparation for using `ember-pikaday` that utilizes `ember-cli-moment-shim`
- removes usage of `moment` global
- removes custom imports of `moment` and `moment-timezone` libraries
closes https://github.com/TryGhost/Ghost/issues/8270
- add `.jpeg` to the list of asset extensions that get fingerprinted
- remove the use of the `{{gh-path "asset" ...}}` helper - since switching to hash-location URLs all assets can now be referenced relatively and removing usage of the helper prevents it getting in the way of ember-cli's asset fingerprinting/rewriting mechanism
closes https://github.com/TryGhost/Ghost/issues/8213
- quick-fix by not adding the `.min` to the production `ghost-dark.css` file, the asset rename breaks the asset rewriting resulting in the lazy loader attempting to load a non-fingerprinted file
* deps: ember-cli-node-assets@0.2.2
* fix tests when run via http://localhost:4200/tests
no issue
- `blogUrl` in the mocked config was hardcoded, switching to using the current origin fixed the navigation tests
- we were only pulling jquery drag simulator library in on test builds but we also need it added to `test-support.js` in development builds
- lazy loading is disabled in the test env which previously worked fine as all of the codemirror assets are bundled into the test build, now that we also run tests using the development build we needed to update the config to import codemirror assets into the `test-support.js` file - this ensures that we have normal lazy-loading behaviour when developing locally and that accessing via http://localhost:4200/tests doesn't die horribly due to missing dependencies
refs #8140🎨 remove usage of ghost's {{asset}} helper in built index.html files
requires https://github.com/TryGhost/Ghost/pull/8142
- switch to hash-location rather than history-location
- remove usage of Ghost's `{{asset}}` helper in index.html
- add `content-for` helpers to `asset-delivery` addon that switch asset urls in index.html to `.min` files in production
- update the `asset-delivery` addon to copy the production `index.min.html` to `default-prod.hbs` so Ghost can serve production assets when in production mode
- change template output path to `core/server/admin/views/`
- enable asset fingerprinting
- remove `ember-cli-sri` dependency - we weren't using it but now that ember is handling assets it was used automatically and could potentially create issues if users have proxy servers that attempt to compress or otherwise modify asset files
✨ redirect to setup if server says setup isn't finished
refs https://github.com/TryGhost/Ghost/issues/8140
- now we're using hash-location the server no longer knows if we're hitting the /setup route so it's not able to redirect for us
- extends the default ESA `UnauthenticatedRouteMixin` to add a check against the `/authentication/setup` API endpoint and redirects to `/#/setup/one` if setup isn't complete - this works for all routes because the default behaviour when hitting an authenticated route without the right credentials is to force a logout and redirect to `/#/signin` which utilises the `UnauthenticatedRouteMixin`
deps: ember-cli-inject-live-reload@1.6.1
no issue
- `broccoli-clean-css` is used to compress codemirror CSS files so it's still needed
- update usage in `ember-cli-build.js` to match 2.0's class interface
no issue
- this prevents the need for running `npm/yarn install` inside the `lib/gh-koenig` directory
- `ember-cli` may eventually be able to handle this with an `ember install` or similar command, there's [an in-repo-addon RFC](638cad2405/active/0000-better-in-repo-addons.md) suggesting this improvement but it hasn't got much traction yet - it may be necessary to wait until ember-cli has standardised on `yarn`
no issue
- adds [ember-inline-svg](https://github.com/minutebase/ember-inline-svg) addon
- configure svg path to `public/assets/icons` so that icons can be accessed directly, eg `{{inline-svg "plane.svg"}}`
- configure svg optimization to remove title, dimensions, and xmlns element (not needed for inline svg)
- add existing icons as used on Ghost.org