Commit Graph

4 Commits

Author SHA1 Message Date
Kevin Ansfield 6107f29388 🐛 Fixed error when removing Facebook/Twitter social images on general settings screen
refs https://github.com/TryGhost/Team/issues/836
refs da6d8fcfe1

Problem:
- `<GhImageUploaderWithPreview>` was updated to swap deprecated `{{action}}` usage to `{{on "click"}}` but that came with a missed behaviour change because the click event will now be passed as the argument to `@remove`
- the `<GhImageUploaderWithPreview>` usage on the general settings screen for social images had a syntax error in it's usage of the `mut` helper that meant the supplied argument was being used as the value rather than a forced `""` value. Result was that we were replacing the image urls with a text representation of the click event when attempting to remove images, leaving a broken image in place and no way to upload a new image

Fix:
- fixed incorrect `mut` usage to correctly force `""` as the value when removing social icons
- updated `<GhImageUploaderWithPreview>` to force `""` as the argument passed to `@remove` to avoid any other issues due to the behaviour change
2021-06-29 17:54:09 +01:00
Kevin Ansfield 9d2c86c227 Switched to new component for labs feature image redesign
refs https://github.com/TryGhost/Team/issues/771

- added `<GhEditorFeatureImage>` for more flexibility than offered by `<GhImageUploaderWithPreview>`
  - updated to more closely match intended designs
- removed alt/caption support from `<GhImageUploaderWithPreview>` as it's no longer used
- fixed upload/delete/upload not working due to file input references getting out of sync
2021-06-16 17:56:25 +01:00
Kevin Ansfield da6d8fcfe1
Added first version of feature image with caption inside editor (#1999)
refs https://github.com/TryGhost/Team/issues/771

- updated `<GhImageUploaderWithPreview>` to take an `@includeMetadata` argument that shows a basic html supporting caption field underneath (ready for toggle between caption/alt but not fully implemented)
- added feature image alt/caption properties to post model
- updated UI behind "featureImageMeta" labs flag
  - added the feature image uploader to the top of `<GhKoenigEditor>` for display above the editor title
  - removed feature image uploader from post settings menu
- added labs flag checkbox
2021-06-10 20:42:32 +01:00
Kevin Ansfield d6058dbf27 Co-located component template files
no issue

Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories.

- ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components
- manually moved in-repo-addon component templates in `lib/koenig-editor`
- removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them
- updated `.embercli` to default to new flat component structure
2020-05-18 13:14:08 +01:00
Renamed from app/templates/components/gh-image-uploader-with-preview.hbs (Browse further)