Commit Graph

3694 Commits

Author SHA1 Message Date
Kevin Ansfield
eeedc2f1dc Refactor new->edit transition to avoid editor re-renders (#949)
closes TryGhost/Ghost#8287
closes TryGhost/Ghost#8750
- moved all editor model functionality into the new `editor` route+controller
- moved editor template from `editor/edit.hbs` to `editor.hbs`
- refactored `editor` controller and the `editor.new`/`editor.edit` routes to work with a persistent editor rather than a teardown/re-render when transitioning from new->edit
- fixed issue in `{{gh-markdown-editor}}` for `autofocus` behaviour when the component isn't re-rendered
- fixed issue in `{{gh-simplemde}}` that was causing multiple updates to the `value` property when a new value is passed in to the component
- added `{{gh-scheduled-post-countdown}}` component to lower the noise in the editor controller
- removed editor route/controller mixins
- removed the `editor.edit` and `editor.new` controllers
2018-01-17 13:27:37 +00:00
kirrg001
a12b2809ee Version bump to 1.20.1 2018-01-16 14:36:25 +01:00
Kevin Ansfield
bf599cef74 🐛 Fixed 'c' and 'k' chars not working in Unsplash search when adding tag cover
closes https://github.com/TryGhost/Ghost/issues/9147
- change the keymaster scope when the unsplash search input has focus so the route's registered shortcuts aren't accidentally triggered
2018-01-12 18:09:10 +00:00
Peter Dave Hello
421ed6f6fb Remove useless executable permission on static assets (#945)
no issue
- static assets shouldn't have the executable bit set
2018-01-12 17:20:23 +00:00
Peter Dave Hello
e52c772ec2 Optimize static PNG images losslessly via Google zopflipng (#944)
no issue
- run zopflipng across all the static public assets
2018-01-12 17:19:28 +00:00
Kevin Ansfield
7b62c03438 Handle errors thrown during app boot
closes https://github.com/TryGhost/Ghost/issues/9394
- add `application-error.hbs` template so that we show an error screen for errors during app boot
- track the application route loading state so that we can fall back to the default error handling for errors that usually only show an alert
2018-01-12 16:11:46 +00:00
Kevin Ansfield
08630c5913 Bump dependencies (#947)
no issue
- bump all deps with non-breaking changes
- bump yarn.lock sub-dependencies
- add `eslint` as a top-level dependency to satisfy peerDeps and fix linting when using Atom
2018-01-12 13:13:24 +00:00
Kevin Ansfield
48e3bf003d ESLint: Consistent ember property/method ordering
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-components.md
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-controllers.md
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-routes.md
2018-01-12 12:17:56 +00:00
Kevin Ansfield
f2da8a20b8 ESLint: Don't use observers if possible
closes https://github.com/TryGhost/Ghost/issues/8690
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-observers.md
- remove observers where possible
- move night shift toggle behaviour to the feature service
	- refresh feature service after import to fix stuck night shift toggle
2018-01-12 12:17:56 +00:00
Kevin Ansfield
b6ae61c22f ESLint: Be explicit with Ember Data attribute types
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-empty-attrs.md
2018-01-12 12:17:56 +00:00
Kevin Ansfield
fda94fedab ESLint: Alias model in controllers
no issue
- https://github.com/ember-cli/eslint-plugin-ember/blob/HEAD/docs/rules/alias-model-in-controller.md
- replace `model` with a meaningful property name everywhere possible
- refactor `design` and `general` settings controllers to use a directly injected settings service rather than passing it in as a "model" to be more explicit
2018-01-12 12:17:56 +00:00
Kevin Ansfield
7b4d1af3c8 Remove unused "copy-html" modal component 2018-01-12 12:17:56 +00:00
Kevin Ansfield
a85f5fae35 Switch to eslint-plugin-ghost extending plugin:ghost/ember
no issue
- fix lint errors in lib/gh-koenig
- fix ghost:base eslint errors
- update ember plugin refs, remove ember-suave plugin refs
- remove old jshint refs
- add `lint:js` script
- switch to `eslint-plugin-ghost` extending `plugin:ghost/ember`
2018-01-12 12:17:56 +00:00
Kevin Ansfield
832fd8bba3 🎨 Highlight non-breaking spaces as special chars in the editor
closes https://github.com/TryGhost/Ghost/issues/9384
- add non-breaking space char to CodeMirror's default "specialChars" regex so that they are visible in the editor
2018-01-11 09:20:25 +00:00
kirrg001
7970640667 Version bump to 1.20.0 2018-01-09 21:42:08 +01:00
Kevin Ansfield
a5eeb1865b 🎨 Move "Update available" notification to the About screen (#894)
refs https://github.com/TryGhost/Ghost/issues/5071

Upgrade messages are now shown on the About screen rather than as alerts. Notifications that are marked as `top` or `custom` are still shown as alerts to allow for certain upgrade messages to be given more visibility.

- remove old `upgrade-notification` service
- update the `upgrade-status` service:
  - add a `message` property that contains an upgrade notification if any exists
  - add a `handleUpgradeNotification` method that accepts a Notification model instance and extracts the `notification.message` property into a html safe string for use in templates
- when loading server notifications during app boot, pass notifications that aren't marked as `top` or `custom` to the new `handleUpgradeNotification` method
- update the `about.hbs` template to pull the upgrade message from the `upgradeStatus` service
2018-01-09 14:23:36 +00:00
juan-g
9fcaa3a5ed Theme translations and blog localisation (#703)
refs #5345, refs #3801, refs https://github.com/TryGhost/Ghost/pull/8437

- added language option to General Settings
- just a text field for flexibility, to allow any language (validation will be added later)
- default language is: English (en)
- added i18n docs link under the input field

**Documentation can be found at https://themes.ghost.org/v1.20.0/docs/i18n.**
2018-01-09 14:55:28 +01:00
Kevin Ansfield
12fb9504ae Added Zapier app with pre-built zap templates list (#943)
no issue

- add Zapier app to Apps screen
- use Zapier's zap template embed widget to list our pre-built templates
2018-01-09 11:36:41 +01:00
Kevin Ansfield
bde0b9768e Fix linting error 2018-01-08 19:30:16 +00:00
Kevin Ansfield
eef41d2cd7 🐛 Fixed editor cursor position on iOS when opening keyboard
closes https://github.com/TryGhost/Ghost/issues/9379
- detect iOS devices and start a requestAnimationFrame loop when inserting the markdown editor that watches `body.scrollTop` and translates the scroll that iOS applies to the body to the editor instead so that we keep the cursor on screen without the disconnected cursor proplems
2018-01-08 19:10:29 +00:00
Kevin Ansfield
f65b07c589 Fixed horizontal scroll in editor on iOS 2018-01-08 18:32:25 +00:00
Kevin Ansfield
99576c2da3 🐛 Fixed missing cursor and selection issues using editor on iOS
closes https://github.com/TryGhost/Ghost/issues/9378
- only disable element selection on the codemirror content on desktop
2018-01-08 17:02:04 +00:00
Abijeet Patro
57c20d5aae Prevent "Invalid URL" errors due to trailing spaces when editing Slack Webhook URL (#925)
no issue
- trim the slack URL in the `updateURL` action
2018-01-08 10:31:53 +00:00
Kevin Ansfield
cc33fa899d 🐛 Fixed navigation url inputs when configured URL has special characters (#941)
closes https://github.com/TryGhost/Ghost/issues/9373

- using an `<a>` element to parse a URL does not behave as expected when the URL has special characters because the `host` attribute will show the Puny URL version. Eg. `exämple.com` will become `xn--exmple-cua.com`
- `{{gh-navitem-url-input}}` was failing to manipulate the URL value because of the difference between the Puny URL encoded URL and the raw configured URL with unicode chars
- uses the `URI` module that's bundled with the imported version of `google-caja` to parse the URL via regexes rather than relying on native browser parsing
2018-01-07 12:14:24 +01:00
tamura shingo
85d4759044 🐛 Fixed Japanese IME popup position in editor (#940)
closes TryGhost/Ghost#9289
- add css to fix hidden textarea position
2018-01-05 13:37:03 +00:00
Kevin Ansfield
7469b7263f 🐛 Fixed list editing regression in 1.19.2
closes https://github.com/TryGhost/Ghost/issues/9372
- bump codemirror dependency to 5.33.0
- bump simplemde dependency
	- bumps internal codemirror to 5.33.0
	- moves all dependencies to devDependencies
2018-01-05 11:48:12 +00:00
Kevin Ansfield
a27052bdb6 Bump dependencies (#939)
no issue
- upgrade all dependencies with non-breaking changes
- bump sub-dependencies in yarn.lock
2018-01-04 14:18:32 +00:00
Aileen Nowak
b6bea4e7f9 Version bump to 1.19.2 2018-01-04 17:21:55 +07:00
Kevin Ansfield
a2b924b06e Skip tests that touch vertical-collection to fix random Travis failures (#938)
refs https://github.com/TryGhost/Ghost/issues/8805
- `{{vertical-collection}}` causes async issues and random failures in our tests
- we can't upgrade to the latest version which includes a test wait helper because it's buggy in Firefox
- skip the tests for now
2018-01-03 17:14:12 +00:00
Kevin Ansfield
a27887474e fix power-select import deprecations 2018-01-03 15:02:38 +00:00
Kevin Ansfield
33a8c945af Version bump to 1.19.1 2018-01-03 14:39:59 +00:00
Kevin Ansfield
dbd1edb7d3 Revert ember-cli to 2.16.2
no issue
- there's a [bug in ember-cli@2.17](https://github.com/ember-cli/ember-cli/issues/7518) that results in production builds throwing an error: `Uncaught Error: Could not find module 'ember-resolver' imported from 'ghost-admin/resolver'`
2018-01-03 14:37:28 +00:00
Kevin Ansfield
191300de74 🐛 Fixed missing error message for unexpected errors during import (#936)
no issue
- show an error message when a non-Ghost error is received, eg. when a proxy server times out due to a large import
2018-01-03 12:30:42 +00:00
John O'Nolan
e7be0075d8 2018 2018-01-02 21:46:16 +00:00
Kevin Ansfield
2d8b3039d1 🎨 Improved code injection loading behaviour on slow connections (#935)
closes https://github.com/TryGhost/Ghost/issues/9249
- in `{{gh-cm-editor}}` display a standard textarea in place of the CodeMirror editor whilst CodeMirror assets are loading in the background, textarea will be upgraded to a CodeMirror editor when loading finishes
- update styles so that the switch from plain textarea to CodeMirror is not too jarring
2018-01-02 18:29:03 +00:00
Peter Zimon
5ad75b76ff Fixed icon upload button hover state on General Settings screen (#934)
no issue
2018-01-02 16:32:26 +00:00
Kevin Ansfield
c885b960b6 Prevent double text selection in the editor
closes https://github.com/TryGhost/Ghost/issues/9356
- it was possible to start a selection from outside of CodeMirror's control, this was confusing because text appeared to be selected but wasn't
- disable user selection on the outermost CodeMirror wrapper so that the selection behaves as it does with a normal textarea where the selection needs to start from inside the content area
2018-01-02 14:53:35 +00:00
Kevin Ansfield
bdab644ad5 🐛 Fixed inability to create multi-word tags via post settings menu
closes https://github.com/TryGhost/Ghost/issues/9357
- detect space key being pressed and ignore in the token input's custom `selectOrCreate` action
2018-01-02 13:54:26 +00:00
Martín González
e64dc48d54 Improve users table mobile style (#908)
refs https://github.com/TryGhost/Ghost/issues/8744
- reduce padding
- avoid wrapping user badges
2018-01-02 11:35:24 +00:00
Kevin Ansfield
8072d75401 Fixed some Night Shift colours in the post settings menu
closes https://github.com/TryGhost/Ghost/issues/9244
- adjust weekday and current day text colours in the calendar popup to improve legibility
- match the new tags input colours to the other form inputs
2018-01-02 11:29:23 +00:00
Steven Cochrane
30ba178861 🐛 Fixed unexpected publishing of post via split-preview shortcut (Publish shortcut is now Ctrl/Cmd+Shift+P) (#924)
closes https://github.com/TryGhost/Ghost/issues/9296

If a user is trying to use the split screen preview shortcut in the admin client (`CTRL+ALT+P` for all platforms), this also calls the publish shortcut when using windows or linux. 

- change the publish shortcut to `${ctrlOrCmd}+shift+p`
2018-01-02 11:04:08 +00:00
Kevin Ansfield
4679302303 Don't destructure Ember.testing (#933)
no issue
- `Ember.testing` is or will soon be a getter/setter in Ember with the value set during a test, however destructuring will read the value when the module is evaluated
- moves all uses of `Ember.testing` inline
2018-01-02 10:19:59 +00:00
Tobias Bieniek
af1aa2fabf Update ember-simple-auth to v1.4.2 (#932)
no issue
- updates `ember-simple-auth` to v1.4.2 to take advantage of the bug fix in https://github.com/simplabs/ember-simple-auth/pull/1477
- enables/unblocks https://github.com/TryGhost/Ghost-Admin/pull/922
2017-12-27 16:19:48 +00:00
Kevin Ansfield
b5c4a17aad Bump dependencies (#929)
no issue
- upgrade all dependencies with non breaking changes
- bump sub-dependencies in yarn.lock
2017-12-13 12:27:15 +00:00
kirrg001
e3e57825bd Version bump to 1.19.0 2017-12-13 10:15:23 +01:00
Katharina Irrgang
3bba0a4eea Revert "Bump dependencies (#927)" (#928)
This reverts commit c00232ca92.
2017-12-13 10:10:46 +01:00
Kevin Ansfield
78c34830cd Trigger a background download request when Unsplash images are inserted
no issue
- update to match Unsplash's new API guidelines https://medium.com/unsplash/unsplash-api-guidelines-triggering-a-download-c39b24e99e02
2017-12-12 17:22:59 +00:00
Kevin Ansfield
c00232ca92 Bump dependencies (#927)
no issue
- upgrade all dependencies with non breaking changes
- bump sub-dependencies in yarn.lock
2017-12-12 14:00:35 +00:00
Kevin Ansfield
14f03a14a8 🐛 Fixed editor and drag/drop image uploads in IE11 (#926)
closes https://github.com/TryGhost/Ghost/issues/9321
- don't use `dataTransfer.effectAllowed` in IE11
- only fire the action in `{{gh-file-input}}` if there are files selected to prevent a double call to the action due to resetting the input
2017-12-12 11:53:35 +00:00
Aileen Nowak
97ffb63203 Version bump to 1.18.4 2017-12-07 19:30:00 +07:00