Commit Graph

888 Commits

Author SHA1 Message Date
Kevin Ansfield
3a9209b6a8 Fixed some minor formatting issues
no issue

- indented conditional template code
- grouped tracked properties together
2022-11-22 13:15:08 +00:00
Kevin Ansfield
f25cc00236 Fixed product card throwing "Cannot read properties of undefined (reading 'url')" errors
closes https://github.com/TryGhost/Team/issues/2295

Problem:
- `<GhUploader>` is not yet converted to an Octane component so it's arguments are not read-only
- when a file is selected it sets it's `files` property which in turn updates the tracked `files` property that was passed in, and then again updates it to an empty file list when the input field is cleared
- that tracked property was never cleared once the product image was uploaded resulting in a "re-upload" attempt with an empty file list every time the product card was put back into edit mode

Fix:
- added a guard in `<GhUploader>` so it doesn't try to upload an empty file list if one is passed in as an attribute
- added a reset of the tracked `files` property in the product card once the image upload is complete
2022-11-22 13:13:42 +00:00
Kevin Ansfield
9bdb25d184
Fixed hosting management screen not loading after sign-in process (#15763)
refs https://github.com/TryGhost/Team/issues/2110

- dynamically defined properties on the config service did not have
autotracking set up properly if they were accessed in any way before the
property was defined, this caused problems in a number of areas because
we have both "unauthed" and "authed" sets of config and when not logged
in we had parts of the app checking for authed config properties that
don't exist until after sign-in and subsequent config re-fetch
- renamed `config` service to `configManager` and updated to only
contain methods for fetching config data
- added a `config` instance initializer that sets up a `TrackedObject`
instance with some custom properties/methods and registers it on
`config:main`
- uses application instance initializer rather than a standard
initializer because standard initializers are only called once when
setting up the test suite so we'd end up with config leaking across
tests
- added an `@inject` decorator that when used takes the property name
and injects whatever is registered at `${propertyName}:main`, this
allows us to use dependency injection for any object rather than just
services or controllers
- using `application.inject()` in the initializer was initially used but
that only works for objects that extend from `EmberObject`, the
injections weren't available in native-class glimmer components so this
decorator keeps the injection syntax consistent
  - swapped all `@service config` uses to `@inject config`
2022-11-03 11:14:36 +00:00
Kevin Ansfield
7b443d4b63 Removed need for .get() with config service
no issue

The `config` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `config` service by grabbing the API response after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to a tracked object holding the API response data. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `config.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed unnecessary async around `config.availableTimezones` which wasn't making any async calls
2022-10-07 16:14:57 +01:00
Kevin Ansfield
63b1e4e8ad
Resolved power-select related deprecation warnings for loading components by string (#15466)
no issue

- in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable
- switched to passing a component explicitly with `{{component}}`
- https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
2022-09-24 17:00:05 +02:00
Kevin Ansfield
6fffe5468d Fixed linter error
refs fa84808048

- code copied from `ember-power-calendar-moment` did not comply with our linter rules
2022-09-24 13:36:47 +02:00
Kevin Ansfield
a934481f45 Fixed @sentry/browser imports
no issue

- needed for embroider compatibility
- the package we have installed is `@sentry/ember` not `@sentry/browser` so the imports fail when built by webpack
2022-09-24 13:28:35 +02:00
Kevin Ansfield
fa84808048 Dropped ember-cli-moment-shim dependency
no issue

Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling.

- dropped `ember-cli-moment-shim` dependency
- added `moment-timezone` dependency and updated all imports to reflect the different package
- worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency
  - added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package
  - added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
2022-09-24 13:28:23 +02:00
Kevin Ansfield
9bbafc3ccf Deleted unused files
no issue

- files were left over from earlier development and not being used anywhere
2022-09-24 13:27:54 +02:00
Kevin Ansfield
a2f0ccc981 Added audio/x-m4a to allowed mime types in audio card
refs b12400577a

- additional mime type was added to the API's allowed list but was missed in Admin's allowed list
2022-09-14 09:04:58 +01:00
renovate[bot]
1b8dbb132f
Update Test & linting packages (#15338)
* Update Test & linting packages
* Fixed new `no-quoteless-attributes` template lint errors

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-09-13 09:19:14 +01:00
James Morris
dd65c99104 Made longer URLs scrollable on hover for Email CTA and Button modules in the editor
no issue
2022-09-02 18:39:41 +01:00
Sanne de Vries
a2fc31aa0a Cleaned up icon styles
Refs https://www.notion.so/ghost/Unify-icons-across-Admin-7e3d124d5db34c63beccca029af595e7

- Reduced duplicate plus icons
- Replaced fill trash, info and pen icons by stroke icons
- Removed fill styles from default button classes
- Removed launch-wizard css
2022-09-02 16:56:02 +01:00
Kevin Ansfield
0152eeb600 Added capture of product card image width/height
refs https://github.com/TryGhost/Team/issues/1873

- the code for storing the image width/height in the card payload was commented out
- uncommented and renamed to match the payload attr names
2022-09-02 14:44:37 +01:00
Daniel Lockyer
b376b0c4c9 Removed icon files from packaged tarball
refs 6290fd6deb

- following the referenced commit, all SVG icons should only be used
  with svg-jar and not externally loaded
- this means we are now shipping all the icon files in the packaged tarball, but
  they're unused once Admin is built
- this commit prevents the icons from being copied and bundled
2022-08-31 18:06:42 +01:00
Daniel Lockyer
fcd6360869
Cleaned up asset-delivery env config
- this is no longer needed because we don't do env-specific builds
2022-08-30 08:24:48 +01:00
Kevin Ansfield
9335b57741 🐛 Fixed line breaks not persisting when used inside email cards
no issue

- we allowed line breaks to be created in the text-replacement html input used inside email cards but they were removed as soon as the card's edit mode was left
- fixed the clean-text-replacement-html routine so `<br>` atoms aren't stripped
- added the soft-return parser to the `<KoenigTextReplacementHtmlInput>` editor options so the `<br>` elements are correctly parsed back into atoms when entering edit mode
2022-08-16 16:56:40 +01:00
Daniel Lockyer
ad209f3a7d
Improved yarn dev development tooling
- this commit switches our `yarn dev` workflow from heavily relying on
  Grunt, to using `nodemon` and `concurrently`
- we're doing this to reduce reliance on Grunt, but also to fix several
  nits with the way `yarn dev` works in the monorepo
- we now use `nodemon` to run the Ghost backend, and it should
  auto-refresh whenever you change a file in any of the packages (except
  `admin`)
- we use `concurrently` to simultaneously run `ghost` and `admin` at
  the same time. it seems to handle process cleanup well and has nice
  colored prefixes to help with differentiating between log output
- this commit ends up removing a handful of Grunt dependencies and
  reduces the functionality stored in the Gruntfile
- on the whole, it should keep existing functionality but there may be
  some small underlying changes to get used to
2022-08-05 15:54:37 +02:00
arsereg
182a7ea07c
💡 Upgraded Tenor API to v2 (#15087)
closes: https://github.com/TryGhost/Ghost/issues/14980
refs: cc276486f0

- Tenor is now operated by Google, and the old v1 Tenor API has been decommissioned
- At present anyone with a pre-configured tenor integration will get intermittent errors, whilst it is impossible to setup a new tenor API integration
- Sadly old keys do not work with the new API, and new keys do not work with the old API, so there is no happy path forward.
- After this lands, everyone will need to go and get a new Google API Key for Tenor, update their config, and then the integration will work properly again.
- This particular change renames the API key from `publicReadOnlyApiKey` to `googleApiKey` to reflect that the key itself changes in type and behaviour

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-08-05 12:13:27 +01:00
Daniel Lockyer
7cf4f595f7 🐛 Fixed missing published Admin assets when running in development
refs https://forum.ghost.org/t/admin-template-issues-default-install/31750

- we recently switched to using different folders within `core/built`, to
  indicate the assets that are applicable for development/production
  environments
- unfortunately, this came with the side effect of the "development" assets
  missing in the published tarball, which meant Admin wouldn't load when
  running in development mode
- this was a regression from how it previously worked because we used to
  just copy the production HTML file to the development HTML name, and
  use the same assets
- after thinking about it, I think we can get rid of the split folders
  for assets, because I don't think the use-case is there for having
  them:
  - if you run Ghost from source, you're 99% only using the
    development-built assets
  - if you want production ones, you can run with a flag, but the
    development ones get wiped anyway
  - those running Ghost from a published package are using the same
    assets and HTML file
- therefore, I think we can make our lives simpler by removing the env
  folders and using a folder under `core/built/admin/...`
- this commit implements that across Ghost and Admin
2022-08-04 10:55:35 +02:00
Daniel Lockyer
b1d6b434b5
Fixed yarn dev
refs https://github.com/TryGhost/Toolbox/issues/365

- this fixes the path of the admin assets to the ghost package dir and
  points the subgrunt path to the admin dir
2022-08-03 16:00:40 +02:00
arsereg
cc276486f0 Updated Tenor API to v2 (#2418)
refs: https://github.com/TryGhost/Ghost/issues/14980
refs: https://github.com/TryGhost/Ghost/pull/15087

- The Tenor v1 API has been decommissioned https://developers.google.com/tenor/guides/migrate-from-v1
- Updated the API to v2, but there are some differences we have to account for 
- Swapped from using the old "trending" API to the new "featured" API, which at present seem to be the same thing
- Added a new client_key, which identifies the integration using the google API key, as google API keys can be used for multiple APIs and projects
-  Fixed up the error handling to support Google's error format, and also caught and replaced the error that everyone with old keys will see to make it clearer. This includes adding an htmlError property so that we can output HTML safely in the frontend.

There is still an active TODO with the naming of the config key, but we will resolve this after merging admin into the monorepo.

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-08-03 14:11:55 +01:00
Kevin Ansfield
90a080e0b8 Update dependency eslint-plugin-ghost to v2.14.0 (#2441)
no issue

- bumped dependency
- fixed all new lint failures
- removed deprecated `ember-cli-eslint`
  - it was tying us to an old version of `eslint` resulting in missing rule definition errors when linting was run as part of `yarn dev` and `ember test`
  - we run linting separately in CI so we don't need linting to run _again_ on each of our ember test runs
2022-08-03 12:21:16 +01:00
Kevin Ansfield
a5ec6cca06 Fixed "Could not find module 'ember-keyboard'" error thrown by gif card
no issue

- the Koenig in-repo-addon's package.json didn't include `ember-keyboard` and with the recent `ember-auto-import` upgrade it wasn't being picked up correctly
- adding the dependency line fixed things
2022-08-02 15:51:59 +01:00
Gabriel Csapo
ddfeb90fc6 Updated ember-auto-import@1 -> ember-auto-import@2 (#2252)
requires https://github.com/TryGhost/Ghost/pull/15128
refs https://github.com/TryGhost/Admin/pull/2252

- bumped `ember-auto-import` dependency
  - updated `autoImport` config to match new format
  - added dependencies for node packages that no longer have built-in polyfills in webpack@5
- updated `asset-delivery` to work with `ember-auto-import@2`
  - reverted to standard ember `index.html` to let `ember-auto-import` handle it's insertion of multiple JS chunk files
  - updated the `asset-delivery` addon to copy the the `index.html` and `/assets` to `core/built/admin/{development|production}/` directory rather than splitting the `index.html` file apart from the assets inside Ghost's directory structure
- switched to relative root URL in development/production
  - required because assets are served from the same directory the index file is served from in Ghost rather than from the root
  - Admin uses `/#/` URLs so it can be served from any subdirectory without requiring prior knowledge of that directory at build time

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-08-02 13:43:28 +01:00
Peter Elmers
26e6d459cb Put plus menu button on the screen on mobile (#2417)
Fix the right positioning and size of the icon for mobile display
Addresses https://github.com/TryGhost/Ghost/issues/14948
2022-07-27 11:29:33 +02:00
Kevin Ansfield
242106d596 Migrated code card to Octane syntax
refs https://github.com/TryGhost/Ghost/issues/14101

- applying boyscout rule and upgrading/cleaning up when touching files
- nothing out of the ordinary to report with this migration
2022-07-14 17:32:44 +01:00
Kevin Ansfield
aab02f0f4c 🐛 Fixed code card not correctly saving language when changing
closes https://github.com/TryGhost/Team/issues/1662

- the on-blur action for the language input was modifying the language property in the payload object directly which meant that the mobiledoc `save` call was missing and all the associated editor behaviour for serializing and saving the update was lost
- switched to modern action syntax and a proper action on the backing component so we're saving the change correctly
2022-07-14 17:30:05 +01:00
Kevin Ansfield
508af14460 Fixed linting
refs 3f9c019bc0
2022-05-27 15:24:30 +01:00
Kevin Ansfield
3f9c019bc0 Fixed editor error when using blockquote text expansion in product/toggle card content
no issue

- `<KoenigBasicHtmlTextarea>` has no UI or keyboard shortcut support for blockquotes but the markdown text expansion for quotes was left in despite the code required for it not existing, this meant any time `> text` was typed the editor would throw errors due to missing actions
2022-05-27 15:21:54 +01:00
Kevin Ansfield
cab7f2cd74 🐛 Fixed paste into product card descriptions not stripping header formatting
closes https://github.com/TryGhost/Ghost/issues/14018

- product card descriptions and toggle card content both use `<KoeingBasicHtmlTextarea>` which is a stripped down Koenig editor with basic formatting support where heading sections are not expected
- when pasting into or updating the content in `<KoeingBasicHtmlTextarea>`, convert any headings, blockquotes, or other markerable section types to standard paragraphs so the content formatting matches what is possible through the editing interface
2022-05-27 15:11:08 +01:00
Kevin Ansfield
8fee5f155b Standardized on non-jQuery file dialog triggers
no issue

- we had a mix of legacy jQuery triggers and native triggers for file input clicks and jQuery hasn't been required to do this in our target browsers for quite a long time now so it made sense to update all click triggers to avoid old patterns being replicated
- cleaned up some conditionals with optional-chaining
- removed use of `run.bind(this)` for methods that use `@action` because the binding is already handled for us
2022-05-26 11:05:14 +01:00
Kevin Ansfield
1130b609c3 Fixed linter errors in <KoenigCardProduct> template
refs https://github.com/TryGhost/Ghost/issues/14101
2022-05-26 10:09:00 +01:00
Simon Backx
bc1aa493fa 🐛 Fixed unreliable paid members enabled checks (#2405)
refs https://github.com/TryGhost/Team/issues/1650

- Some places only checked for Stripe being connected via the 'connect' method and ignored the 'direct' method
- Updated (where possible) admin to use the new calculated `paid_members_enabled` setting
2022-05-24 16:53:03 +02:00
Kevin Ansfield
94c192041d Added guards for missing codemirror elements when destroying markdown cards
no issue

- if a markdown card is created and destroyed before the simplemde+codemirror instance is fully initialised we could throw errors due to simplemde calling methods on objects that don't yet exist during teardown
- we also had issues with the `_applyToolbarStyles()` method being called async by event handlers after the component was destroyed
2022-05-24 13:12:22 +01:00
Djordje Vlaisavljevic
61a459ac2e Fixed linting error 2022-05-20 12:26:01 +02:00
Djordje Vlaisavljevic
f3b56d092a Fixed text overflow in the input field 2022-05-20 12:09:41 +02:00
Kevin Ansfield
4aa9d4554e Dropped ember-useragent dependency
no issue

We made very limited use of the `ua-parser-js` sub-dependency that `ember-useragent` pulls in so it didn't seem worth having the fairly large 17KB import or the associated sub-dependency version resolutions.

- switched the two iOS and Safari detections to use associated Regexes on `navigator.userAgent`
- dropped the "Microsoft Edge not supported" message in the editor
  - old Edge is still not supported but it was been replaced with a Chromium-based version that is supported a while back
  - we can re-introduce a warning if we get any significant reports (there is nothing showing in Sentry for this alert in the last 14 days)
2022-03-07 10:06:35 +00:00
Kevin Ansfield
7e3565d71f Resolved linter errors in koenig-toolbar.hbs
refs https://github.com/TryGhost/Ghost/issues/14101

- switched from the deprecated `{{action}}` helper to the `{{on}}` modifier
2022-02-15 13:46:49 +00:00
Kevin Ansfield
f253228d94 🐛 Fixed "Header two" formatting toolbar button not working
closes https://github.com/TryGhost/Ghost/issues/14146
refs https://github.com/TryGhost/Admin/pull/2251

- an action rename was missed when converting the toolbar component to native class syntax
- added test for the h3 toolbar button working
  - fixed `<KoenigEditor>` not assigning the test property that gives tests access to the underlying mobiledoc `editor` instance
2022-02-15 13:23:37 +00:00
Gabriel Csapo
d51f2bcf23 [chore] migrate to eslint@8 and run --fix (#2256)
closes https://github.com/TryGhost/Admin/pull/2107

- updated related babel dependencies
- bumped eslint
- ran `yarn lint:js --fix`
- added eslint ignore comments for some required non-camel-case properties
2022-02-10 10:41:36 +00:00
Kevin Ansfield
8cc4c6c4a1 Dropped ember-concurrency-decorators dependency
no issue

- since `ember-concurrency@2.0` it's possible to use the standard imports as decorators removing the need for the extra `ember-concurrency-decorators` dependency and imports
2022-02-09 10:49:38 +00:00
Gabriel Csapo
f75d88cb2c [chore] migrates koenig-editor files to native classes (#2251)
refs https://github.com/TryGhost/Ghost/issues/14101

- continuing migration to native classes with use of `@classic` decorator
2022-02-09 09:19:45 +00:00
Kevin Ansfield
c55084eeb4 🐛 Fixed Ctrl+Enter-to-edit keyboard shortcut not working on Windows for some editor cards
no issue

- Callout, Email, Email CTA, Header, Product, and Toggle cards all had the same typo in the Ctrl/Cmd+Enter keyboard handling
2022-02-07 16:55:01 +00:00
Kevin Ansfield
c44766e8d3 Collapsed @service injection definitions to single-line style
no issue

- find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax
2022-02-03 19:04:43 +00:00
Kevin Ansfield
1be7dd1770 Ran native classes codemod for lib/koenig-editor/addon/components
refs https://github.com/TryGhost/Ghost/issues/14101

- ran native classes codemod for koenig-editor in-repo-addon components
- added `ember-classic-decorator` to addon's package.json to fix errors when importing

Some files failed to convert automatically:
```
❯ grep -rL "@classic\|default class" lib/koenig-editor/addon/components/**/*.js
lib/koenig-editor/addon/components/koenig-alt-input.js
lib/koenig-editor/addon/components/koenig-card-image.js
lib/koenig-editor/addon/components/koenig-editor.js
lib/koenig-editor/addon/components/koenig-toolbar.js
```
2022-02-03 18:57:21 +00:00
Gabriel Csapo
f22a758a3b [chore] run the no-implicit-this codemod (#2244)
refs https://github.com/TryGhost/Admin/pull/2238

Follow up to #2238, this should remove the existing no-implicit-this lint errors and any new violations should be flagged right away.

* run the no-implicit-this codemod
* updated todos
2022-02-02 17:09:02 +00:00
Kevin Ansfield
5e7c98fb46 Fixed template linting error in koenig-card-email.hbs
refs cc257f8576

- template change triggered a linting rule
- fixed and ran `yarn lint:hbs --update-todo`
2022-02-02 16:48:09 +00:00
Kevin Ansfield
cc257f8576 Fixed noreferer typos
no issue

- should be `noreferrer`, caused duplication by ember-template-lint auto fixing
2022-02-02 16:20:01 +00:00
Gabriel Csapo
beb5ae1737 [chore] adds ember-template-lint and fixes all fixable issues (#2238)
no issue

- This will help with the octane migration and you can still run the lint rules even when they are todos. (Checkout the docs at 158b119667/docs/todos.md) The good news is any new code will be checked against the recommended config.
- I fixed all the auto fixable things we could get in this PR as well
2022-02-02 16:09:43 +00:00
Kevin Ansfield
c9aa43e5a5 Added infobox to matches list for callout card
no issue

- extra term for matching the callout card so you can start typing `/infobox` and get the card you were looking for
2022-01-31 13:46:07 +00:00
Kevin Ansfield
fa4f8221d5 🎨 Made /-menu card searching case-insensitive
no issue

- allows typing "Button" to match the "button" card
- useful on mobile where words can be auto-capitalized
2022-01-31 13:37:25 +00:00
Kevin Ansfield
e0fa64a56b 🐛 Fixed editor cards not being usable by contributors
no issue

- a recent Ember upgrade has slightly changed behaviour for template conditionals meaning helpers used in the right-hand side of a conditional can be called when the conditional evaluates to falsy
- this caused an error to be thrown by the editor when creating cards as a contributor because the `{{fn}}` helper is called with a null/undefined `saveCardAsSnippetIfPossible` function which will throw an error
- wrapped the function in the `{{optional}}` helper (https://github.com/DockYard/ember-composable-helpers#optional) which will return a "noop" function allowing the template to evaluate without errors
2022-01-31 13:28:26 +00:00
Peter Zimon
3a3b2f7fb4 Remove alpha flag for Editor settings panel (#2230) 2022-01-31 13:33:59 +01:00
Kevin Ansfield
f56b52b8a1 Cleaned up headerCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals as feature is GA
2022-01-04 14:58:19 +00:00
Kevin Ansfield
8e9748131c Cleaned up fileCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals as feature is GA
2022-01-04 14:57:01 +00:00
Kevin Ansfield
6c18628b8b Cleaned up audioCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 13:08:50 +00:00
Kevin Ansfield
b8b40fafef Cleaned up productCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 13:04:26 +00:00
Kevin Ansfield
aeb0cb60e8 Cleaned up accordionCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 13:03:08 +00:00
Kevin Ansfield
a9a82107ed Cleaned up videoCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 12:57:42 +00:00
Kevin Ansfield
7a270de050 Cleaned up calloutCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 12:56:25 +00:00
Kevin Ansfield
0fcf89b1fa Cleaned up nftCard labs flag
refs https://github.com/TryGhost/Team/issues/1258

- removed labs flag and conditionals
2022-01-04 12:55:04 +00:00
Kevin Ansfield
99e2db76dc 🐛 Fixed Spotify and Soundcloud embeds having overly long containers in editor
closes https://github.com/TryGhost/Team/issues/871

- when determining the size of the iframe containing a nested iframe in the embed card we were incorrectly treating a `100%` width attribute as a `100px` attribute and ending up with a completely incorrect ratio calculation
- added a conditional to ignore %-width attributes when calculating a ratio for a nested iframe
- if we have a nested iframe with a %-width but a fixed height, use that fixed height for the outer container iframe
2022-01-04 10:00:21 +00:00
Kevin Ansfield
85ac9f0826 Removed unnecessary koenig-media-selector-tenor export file
no issue

- the associated addon component was deleted a while back but the app export file was missed
2022-01-04 09:29:24 +00:00
Thibaut Patel
5056401c13 Renamed the header styles
refs https://github.com/TryGhost/Team/issues/1253

- The naming is easier to understand for theme developers
2021-12-16 18:22:08 +01:00
Peter Zimon
b6da19df65 Updated header card placeholders 2021-12-16 16:11:50 +01:00
James Morris
dcb5d2ad0a Fixed a merge with the header card settings
refs https://github.com/TryGhost/Team/issues/1253
2021-12-16 14:39:50 +00:00
Thibaut Patel
05af5cdcd4 Removed width and alignment configuration from the header card
refs https://github.com/TryGhost/Team/issues/1253

- We're simplifying the header card from a design point of view to ease integration with themes
2021-12-16 15:10:57 +01:00
Peter Zimon
c4c728d7a1 Refined header image styles 2021-12-16 12:59:03 +01:00
Peter Zimon
c4b4a6b2a4 Put back header style options 2021-12-16 12:26:15 +01:00
Peter Zimon
9afb0c7a94 Updated style picker for header 2021-12-16 12:25:01 +01:00
Thibaut Patel
1e16b92f52 Updated the header card file selector
refs https://github.com/TryGhost/Team/issues/1253

- Selecting the `image` style opens the file selector right away
- Avoids an extra click to the user
- Moved `GhFileInput` so that it's always rendered, which enables triggering it right when selecting the `image` style
2021-12-16 11:09:14 +01:00
Peter Zimon
d33ef9944e Added 'upload' term to file card menu access 2021-12-16 10:08:44 +01:00
Sanne de Vries
21a1b3a1aa 🐛 Fixed audio file duration missing digit in editor
Closes https://github.com/TryGhost/Ghost/issues/13894
2021-12-16 09:17:45 +01:00
Naz
575623f5be Added support for additional wav MIME types
refs f882ebc58e
refs https://github.com/TryGhost/Toolbox/issues/95

- The `audio/x-wav`, `audio/wav`, and `audio/wave` are also commonly used MIME types for the .wav files.
2021-12-16 11:11:43 +04:00
James Morris
47e77ddcdc Little tweaks for header settings panel and added add icon
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 19:09:17 +00:00
djordje vlaisavljevic
ffc22f520a Updated before/after card editor template
refs https://github.com/TryGhost/Team/issues/1249
2021-12-15 20:06:00 +01:00
djordje vlaisavljevic
2a19d3bb74 Updated before/after card editor template
refs https://github.com/TryGhost/Team/issues/1249
2021-12-15 20:03:03 +01:00
Fabien egg O'Carroll
ee410a08c1 Updated slider for before/after to match frontend
refs https://github.com/TryGhost/Team/issues/1249

Adds a new element to use as the slider handle to match how we're doing
it in the frontend
2021-12-15 20:27:39 +02:00
Thibaut Patel
6d8fc32d77 Updated the header card
refs https://github.com/TryGhost/Team/issues/1253

- added a default `cardWidth`
2021-12-15 18:28:41 +01:00
Thibaut Patel
1db6e175fd Updated the header card
refs https://github.com/TryGhost/Team/issues/1253

- removed the accent class in the edit mode
2021-12-15 18:26:47 +01:00
Thibaut Patel
1194a553e8 Updated the header card
refs https://github.com/TryGhost/Team/issues/1253

- added the card width back (only regular or full options)
- removed the accent class from the button
- fixed a bug happening when the subheader was empty
2021-12-15 18:25:05 +01:00
Peter Zimon
4f005f0ef5 Updated file card Koenig styles 2021-12-15 17:45:04 +01:00
djordje vlaisavljevic
49df6dde1b Added icon for before/after card
refs https://github.com/TryGhost/Team/issues/1249
2021-12-15 16:23:35 +01:00
djordje vlaisavljevic
ac33996c08 Updated editor styles for before/after card
refs https://github.com/TryGhost/Team/issues/1249
2021-12-15 11:10:05 +01:00
Fabien egg O'Carroll
cb24aa1914 Added replace image functionality
refs https://github.com/TryGhost/Team/issues/1249

This can resuse the image selection as after a successful upload the
image is replaced.
2021-12-15 12:06:46 +02:00
Thibaut Patel
e1bbc63bb3 Updated header card class names
refs https://github.com/TryGhost/Team/issues/1253
2021-12-15 10:02:17 +01:00
Fabien egg O'Carroll
804da37926 Removed requirement for matchign aspect ratio
refs https://github.com/TryGhost/Team/issues/1249

Based on design feedback so that users are able to use the card with
less friciton.
2021-12-15 10:35:38 +02:00
djordje vlaisavljevic
1d19f74ba8 Updated editor styles for before/after card
refs https://github.com/TryGhost/Team/issues/1249
2021-12-15 09:32:09 +01:00
Sanne de Vries
b640a023f7 Refined video card in editor
Refs https://github.com/TryGhost/Team/issues/1229

- Fixed glitch on load
- Fixed error state
- Hid custom thumbnail when video is looped
2021-12-14 19:49:29 +01:00
Peter Zimon
526c92bad7 Refined file Koenig styles 2021-12-14 17:55:27 +01:00
Peter Zimon
09b221543f Updated file upload Koenig styles 2021-12-14 17:41:41 +01:00
Fabien egg O'Carroll
1a772b13c1 Removed option & logic for setting orientation
refs https://github.com/TryGhost/Team/issues/1249

Based on design feedback from Djordje & Zimo.
2021-12-14 18:39:28 +02:00
Thibaut Patel
3742502f2d Updated the header card based
refs https://github.com/TryGhost/Team/issues/1253

- follows the latest design
2021-12-14 16:00:59 +01:00
Fabien egg O'Carroll
7d7d856e77 Removed edit option from toolbar
https://github.com/TryGhost/Team/issues/1249

We have no floating settings now so we can remove the menu item and
display the toolbar always when the card is selected
2021-12-14 16:40:51 +02:00
Fabien egg O'Carroll
1338ddd12b Removed usage of MutationObserver
refs https://github.com/TryGhost/Team/issues/1249

We now want to update the element which we are observing, which means we
end up in a loop. Instead we can listen to resize events and manually
update the dimensions when images are changed.
2021-12-14 16:40:51 +02:00
Fabien egg O'Carroll
d3ee36e45d Moved image upload and slider settings into card
refs https://github.com/TryGhost/Team/issues/1249

Based on design wirefames
2021-12-14 16:40:51 +02:00
Fabien egg O'Carroll
993fdf9a10 Moved layout and orientation settings to toolbar
refs https://github.com/TryGhost/Team/issues/1249

Based on the design wireframes we're not going to be using a floating
panel for settings, this moves the functionality into the toolbar
2021-12-14 16:40:51 +02:00
Fabien egg O'Carroll
d18e6006f9 Removed unused wordCount
refs https://github.com/TryGhost/Team/issues/1249

This isn't used anywhere at the moment.
2021-12-14 16:40:46 +02:00
Rishabh
324e6e95d0 Added duration data in video card
refs https://github.com/TryGhost/Team/issues/1229
2021-12-14 16:42:56 +05:30