1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

3372 commits

Author SHA1 Message Date
Kevin Ansfield
3f2e802f27 🐛 fix missing meta description preview (#719)
refs #718, refs https://github.com/TryGhost/Ghost/pull/8305

- meta description preview in the PSM was relying on the `html` field which is no longer queried - see #718 and https://github.com/TryGhost/Ghost/pull/8305
- restores live preview that was in LTS but removed whilst implementing mobiledoc because we had no quick way of rendering mobiledoc->text
- adds a boolean argument to the `formatMarkdown` util that can disable the replacement of `<script>` and `<iframe>` tags so that the inserted text isn't rendered when converting HTML to text
2017-05-30 15:07:12 +02:00
Katharina Irrgang
221ca16c67 🎨 use formats query param (#718)
refs https://github.com/TryGhost/Ghost/issues/8275
- ask Ghost for `mobiledoc` and `plaintext`
- Ghost returns `html` by default
- use plaintext for `{{subText}}` for posts overview
2017-05-30 10:15:46 +01:00
Kevin Ansfield
7eefbba69f 💄🐷 sort-imports eslint rule (#712)
no issue

- adds `eslint-plugin-sort-imports-es6-autofix` dependency
  - implements ESLint's base `sort-imports` rule but has a distinction in that `import {foo} from 'bar';` is considered `multiple` rather than `single`
  - fixes ESLint's autofix behaviour so `eslint --fix` will actually fix the sort order
- updates all unordered import rules by using `eslint --fix`

With the increased number of `import` statements since Ember+ecosystem started moving towards es6 modules I've found it frustrating at times trying to search through randomly ordered import statements. Recently I've been sorting imports manually when I've added new code or touched old code so I thought I'd add an ESLint rule to codify it.
2017-05-29 20:50:03 +02:00
Kevin Ansfield
2efd7323bc 🎨 fix code injection input styles (#715)
closes https://github.com/TryGhost/Ghost/issues/8487
- removes extraneous padding
- removes double-width border
- matches focused border colour to other inputs
2017-05-29 18:16:47 +07:00
Kevin Ansfield
ddc8aed370 Version bump to 1.0.0-alpha.21 2017-05-24 15:15:34 +01:00
Katharina Irrgang
7727610ee7 🎨 improve importer errors/warnings display (#711)
refs https://github.com/TryGhost/Ghost/issues/5422
- handles errors and warnings from returned from the server and improves visual display
- adds a reset so that errors are cleared when leaving the labs screen
- removes the unnecessary "Import failed" alert - we already show the errors on the screen, no point bugging the user even further
2017-05-24 14:36:59 +01:00
David Wolfe
fb1fb11afb Merge pull request #713 from kevinansfield/fix-post-import-errors
🐛 fix errors when navigating after successful import
2017-05-24 12:39:41 +01:00
Kevin Ansfield
86d5a6bf57 🐛 fix errors when navigating after successful import
no issue
- the synchronous settings service keeps an internal reference to the settings model, when everything in the store is unloaded during an import that reference breaks and will throw errors when accessing areas of the app that read values from it. This change adds an explicit reload of the settings model during import so that later navigation doesn't break.
2017-05-24 11:58:06 +01:00
Kevin Ansfield
b2c8db4b87 🐛 fix flickering buttons during modal transitions (#710)
no issue

- removes transition on `all` properties in favour of an explicit list, fixes the buttons flickering after the modal appears and the outline/text being visible when the modal disappears
- simplifies the liquid-fire transition so that elements being removed at slightly different times doesn't cause flickering when the modal is removed
2017-05-23 18:45:25 +02:00
Aileen Nowak
6e841064d2 🐛 Reset publish date in PSM when leaving menu (#708)
closes TryGhost/Ghost#8360
- when changing the publish time of an already scheduled post in the publish menu and leaving the menu with clicking outside of the menu, the time wouldn't reset properly and be shown in the PSM. With the usage of an `isClosing` property which is passed to the underlying `gh-publishmenu-scheduling` component, we prevent the changed time from being saved and reset it properly instead.
2017-05-23 14:30:00 +01:00
Kevin Ansfield
83081b4b1b ⬇️ revert to autoprefixer@6.7.7 (#709)
refs #706
- bumping to `autoprefixer@7.0.1` in #673 caused `cssnano` to fail on production builds
- upgrading to latest autoprefixer didn't result in any wins
- reverting to `autoprefixer@6.7.7` for now, we may need other dependencies to bump their `postcss` support before it can be upgraded
2017-05-23 19:15:30 +09:00
Kevin Ansfield
9db932ee48 streamline image uploads in settings/general (#702)
refs TryGhost/Ghost#8455

- ensure `uploadUrls` and `errors` are cleared in `gh-uploader` when new uploads are started
- yield `isUploading` in `gh-uploader` component
- replace image upload modals in settings/general with in-page uploads
2017-05-23 10:50:04 +02:00
Kevin Ansfield
263cadb1dc add tests for gh-uploader component (#701)
no issue

- filled in tests ready to start work on https://github.com/TryGhost/Ghost/issues/8455
2017-05-23 10:18:03 +02:00
Kevin Ansfield
a7323de3c4 🐛 fix disappearing nav after import (#707)
closes https://github.com/TryGhost/Ghost/issues/8307

- Ember 2.13 has a behaviour change to `store.unloadAll` where the records aren't removed until later in the runloop resulting in errors if the store is used to find records before it's completed. See https://github.com/emberjs/data/issues/4963
2017-05-23 10:17:12 +02:00
John O'Nolan
88f13b6857 Updated editor styles 🤓 (#705)
no issue
- CSS fixes for new editor 🔥
2017-05-22 17:43:54 +01:00
Katharina Irrgang
0b9db0ec1a 🐛 fix published_at is null (#704)
no issue
- add safety check to avoid crashing if a scheduled post someone has no `published_at` value
2017-05-22 17:03:04 +01:00
Aileen Nowak
371b9fd78e 🐛 Make cmd+s work for all save-buttons (#700)
closes TryGhost/Ghost#8443
- Fixes a bug where the keyboard shortcut `cmd+s` would cause a `Maximum call stack size` error and not save.
- Wherever there is a `save` button, the keyboard shortcut to save works now.
2017-05-18 11:48:37 +01:00
Kevin Ansfield
ef9381b489 add spellcheck toggle (#697)
closes https://github.com/TryGhost/Ghost/issues/8461
- adds toggle spellcheck button to the `gh-markdown-editor` toolbar
- adds custom styles to fake a spellcheck icon
- updates `simplemde` fork
  - adds `spellcheck` to the list of toolbar buttons that don't have their `active` class removed based on cursor position
  - removes bundled `marked` dependency that we no longer use
2017-05-18 19:08:50 +09:00
Kevin Ansfield
d49484ac95 auto-expanding editor title input (#699)
closes https://github.com/TryGhost/Ghost/issues/8463
- move generic text input handling into `text-input` mixin so it applies to text inputs and textareas
- adds `autoExpand` property to `gh-textarea` that accepts a selector to watch for resize changes, if the property is set then auto-expanding behaviour is triggered any time the textarea value is changed or when the selector element is resized (this prevents change in textarea width from toggling nav or split screen mode resulting in textarea content being hidden or the textarea being taller than it's contents)
- adds `ember-element-resize-detector` addon to allow watching of element resizes rather than window resizes (this was already included as a sub-dependency via `ember-light-table`->`ember-scrollable`->`ember-element-resize-detector`)
2017-05-18 17:01:30 +09:00
Aileen Nowak
c00af2554e 🎨 User profile settings page layout updates (#695)
closes TryGhost/Ghost#7134

Overhaul of the user settings page to make it more consistent with other settings panels.
The hardly readable validation for user "Full Name" is redundant as well, as the input field for it now has the same styles as the other input fields.
2017-05-17 13:24:31 +01:00
Kevin Ansfield
8066b2ef7c use image name as alt text when inserting images (#698)
closes https://github.com/TryGhost/Ghost/issues/8462
- grab image filename and remove extension before inserting it as `alt` text when uploading images
2017-05-17 20:27:27 +09:00
Kevin Ansfield
24c02acc4e 🐛 fix broken editor layout in Safari (#696)
closes https://github.com/TryGhost/Ghost/issues/8459
- use `vh` instead of `%` for editor height
2017-05-17 19:56:28 +09:00
Kevin Ansfield
fac2560bcb Fix team screen when logged in as an author (#692)
closes TryGhost/Ghost#8409

- only show current user on team screen when logged in as author
- don't show the suspended users list to authors
2017-05-16 20:32:13 +09:00
Rodney Folz
7457ffb26d 🐛 permit Facebook usernames with less than 5 chars (#632)
refs https://github.com/TryGhost/Ghost/issues/8296
- permit Facebook usernames with less than 5 chars
    - brands are allowed to have Page names with less than 5 chars (ex: facebook.com/nike)
    - current/former employees are allowed to have usernames with less than 5 chars (ex: facebook.com/zuck)
2017-05-15 19:26:34 +01:00
Kevin Ansfield
6de16a3c55 use markdown-it for markdown previews (#690)
 use markdown-it for markdown previews

no issue

- replaces SimpleMDE's default `marked` rendering with `markdown-it`
- add ember-browserify and markdown-it plugins
2017-05-15 18:51:19 +02:00
Aileen Nowak
627a71e1a4 🗜 Database soft limits (#683)
closes TryGhost/Ghost#8143

- uses new soft limits in validation:
	- post title to 255
	- meta title (post and tag) to 300
	- meta description (post and tag) to 500
2017-05-15 13:58:32 +02:00
Kevin Ansfield
fbb46dc72c 🎨 disable buttons in preview, fix preview overlap (#689)
no issue

- when entering preview mode (not split-screen preview) the toolbar buttons are now disabled. This is usually built in to SimpleMDE but that wasn't working because we've moved the location of the toolbar in the DOM
- hides the markdown editor when entering preview mode to prevent the markdown code appearing at the bottom of the preview when the markdown length is longer than the preview length
2017-05-12 10:06:56 +02:00
Kevin Ansfield
841090a6ad 🐛 fix editor image uploads in Edge (#687)
no issue

- babel's transpilation of the `for...of` loops was resulting in an error in MS Edge, dropping back to an old `for` loop fixed it
2017-05-12 10:02:33 +02:00
Kevin Ansfield
10e883b775 fix missing branch in package.json for our SimpleMDE fork 2017-05-11 14:16:31 +01:00
Kevin Ansfield
78d6f13b7d remove unused greenkeeper ignore list 2017-05-10 16:50:00 +01:00
Kevin Ansfield
ec86139662 open file dialog and upload images via editor toolbar (#685)
no issue

- adds a hidden file input to the `gh-markdown-editor` component
- when the editor image toolbar button is clicked, capture the current selection (it gets during the file upload), trigger the file dialog then when files are selected initiate the same upload+insert process as drag/drop image uploads
2017-05-10 17:16:36 +02:00
Kevin Ansfield
52522a60d5 🐛 fix visible scroll bars and disable standard preview in split-screen (#686)
no issue

- fix visible scroll bars were rendered to the right and bottom of the internal editor area in certain browser/OS configurations
- disable the preview button when in split-screen mode as it's not any use there
- exit SimpleMDE preview mode if it's active when entering split-screen mode
2017-05-10 14:36:07 +02:00
Kevin Ansfield
df354c15d3 ⬆️ bump yarn.lock sub-dependencies 2017-05-10 11:26:06 +01:00
Kevin Ansfield
16438f8c68 bump dependencies (#673)
no issue
- autoprefixer@7.0.1
- broccoli-funnel@1.2.0
- codemirror@5.25.2
- coveralls@2.13.1
- ember-cli@2.13.1
- ember-cli-babel@6.1.0
- ember-cli-chai@0.4.0
- ember-cli-code-coverage@0.3.12
- ember-cli-dependency-checker@1.4.0
- ember-cli-eslint@3.1.0
- ember-cli-htmlbars@1.3.2
- ember-cli-htmlbars-inline-precompile@0.4.2
- ember-cli-mocha@0.14.3
- ember-cli-test-loader@2.1.0
- ember-composable-helpers@2.0.1
- ember-data@2.13.1
- ember-light-table@1.8.6
- ember-native-dom-helpers@0.4.0
- ember-power-datepicker@0.3.0
- ember-power-select@1.8.2
- ember-route-action-helper@2.0.3
- ember-simple-auth@1.3.0
- ember-source@2.13.0
- ember-test-selectors@0.3.3
- fs-extra@3.0.1
- liquid-fire@0.27.3
- liquid-wormhole@2.0.5
- loader.js@4.4.0
- fix async issue in editor title placeholder test
- adds `targets.js` so that babel will only polyfill for the lowest common denominator
2017-05-09 18:15:04 -05:00
Kevin Ansfield
bed6089aaa 🔥 remove unused gh-spin-button component
closes https://github.com/TryGhost/Ghost/issues/7865
- `gh-spin-button` has been replaced with `gh-task-button`
2017-05-09 16:37:59 -05:00
Jimmy Cai
8749cb55c5 fix missing user avatars in team list (#677)
closes https://github.com/TryGhost/Ghost/issues/8389
- changed `user.image` to `user.profileImage`
2017-05-09 17:23:24 +01:00
Kevin Ansfield
a14efa9e16 Fix split screen editor (#684)
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
2017-05-08 19:15:56 +01:00
Kevin Ansfield
4b48328e6d SimpleMDE editor (#682)
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
2017-05-08 11:35:42 +01:00
Kevin Ansfield
5c36ee4b9d Editor refactors (#679)
no issue

* split key commands and text expansions into separate files for easier file searches

* basic formatting, added a few comments

* move editor title input into addon
- the editor and title are now tightly integrated so that it's possible to use up/down cursor navigation so it makes more sense to keep them together
- start of a deeper component restructure so that we don't need to leak properties/actions to parent components

* first pass at refactor of gh-koenig and koenig-title-input
- remove need for editor reference to be held outside of the `gh-koenig` component by yielding it from the component so that the integrated title element can sit inside the container's scope
- refactor `gh-koenig` to more closely match the default ember mobiledoc addon
  - fixes runloop issues by starting/ending a manual runloop
- refactored the mutation observer and event handlers in `koenig-title-input` so that we're not doing unecessary work on every render/key press
- rename CSS classes to be more specific (these may still need more separation between `.gh` and `.kg` later)
  - `.editor-holder` to `.gh-koenig-container`
  - `.surface` to `.gh-koenig-surface`

* fix tests and start testing refactor

* move gh-koenig integration tests into addon, remove empty test files

* first-pass at component template cleanup

* first pass at koenig-toolbar-button refactor
2017-05-08 10:44:02 +01:00
John O'Nolan
a2045d4883 Fix bugs with uploaded logos and images
- Added cursor events to hover state to indicate possibility of editing images by clicking on them
- Added min-width to images inside image uploader to prevent SVG images from collapsing and being invisible as a result
2017-05-07 19:07:46 +01:00
John O'Nolan
1f2019af99 Fix sizing bug where SVG logos did not display when uploaded 2017-05-07 18:14:29 +01:00
Kevin Ansfield
d70ea17796 Version bump to 1.0.0-alpha.20 2017-04-25 13:58:19 +01:00
Ryan McCarvill
f0222956f1 🐛 fix backspace deleting cards whilst editing (#674)
closes TryGhost/Ghost#8385
- If a card that is being edited is hard-selected then make sure that it is in fact soft-selected
2017-04-25 12:53:05 +01:00
Ryan McCarvill
3e49b7548e 🔢 Add wordcount feature. (#668)
closes TryGhost/Ghost#8202
-  added wordcount for mobiledoc text and html/markdown cards (cards will only update word count when leaving edit state)
- word count is only displayed on wide screens
2017-04-25 12:32:27 +01:00
Ryan McCarvill
50cfc8eecb 🐛 fix editor cursor scrolling (#672)
no issue

When calculating if the editor should scroll to keep the cursor on screen upon selection change the editor would appear to scroll to random locations.

The issue stemmed from the fact that the getPositionFromRange method took into account the scroll offset when figuring out the pixel position of a range. So, if the editor was vertically scrolled the scrollTop was added to the cursor position which the editor would assume meant that the cursor was offscreen when it wasn't.

This fix creates a new method getPositionOnScreenFromRange which finds the position of an element on screen and ignores the scroll offset.
2017-04-25 11:29:45 +01:00
Matt Enlow
9eda16e60a 🐛 fix chrome autofill on setup/two (#670)
no issue
- connect email and name labels to inputs
- change name of hidden inputs so that chrome doesn't incorrect fill fields
2017-04-25 09:45:23 +01:00
Rabbi Hossain
955e8cc188 Fix for Firefox CSS Issues (#671)
closes https://github.com/TryGhost/Ghost/issues/8337
- fixes `Browse` file select icon being partially hidden on Labs screen
- fixes timezone alignment in date/time picker inside PSM
2017-04-25 09:17:16 +01:00
Katharina Irrgang
37689059af 🎨 settings model inconsistency (#669)
requires https://github.com/TryGhost/Ghost/pull/8381
- all camelCase settings model attribute names received from the API are now underscore_case
- discussed here https://github.com/TryGhost/Ghost-Admin/pull/661#discussion_r112939982
2017-04-24 18:42:43 +01:00
Katharina Irrgang
7169a14568 🔥 Adapt image property changes (#661)
refs https://github.com/TryGhost/Ghost/issues/8348, requires https://github.com/TryGhost/Ghost/pull/8364
- rename all image properties
- e.g. author.image --> author.profile_image
- test all image functionality
2017-04-24 18:22:39 +01:00
Ryan McCarvill
097f37ea02 Card creation and deletion bugs. (#664)
closes https://github.com/TryGhost/Ghost/issues/8312
- all new cards created now enter in selected mode and if enabled edit mode.
- if deleting cards places the cursor in an empty section the '+' menu is placed AFTER the card is deleted which ensures it's placed in the correct location
2017-04-24 15:02:20 +01:00