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
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
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
closes https://github.com/TryGhost/Ghost/issues/9160
- simplified FB validation to allow any valid FB url (autocomplete of raw usernames and facebook-like URLs is still in place)
- fixed a bug with sticky Twitter validation message, if you entered an invalid URL then changed it to an invalid username you still saw the invalid URL message (surfaced through new test helpers for validating facebook/twitter fields)
no issue
- upgrade `ember-ajax` to 3.0.0
- `ember-ajax` [now passes the payload through directly](https://github.com/ember-cli/ember-ajax/releases/tag/v3.0.0) rather than trying to normalize it so all our error handling needed to be updated
closesTryGhost/Ghost#9119, refs TryGhost/Ghost#8483
- Apps - AMP
- Added `leave-settings-modal` component to Settings - Apps - AMP
- Apps - Slack
- Added `leave-settings-modal` component to Settings - Apps - Slack
- Added a `triggerDirtyState` action that will uses a new Array with the input data to trigger the dirty state on the parent settings model
- Apps - Unsplash
- Added `leave-settings-modal` component to Settings - Apps - Unsplash
- Used manual tracking of changes with using a custom `dirtyAttributes` property and a `rollbackValue` to manually rollback the `isActive` attribute on the model
- Code injection
- Added `leave-settings-modal` component to Settings - Code injection
- Design
- Added `leave-settings-modal` component to Settings - Design (only for navigation model)
- Used manual tracking of changes with using a custom `dirtyAttributes`
- Added an additional `updateLabel` action to underlying `gh-navitem` component which gets fired on the `focusOut` event, to detect changes on the label
- Team - User
- Added `leave-settings-modal` component to Team - User
- Used manual tracking of changes with using a custom `dirtyAttributes` to track changes in slug and role properties
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
refs TryGhost/Ghost#9150
- added a new validator for password validations that will take care of the rules client side
- Passwort rules added:
- Disallow obviously bad passwords: 1234567890, qwertyuiop, asdfghjkl; and asdfghjklm
- Disallow passwords that contain the words "password" or "ghost"
- Disallow passwords that match the user's email address
- Disallow passwords that match the blog domain or blog title
- Disallow passwords that include 50% or more of the same characters: 'aaaaaaaaaa', '1111111111' and 'ababababab' for example.
- When changing the own password, the old password is not affected by the new validations
- Validation are running on
- setup
- signup
- password change in Team - User (only new passwords are validated)
- passwort reset
refs TryGhost/Ghost#9150
- Increase the password length in validators for signups, pw resets, and password changes for users to 10 instead of 8
- Update tests
no issue
- `controller.content` will no longer be an alias to `controller.model`
- split relationships and `attrs` in Post model, add missing transforms
- fix unknown `error` field in payload warning when `/users/me` returns 404 during tests
- fix unsafe style binding warnings
refs https://github.com/TryGhost/Ghost/issues/9060
- add `{{gh-psm-template-select}}` component
- allows selection of a custom template for a post if the active theme has custom templates
- loads themes on render, only hitting the server if not already in the store
- disables select if post slug matches a `post-*.hbs` or `page-*.hbs` template
- adds `customTemplate` attr to `Post` model
- adds `templates` attr to `Theme` model with CPs to pull out custom vs post/page override templates
- add `.gh-select.disabled` styles to make disabled selects look visually disabled
closesTryGhost/Ghost#8483
- Added a new modal component that gets rendered when leaving general/settings after changes have been done but not saved
- Removed independent saving logic for social URL for consistent UX
no issue
We weren't being consistent in our use of Mirage's `normalizedRequestAttrs()` method which meant that in certain cases Mirage's internal database had duplicated attrs, the original set being `camelCase` and the new/updated set being `underscore_case` which was not only confusing but can lead to errors or unexpected behaviour in tests.
- updated Mirage config to always normalize where necessary
- updated tests to always use `camelCase` attrs
- added `HEAD` route handler for gravatar to avoid unknown route noise in tests
closesTryGhost/Ghost#9028
- add upload/download UI to labs screen
- displays success/failure state in the button for 5 secs after uploading
- minor refactor to remove redundant `{{#if}}` conditionals in general settings screen
- minor naming refactor of `onUploadFail` -> `onUploadFailure` for `{{gh-uploader}}`'s closure action
closes https://github.com/TryGhost/Ghost/issues/9031
- add a default value `unsplash` value to the `setting` model so that Unsplash is activated when the server doesn't return an `unsplash` setting
- update the `unsplash-settings` transform to always deserialize or serialize to `{isActive: true}` when the value is blank or not parsable
- add acceptance regression test covering API not returning an `unplash` setting
- add unit tests for the `unsplash-settings` transform
no issue
- Unsplash integration is enabled by default for all users
- it's no longer necessary to create your own Unsplash application and configure your application ID
no issue
- the upcoming Module Unification re-organisation in Ember will no longer support nested components
- this PR pre-emptively moves our usage of nested components into a flat file structure
refs https://github.com/TryGhost/Ghost/issues/8958
- Ghost OAuth isn't coming back, time for the code to disappear and simply all the things
- fixes the `Usage of router is deprecated` notices that flood the console/test logs when testing
no issue
On the apps index screen there were conditionals for each app so that active apps show "Active" instead of "Configure" when they are activated - the conditionals weren't working because the properties they check for weren't available in the template's context.
- add a new `settings/apps/index` controller that imports the `settings` service
- updates template conditionals to check for properties on the `settings` service
no issue
We've seen an issue where after an import a user record had `tour: ""` which meant they were unable to log in due to JSON parsing of the empty string failing.
- add a guard so that an empty string is transformed to `null` before parsing
- changed `serialised` to `serialized` to match spelling in all other serializers
no issue
- add eslint-plugin-ember, configure no-old-shims rule
- run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports
- further cleanup of Ember globals usage
- remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
closes https://github.com/TryGhost/Ghost/issues/8859, requires https://github.com/TryGhost/Ghost/pull/8895
- adds Unsplash app to app settings
- enable/disable toggle
- validation and testing of Unsplash App ID
- Unsplash App ID field hidden if provided via Ghost config
- adds `fetchPrivate` method to `config` service to pull config that requires authentication and updates authentication routines to fetch private config
- adds Unsplash buttons to editor toolbar and `{{gh-image-uploader}}`
- only present when Unsplash app is enabled
- opens Unsplash image selector when clicked
- `{{gh-image-uploader}}` has a new `allowUnsplash` attribute to control display of the unsplash button on a per-uploader basis
- adds Unsplash image selector (`{{gh-unsplash}}`)
- uses new `unsplash` service to handle API requests and maintain state
- search
- infinite scroll
- zoom image
- insert image
- download image
- adds `{{gh-scroll-trigger}}` that will fire an event when the component is rendered into or enters the visible screen area via scrolling
- updates `ui` service
- adds `isFullscreen` property and updates `gh-editor` so that it gets set/unset when toggling editor fullscreen mode
- adds `hasSideNav` and `isSideNavHidden` properties
- updates `media-queries` service so that it fires an event each time a breakpoint is entered/exited
- removes the need for observers in certain circumstances
no issue
- moves general UI state control such as menu display, autonav, settings menu, etc into a `ui` service for easier use within components
- no longer required to jump through hoops passing state and actions down from application controller into components
- removes indirect "route" actions in favour of calling actions/methods directly on the `ui` service
closes https://github.com/TryGhost/Ghost/issues/8203
- rename `version-mismatch-test.js` to the more generic `error-handling-test.js`
- add tests to simulate receiving HTML errors (eg, the type of error received from CloudFlare for a gateway timeout)
closesTryGhost/Ghost#8530
- Changed the wording for activation and uploading a theme to separate between error and warnings in the title and the body text for the modal
- Changed the wording of "Activated successful with warnings/errors" to "Activation successful with (warnings || errors)"
- Remove gh-tab* components
- The PSM was the only place where the `gh-tabs-manager`, `gh-tab`, and `gh-tab-pane` components were being used. These were very old components and did not work well with newer Ember versions and best practices.
- 🔥 remove `gh-tab*` components
- 💄 fix indents in `gh-post-settings-menu` template
- 🎨 add support for named subviews ready for additional PSM panes
- Added per-post code injection fields to PSM
- add "Code Injection" pane to the PSM
- implement `codeinjectionHead` and `codeinjectionFoot` attributes on `Post` model and save values from PSM
- use CodeMirror for the PSM code injection fields
refs TryGhost/Ghost#8793
- add `customExcerpt` attr to Post model + reorder attrs to be alphabetical
- add "Excerpt" field to PSM
- add validation for `customExcerpt` length (max 300 chars)
- add style adjustments for custom excerpt UI
closes https://github.com/TryGhost/Ghost/issues/8622 by inadvertent knock-on effect.
People were having trouble with automatically entering password verification in blog title field. This re-orders the form to a more "normal" flow where password field is the last item on the page, so no risk of double-typing it.
no issue
- fixes bug where multiple posts were created starting with one char and growing until the new->edit transition completed, e.g. posts with content such as `a`, `ab`, `abcd` were created in quick succession
- moves old `_savePromise` body into the `save` task
- call the `save` task instead of the old `_savePromise` so that concurrency is handled properly
- fixes odd behaviour with the "Are you sure you want to leave?" modal appearing too often - it's now aware of on-going or scheduled saves and will wait for those to complete before transitioning
- move all transition abort/save/retry handling into `toggleLeaveEditorModal` method
- check for a running save, wait for it to finish then retry the transition
- check for a scheduled autosave, cancel it if present and perform an immediate autosave then retry the transition
- don't attempt new->edit transition on successful save of new post if we're already waiting for a different transition
- once the new->edit transition has completed, if the post body content has changed schedule an autosave manually so that the user doesn't need to type something again to save what they assume is already saved
- remove debounced slug generation/save on type of title field in favour of generation and save on focus out which plays a lot nicer with the new transition autosave behaviour
closesTryGhost/Ghost#8696
- Changes the `gh-save-button` component to allow a custom `runningText` which would be rendered in the button when the current task is running.
- Adds a `runningText` CP to `gh-publishmenu` component, which will render (depending of post status and desired save type) 'Unpublishing', 'Publishing', 'Scheduling', 'Updating', 'Unpublishing', 'Rescheduling', and 'Unscheduling'.