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

6152 commits

Author SHA1 Message Date
Kevin Ansfield 3f397e1b89 Fixed error when creating a block-editable card in the editor
no issue

The toolbar display/positioning logic was recently changed so that the toolbar is shown when a `saveAsSnippet` action is passed in. However the `_setToolbarProperties` method wasn't taking into account the toolbar element not being present when in editing mode such as when a block-editable card (markdown, html, code) is created.

- remove conditional logic that may change over time and replace it with checks for the toolbar element existing
2020-11-06 18:13:32 +00:00
renovate[bot] 71e77d6cda
Update CSS preprocessors (#1708)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-05 11:51:51 +00:00
Peter Zimon 524a77a91c Fixed setting buttons alignment regression
refs https://github.com/TryGhost/Ghost-Admin/pull/1736 where a style change caused regression in the action button's alignment on settings screens.

- fixed alignment issues
2020-11-05 10:55:43 +01:00
Daniel Lockyer 2562316ff4 v3.37.1 2020-11-03 14:00:30 +00:00
Kevin Ansfield 5adcf1bf0f 🐛 Fixed snippet icon showing in card toolbar for authors/contributors
no issue

- authors/contributors do not have permission to create snippets so the icon should not be displayed
2020-11-03 13:57:11 +00:00
Daniel Lockyer c1a31105d0 v3.37.0 2020-11-03 13:11:42 +00:00
Rishabh Garg fdd9ddeb4f
Enabled Portal settings for all sites (#1748)
refs 8ad11fe082

- Removes Portal settings access from behind flag and includes it by default.

Portal script is now enabled as default, the change here allows Site owners to access Portal settings via Ghost-Admin
2020-11-03 14:38:53 +05:30
renovate[bot] f637be76be
Update dependency @tryghost/timezone-data to v0.2.31 (#1747)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-02 15:52:58 +00:00
renovate[bot] 6d3028be42
Lock file maintenance (#1742)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-02 15:52:34 +00:00
renovate[bot] 146437ba72
Update dependency @tryghost/string to v0.1.14 (#1746)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-02 15:06:01 +00:00
renovate[bot] 8bc2e294c1
Update dependency @tryghost/helpers to v1.1.34 (#1745)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-02 15:05:49 +00:00
renovate[bot] cee93b81de
Update dependency ember-auto-import to v1.7.0 (#1744)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-02 15:05:34 +00:00
Peter Zimon c244606382 Fixed truncated label names in members list
no refs.
- fixed Import related labels being truncated in the label filter dropdown list on the Members screen
2020-10-29 18:31:59 +01:00
Renovate Bot 79822ef66c
Update dependency ember-exam to v6.0.1 2020-10-28 20:02:39 +00:00
Sanne de Vries 322d12059a Adjusted cardmenu styling for dark mode
No issue

- Changed snippet icon fill
- Changed section border color
- Deleted white corners on bookmark icon
2020-10-28 14:55:34 +01:00
Sanne de Vries aab03b1c06 Changed "Delete snippet" button to sentence case 2020-10-28 13:45:13 +01:00
Sanne de Vries bb85a72d05 Changed copy for snippet deletion modal 2020-10-28 13:30:26 +01:00
Sanne de Vries a50a8186c7 Improved hover state styling of snippets in cardmenu
No issue

- Changed delete icon colour and padding
- Changed fill of snippet icon on hover
2020-10-28 13:14:25 +01:00
Daniel Lockyer 269bfaf476 Bumped minimum Node 14 version to latest LTS
- 14.15.0 is the latest version of Node 14 LTS
2020-10-28 11:05:00 +00:00
Kevin Ansfield 6b0618cc0d Changed slash menu filter to match any part of a snippet title
no issue

- extracted item matching into a separate function
- modified item matching to work with arrays (existing exact match behaviour) or functions which can be defined per-item
- changed snippet item `matches` to a function that does a naive match or the typed query to any part of the snippet's title
2020-10-28 08:37:04 +00:00
Kevin Ansfield a65ee0d8f3 Fixed error when closing delete snippet confirmation dialog 2020-10-27 18:33:31 +00:00
Kevin Ansfield b2e2d44cc6 Fixed error when clicking snippet icon from card toolbar 2020-10-27 18:32:20 +00:00
Kevin Ansfield 57becd52e0 Fixed toolbar showing when block cards are in edit mode 2020-10-27 18:23:56 +00:00
Kevin Ansfield 728e6e85d5 Fixed squashed card menu display in Safari 2020-10-27 16:28:24 +00:00
Kevin Ansfield 048cbc2967 Added scroll-into-view behaviour for slash menu selection
no issue

- when selecting items with arrow keys in the slash menu, scroll the selected item into view if it's not visible
2020-10-27 16:15:58 +00:00
Kevin Ansfield 714cf92395 Added snippets feature to editor
no issue

Snippets are pieces of saved content that are given a name and made available for easy and quick insertion when editing posts or pages. They can contain rich text, cards, or a combination of both making it faster and less error-prone to re-use pieces of content across multiple posts. Snippet length is not constrained meaning they can also stand in as post type templates alleviating the need to keep drafts around as templates and copy/pasting each time they are used.

Feature changes:
- added "create snippet" icon to selection and card toolbars
- added "Snippets" section to the plus and slash menus
  - for the slash menu, continuing to type after opening the menu will filter by snippet name
- all saved snippets are available to all staff users
- snippets can be deleted by clicking the trash can icon when hovering the mouse over a snippet entry in the plus or slash menus
- creation/deletion of snippets is available to staff users with the owner, admin, or editor role

This commit:
- removed developer experiments guard around snippet UI
2020-10-27 15:01:35 +00:00
Kevin Ansfield 552fdb335f Truncated long card menu labels 2020-10-27 14:48:39 +00:00
Kevin Ansfield 01a0aaf022 Hid snippet management UI from staff users without permissions
no issue

- snippets can only be created and deleted by owners/admins/editors
- added a property in the editor controller to determine if the logged in user has sufficient permissions, then only pass the appropriate save/delete snippet actions to the editor component if the check is passed
- updates koenig menus and toolbars to skip rendering of buttons if the associated action function is not available
2020-10-27 14:42:59 +00:00
Rishabh Garg 43c3e900da
Added past_due and unpaid subscriptions for members (#1740)
refs https://github.com/TryGhost/Ghost/issues/12256, https://github.com/TryGhost/Ghost/issues/12255

Currently when listing subscriptions for Members in both the Admin and the Theme, we only show the subscriptions which have a status of trialing or active.

Based on discussion, the `unpaid` and `past_due` states on Stripe also represent owner's intention of considering a subscription as active instead of `cancelled`, so we allow any subscriptions under these 2 states to be also listed for a member and consider them as `paid`. This updates Admin to consider those subscriptions as active as well.

- Subscriptions will go into a past_due state if the payment is missed, this should be considered a grace period where the member still has access.

- After this the subscriptions will either go to the unpaid or the cancelled state - this can be configured on an account by account basis in the Stripe dashboard. `unpaid` is considered as an intention to keep the subscription to allow for re-activation later.
2020-10-27 15:27:31 +05:30
Kevin Ansfield f360ef60f2 Fixed card menus closing when clicking on modal background
no issue

- when deleting a snippet we display a confirmation modal, if the background is clicked to dismiss the modal then the menus closed too which is a different behaviour to clicking the close/cancel button inside the dialog
- adjusted the "ignore click" selector in the menus to include all fullscreen modal elements
2020-10-27 08:43:46 +00:00
Kevin Ansfield ac56cb39e1 Lock file maintenance 2020-10-27 08:38:30 +00:00
renovate[bot] 8100d27f61
Update dependency ember-cli-babel to v7.23.0 (#1730)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-27 08:36:10 +00:00
renovate[bot] 11af6020f4
Update dependency ember-cli-terser to v4.0.1 (#1738)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-27 08:35:32 +00:00
Sanne de Vries abfc9041a0 Added a "Sent to xxx members" message in content management screen for posts that have been sent out to members 2020-10-27 09:33:38 +01:00
Renovate Bot 465186a621
Update dependency eslint to v7.12.1 2020-10-27 05:05:31 +00:00
Kevin Ansfield 57cfdae8f6 Added delete button with confirmation to snippets in card menus
no issue

- show a delete icon when a snippet is hovered in plus/slash menus
- show a confirmation dialog when the delete icon is clicked
- keep menus open whilst displaying the delete confirmation dialog
2020-10-26 17:09:39 +00:00
Renovate Bot 9b2e762ca5
Update dependency eslint to v7.12.0 2020-10-26 00:06:46 +00:00
renovate[bot] 3804de4af5
Update dependency ember-power-select to v4.0.6 (#1737)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-23 14:50:45 +01:00
renovate[bot] 9893678a27
Update dependency ember-simple-auth to v3.0.1 (#1732)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-23 14:49:49 +01:00
Daniel Lockyer ef402f6bf1 🔥 Added support for Node 14 2020-10-23 12:42:34 +01:00
Kevin Ansfield a3f897f689 Removed Instagram embed entry from the card menu
no issue

- Facebook are changing how Facebook/Instagram embeds work meaning that they won't work in Ghost once the deprecation lands on Oct 24th
2020-10-23 11:40:31 +01:00
Kevin Ansfield 8f6c63ffb6 Changed snippet icon in menus based on snippet contents
no issue

- vary the snippet icon based on the snippet contents: text only, text and cards, cards only
2020-10-23 10:56:32 +01:00
Sanne de Vries f2408162d8 Fixed bottom padding for card menu in Firefox 2020-10-23 11:55:41 +02:00
Kevin Ansfield 597ed21703 Update dependency eslint-plugin-ghost to v2.0.0
no issue

- bumps eslint and eslint-plugin-ember versions
- octane rules are enabled by default
  - disabled them in our eslintrc.json so we can switch to warn/error whilst migrating to octane
- fixed a couple of linting errors from new/updated rules
2020-10-23 09:59:09 +01:00
Sanne de Vries b02f7c0617 Styled new row layout of the cardmenu
No issue

- Adjusted menu width and height
- Improved spacing cards
- Changed font styling
- Added snippet icons
2020-10-23 10:36:31 +02:00
Peter Zimon 0f12b40cb2
Moved members settings to new page (#1736)
no refs

Moves members related settings in Labs to its own page to improve the overall UX and make it more consistent with the rest of the Admin.
2020-10-22 16:09:00 +05:30
Kevin Ansfield 98e2f8323a Fixed member's location sometimes showing as ", US"
no issue

- geolocation.region is not always available but we had assumed it was. Adjusted the logic to only show "region, US" if region is available
2020-10-22 09:15:03 +01:00
Kevin Ansfield e12e5ee910 Prevented card toolbar showing for embed/bookmark cards in input state
no issue

- it doesn't make sense to create snippets of bookmark/embed cards before they contain any content so we avoid passing the save snippet function through until content exists and the card has left it's input state
2020-10-21 18:27:26 +01:00
Kevin Ansfield 438cf239a7 Changed card/plus menu layout from grid to rows
no issue

- with the addition of snippets the card menu contents height and potential label width are both growing considerably making the grid layout unworkable
2020-10-21 12:34:05 +01:00
Kevin Ansfield e5ae72cbff Added "Create snippet" toolbar icon when cards are selected
no issue

- show the toolbar icon for any `<KoenigCard>` instance that has the `saveAsSnippet` action passed to it
  - currently that's all cards except the HR card because that's a primitive element rather than containing any user-defined content
- add `koenigUi.inputHasFocus` so that card toolbars can be hidden when the snippet input is displayed
2020-10-21 12:16:04 +01:00