no issue
- Added a language indicator when in rendered mode and a language input when in edit mode
- Allow code card language to be set with <code>```lang</code>+<kbd>Space/Enter</kbd> expansion
- previously <code>\`\`\`</code> would immediately create a code card, the <kbd>Space/Enter</kbd> is now necessary for the insertion to occur
- lang is optional <code>\`\`\`</code>+<kbd>Space/Enter</kbd> will insert a code card with no language selected
- requires <kbd>Enter</kbd> to be pressed to finalise the expansion and insert the card
- added hook for text expansions to skip newline creation for when they are triggered with <kbd>Enter</kbd>
- Set the code card editor's language mode based on selected language
- set the CodeMirror mode based on the code card payload language
- add a basic map of language short codes to their respective CodeMirror modes
- observe `mode` property in `{{gh-cm-editor}}` so that the mode is properly set when it's changed after initial render
Over in:
* https://github.com/whatwg/html/issues/3840
* https://bugzilla.mozilla.org/show_bug.cgi?id=1281135
I'm trying to come up with a model for `<link rel="stylesheet" disabled>` in
which Blink / WebKit and Firefox can agree on.
See that HTML spec issue for all the inconsistencies of WebKit / Blink, and the
following post for more context:
* https://groups.google.com/d/msg/mozilla.dev.platform/BdgNaChHnpY/mhXzCBwSCgAJ
---
Unfortunately, my change to Firefox breaks the Ghost Admin panel night-mode
switch (you can see it in Firefox Nightly).
This is because with my change, removing the `disabled` attribute from an
stylesheet behaves the same regardless of whether the `disabled` attribute is
added dynamically or not.
That means that adding the `disabled` attribute dynamically "unloads" the
stylesheet completely (just like when the attribute is there before inserting
the link in the document, or from the parser). Thus removing the attribute will
load the stylesheet again and fire a load event.
This is problematic for the code as-is, because it means that each time that the
load event fires when the disabled attribute is removed on an alternate, then
it's added again. :)
Prevent that from happening by removing the load event listener ASAP. What this
code wants is to only resolve the promise once after all.
Given this is so far the only regression from my change that has been reported
(over at https://bugzilla.mozilla.org/show_bug.cgi?id=1546707), I think fixing
the Ghost-Admin panel is worth it.
If this pattern is somehow common, then we'll probably revert that patch and go
back to the sad current state of affairs regarding interop :(
no issue
- fixed "Active with errors" button successful theme upload with no warnings/errors
- fixed fatal errors not showing due to change in API error response
- fixed "Retry" button not showing when there were fatal errors
- fixed "Upload successful!" message after clicking "Retry" on a failed upload
closes https://github.com/TryGhost/Ghost/issues/9494, refs https://github.com/TryGhost/Ghost/issues/10365
- removed `overflow-y: auto` on posts list to fix the vertical scrolling
- added `overflow-wrap: break-word` so that post previews are forced to wrap for long words such as URLs
- added `-webkit-overflow-scrolling: touch` to the main scrollable pane so that iOS Safari uses momentum scrolling
no issue
- the API response for theme activation when a fatal validation error occurred has changed but the client wasn't updated resulting in a modal containing an "Activation failed" header but no details
- updates the error details extraction path and adjusts the tests to match the real API response
closes https://github.com/TryGhost/Ghost/issues/10658
- update publish menu states to use `{{post.displayName}}` instead of hard coded `post`
- update settings menu image uploader to generate CTA using `post.displayName`
no issue
- the new version of our Zapier App uses API Key auth so we need to expose the details on the Zapier integration screen
- extracted `copyTextToClipboard` into a util function
- added `integrationModelHook` method to `settings.integrations` controller to remove duplication in the `settings.integration` and `settings.integration.zapier` routes
- fixed missing "Zapier" title token
no issue
The server never supported uploading .yml files
* updated uploader `invalid extension` error message to be more abstract
* fixed routes uploader validation allowing .yml files
closes https://github.com/TryGhost/Ghost/issues/10629
- the error was occurring due to `session.user` CP being populated with a rejected promise when attempting to access the first route. The CP has no dependent key so any further attempts to access `session.user` would be rejected
- marking the CP as "changed" immediately after logging in means that the next request will create a new promise and successfully fetch the user
no issue
- `notifications.displayDelayed()` resets the `delayedNotifications` array but it wasn't using `.set()` which was throwing an Ember error because it wouldn't be tracked
closes https://github.com/TryGhost/Ghost/issues/10627
- removed confusing/unnecessary message when activation was successful with warnings
- do not display "Warnings" sub-heading if there are no other errors to reduce duplication with the modal title
- changed "Close" button text to "Ok" so it feels more like a confirmation
- refactored modal template to have explicit `this` rather than implicit property lookup ([RFC](e724c7087e/text/0308-deprecate-property-lookup-fallback.md))
no refs.
Set blending mode to multiply on the integration icons (on Integrations screen) to remove the white background that was visible on hover and didn't fit with the background color of the table rows.
no refs.
The image in Unsplash preview in Koenig didn't fill the entire width of the viewport which caused the overlay lean off on the sides of the preview image.
no issue
- return a basic "guid" from the site's `model` hook so that we have some data which changes on each refresh
- add an action to the wrapper element of the "view site" link which will cause the route to refresh when clicked if we're already on the route
- move the site iframe into a component so that it can watch an @uuid property and force a reset of the iframe's `src` when it detects a change
no issue
- display the `context` property of any API errors so that the messages are useful
- use the same email/password that was used for the setup request in the session request to avoid issues with keys being hit after Enter
no refs.
- added "View site" as the first and default menu item in navigation bar to be able to browse the site without leaving the Admin
- rearranged left sidebar items according to new structure (moved Labs down to bottom)
- removed "View site" from publication main menu because it's become redundant
- added Night shift toggle in line with Labs menu to be able quickly access it
refs https://github.com/TryGhost/Ghost/issues/10308
- removed reliance on `run.later` (`setTimeout`) in tests, instead favouring explicit ember-test-helper methods which wait for DOM changes
refs https://github.com/TryGhost/Ghost/issues/7131
- adds `disableMouseDown` flag to `{{gh-task-button}}`
- uses flag for the send invite button so that the focus-out validation on the e-mail input is not triggered before the click event is triggered
no issue
- if a post was saved before the body content was edited you would get stuck with an "Are you sure you want to leave?" modal even though you had already saved
- the editor saw the post as being in a dirty state because the `mobiledoc` and `scratch` value were null but after saving the `mobiledoc` value was set to an blank mobiledoc object as returned by the API
- updated the `post` model save method to reset the `scratch` value if the returned `mobiledoc` no longer matches
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
- we've added an `{{author-names}}` helper, this generated a warning from `{{gh-posts-list-item}}` which contained `{{authorNames}}` referencing a CP on the component context
- changing the CP access to be explicit using `{{this.authorNames}}` resolves the warning
- updated other references in the template to be explicit in order to differentiate between local context and helpers (this will be enforced in later Ember versions)