refs https://github.com/TryGhost/Team/issues/1045
- update of the preview was being triggered by the general settings tab rendering (copy/paste from branding setup) meaning the iframe reloaded when switching between general/theme tabs
- moved the preview update task into the `customize` modal so that it can be called by the general/theme settings components as needed
- moved initial preview rendering to the iframe registration method
no issue
After publishing and sending a post, if it was unpublished then scheduled again the post status would show "published and sent to x members" where `x` is the current number of members but that's incorrect because a post can only be sent by email once
- removed the "and sent to x members" message if a scheduled post has already been sent via email
refs https://github.com/TryGhost/Team/issues/1045
If the customize modal is open and you manually changed the URL, on navigating the modal would close and a transition to the manually entered URL would start but then you'd be transitioned back to `settings.design`.
The problem occurs because `beforeModalClose` is always called when the modal closes causing the redirect.
- added a `hasConfirmed` boolean that is set to `true` when leaving the customize route if there are no unsaved changes or the changes have been confirmed
- skipped the unsaved changes check and redirect in `beforeModalClose` when `hasConfirmed` is true
refs https://github.com/TryGhost/Team/issues/1045
- added tabs to the the customise design modal's sidebar for general settings and theme settings
- copied settings from the existing branding modal plus site description from general settings screen into the general settings tab
- theme settings tab left blank ready for static design
- `saveTask` put on the controller so that we can access it from the route, allowing us to pause modal closing when navigating away (implementation left for later)
refs https://github.com/TryGhost/Team/issues/905
- benefits were overridden with a secondary products query for segment select which did not have proper includes
- fixes includes for products when fetched for member segments
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Team/issues/1045
- removed need for `{{will-destroy}}` in the modal template by using `willTransition()` in the route that opened the modal instead
- used the property of new modals acting as promises to implement an unsaved changes confirmation modal
- added `confirmUnsavedChanges()` method that opens a "are you sure you want to leave?" modal that is treated as a promise. If the modal is closed by the "Leave" button the promise returns true in which case we rollback the unsaved changes. The modal is returned so that other behaviour can use this method and wait for the confirmation result
- added `willTransition()` route hook that calls `confirmUnsavedChanges()` when there are unsaved changes and will only continue to transition if the "Leave" button is pressed
- added `beforeClose()` hook to the customize modal when opening so that we can prevent the customize modal from closing when "Stay" is clicked in the confirmation modal
- updated `activate()` hook to store the modal instance so it can be closed later
- updated `deactivate()` hook to call `.close()` on the modal instance rather than using private data/methods on the modals service
refs https://github.com/TryGhost/Team/issues/559
Click-to-close and escape-to-close functionality in `ember-promise-modals` was deferred to `focus-trap`. For some of our use-cases that wasn't ideal because there was nowhere to hook in if we wanted to abort modal closing for any reason (eg, to show an unsaved changes confirmation)
- bumped the custom fork version of `ember-promise-modals` to allow all focus-trap close-inducing behaviour to be disabled
- also adds a `beforeClose()` option when opening modals for future use
- changed modals service options that are passed through to `focus-trap` so that all close-inducing behaviour is disabled
- when the first modal is opened add event handlers for clicks and <kbd>Escape</kbd> key presses that should close modals and manually call `.close()` on the top-most modal in the stack
- remove event handlers when the last modal is removed
refs https://github.com/TryGhost/Team/issues/1045
- added new `settings.design.customize` route
- used the route's `activate` and `deactivate` hooks to trigger and close the customize modal
- added `modals/design/customize` component that uses the existing branding modal design without it's contents as a base
- has `{{will-destroy}}` hook that transitions back to the settings screen so the route will update when the modal gets closed
refs https://github.com/TryGhost/Team/issues/1045
- added blank `/settings/design` route and associated screen
- redirects to settings index if associated labs flag is not enabled
- when custom theme settings labs flag is enabled, replaced Branding and Theme links with single Design link
refs https://github.com/TryGhost/Team/issues/1032#issuecomment-918554923
- the email recipient menu in publish menu was not correctly translating the tiers in specific tier selection when matching post level access
- in case of specific tier, visibility type on post is `filter` and the visibility filter data is in a separate field on post - `visibilityFilter`, so it got missed
refs https://github.com/TryGhost/Team/issues/559
- moved the modal component class, template, and sub-components into a `components/modals/` directory to keep the top-level dir cleaner
- migrated component class to full glimmer syntax
refs https://github.com/TryGhost/Team/issues/559
- moved the modal component class and template into a `components/modals/` directory to keep the top-level dir cleaner
- migrated component class to glimmer syntax
- moved route transition behaviour directly into the class to avoid weird route-action indirection
refs https://github.com/TryGhost/Team/issues/559
We want to get rid of our existing modals implementation because it doesn't play well with Glimmer compoments and the animation library it uses is now unmaintained and blocking our Ember.js upgrades.
- installed addon using customised fork
- fork allows passthrough of `allowOutsideClick` to `focus-trap` so we can allow clicks on dropdowns and other wormholed content inside of a modal
- extended the `modals` service locally so we can customise click-outside-to-close behaviour and tie in with our `dropdowns` service
- set up styles in `modals-new.css`, mostly copied from `modals.css` with a few specific overrides
- once all modals are converted we can drop the old `modals.css` and rename `modals-new.css`
closes https://github.com/TryGhost/Team/issues/1039
- we had duplicate components for members setting form, `gh-members-settings-form` and `gh-members-settings-form-cp`, with the `-cp` version added as part of original tiers changes
- since are only using the "-cp" version now, the old form is now removed and cp version renamed to the original naming
closes https://github.com/TryGhost/Team/issues/1032
- fixes the selected default access value for specific tier not shown correctly on admin
- the value was correctly saved and fetched, but the value shown got overridden by default product selection and only the first product was shown as selected value
- Update dependency ember-simple-auth to v4
- Removed `setup-session-service` initializer as it's no longer needed/present in v4
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
refs https://github.com/TryGhost/Team/issues/873
When we updated the UI to handle the default subscriptions for
Complimentary subscriptions, we didn't update it to use any of the data.
This updates the UI to share as much as possible for the display of
subscriptions information, and only diverges for the menus which have
different actions based on complimentary or not.
This should ensure that we keep the UI in sync for both types of Member.
* Hid Complimentary subscription CTA for members with one.
no issue
- Clicking on the Ghost(Pro) item in the navigation would always reload the billing management app and enforcing to fetch all data again, even tho it has been fetched and cached before
- This commit removed loc that replaces the iframe content every time we click on the button
- Renamed `setBillingWindowOpen` to `toggleProWindow` as it's more accurate in its description
- Removed `closeBillingWindow` as it's unused throughout the app
no issue
Pages can not be sent by email so by hiding email-specific cards when editing pages we can reduce confusion and clutter.
- added a `@postType` argument to editor components that can be passed through to sub components
- set `@postType` to `post.displayName` which is either `post` or `page`
- updated `{{card-is-available}}` helper to compare a `postType` property on card menu items to the passed in `postType`
no refs
- when a site has no labels, the bulk action on labels - add/remove - was throwing an error
- fixes the bug and adds disabled state for add/remove label bulk action UI
no refs
- resets filter columns on list when query params are removed from the url via sidebar click transition
- reloads the updated list on new bulk actions on the filtered list
refs https://github.com/TryGhost/Team/issues/963
- when changing the filter block to a filter type which has default value, previously the members list was not reloaded
- updates members list on switching filter types with default value
closes https://github.com/TryGhost/Team/issues/1026
Tiers are now moved up to beta features in the labs section on Admin via early-access opt-in flow, so there is no need for it anymore in alpha section.
refs 107ed0e1f3
- save shouldn't be happening here as it means unexpected changes could be saved to published posts without the user's consent
- save is related to a labs feature so it should have been behind a labs flag
no issue
- Grammarly is a suspect in some reported editor errors but it's usage hasn't been available inside of Sentry to know for sure
- when the grammarly extension is present it adds a `data-gr-ext-installed` data attribute to the `body` element, we now use that to add a `grammarly: true/false` tag to error reports so we can more easily track down the cause of editor bugs
refs https://github.com/TryGhost/Team/issues/1026
Tiers is being released as a beta feature with an early-access opt-in flow. Site owners can now opt-in for early access to Tiers feature in Ghost by enabling it from the Beta features section, but note it's a one way door and its not possible to switch it off once enabled. This is to ensure that sites don't break in any unexpected ways once the tiers feature is enabled by switching it off.
Refs.
7394df6137e52bdf88f9
We have temporarily disabled Stripe disconnect for Administrators to avoid hitting an API endpoint.
Now that the API is updated, disconnect is re-enabled for Owner and Admins.
refs https://github.com/TryGhost/Team/issues/972
If a filter is applied in the new members list then the URL gets updated and the filter dropdown contains the filters that have been created. When refreshing the page while a filter is applied, the URL remains the same, the filter is still applied but the UI in the filter dropdown resets and doesn't show the appropriate filter fields and values.
This change parses the nql filter from URL using `nql-lang` library and rebuilds the filter UI blocks based on current filter in URL. It also ignores any invalid or unexpected filters in the UI.
closes https://github.com/TryGhost/Team/issues/977
A new label input dropdown was added behind filtering labs flag along with new filtering UI on members list screen, which includes member editing directly via the dropdown. This adds the same editing function to the members detail screen too behind the flag
Updated empty state of members detail screen.
- Added appropriate messaging to Analytics, Events and Subscriptions blocks about what's supposed to be in them once there's sufficient data.
- Updated tooltip for average open rate when there isn't significant data yet.
no issue
- wrapped dropdown options in an options group so the heading can provide more context
- fixed styling so there isn't double padding around grouped options
closes https://github.com/TryGhost/Team/issues/1028
Bulk operations - add/remove label, unsubscribe - were added to filtered members list behind filtering labs flag as part of introducing filtering on members list. This handles the success/error response on bulk operations and shows them in the popup similar to delete bulk operation.
closes https://github.com/TryGhost/Team/issues/975
Clicking on label edit in filtering menu was also causing label to be selected in the dropdown, which also caused members list to live reload. This change fixes the edit behavior by not selecting the label to be edited in the dropdown
closes https://github.com/TryGhost/Team/issues/971
reverts abe5c6d681
We use vertical-collection to allow infinite loading + scrolling for members list instead of loading and rendering all members at once. The behavior was not working correctly with updated list for filtering feature, as we dynamically update columns. This change fixes the scroll behavior and members loading together by updating the containerSelector for vertical collection.
closes https://github.com/TryGhost/Team/issues/976
Dropdown's `onClose` action was previously fired from the `close` function instead of when the actual close happened when animation ended for dropdown close. Also, the `close` action of dropdown is fired irrespective of dropdown is open, as we close all dropdowns and menus whenever a new transition happens, so it caused flicker on the screen.
refs https://github.com/TryGhost/Team/issues/963
- updates the list when either the relation or value changes for a filter row.
- only filter rows with value are used
- consistent behavior for "apply all" and "reset all"
- `Enter` and `onFocusOut` behavior for rows with text values
refs https://github.com/TryGhost/Team/issues/993
The new editor card allows you to add styled content along with an optional button that will only be visible to free or paid members when the post is emailed. Useful for encouraging free members to sign up to a paid account for example.
- removed labs flag and conditionals to make the feature is available by default
- cleaned up CSS that re-used the `.email-card` class or was referencing `labs`
refs https://github.com/TryGhost/Team/issues/874
- when hit with focus on last non-empty benefit field, previously the new benefit automatically showed error for empty field. This change refines behavior to only show error when user tries to click "Enter" again when already on last empty benefit
- also cleans up the duplicate add benefit call
- Updated Portal preview in Membership settings and Portal settings so that the preview is scrollable in all browsers.
Note: Only when Tiers is turned on.
refs https://github.com/TryGhost/Team/issues/1008
To update a snippet, select the content in the editor that you want as your snippet text and click the snippet icon as per creating a snippet. Once the snippet name input shows, start typing the name of an existing snippet to be able to select it for update.
- replaced main snippet input component with the labs component
- removed the feature flag and associated labs screen toggle
- removed original/labs snippet input conditional in the editor
refs https://github.com/TryGhost/Team/issues/954
- When an email-only post with a "sent" status was edited, it's status changed to "draft", which is an incorrect behavior. This change is causing the "sent" status to persist and removes the transition error.
refs https://github.com/TryGhost/Team/issues/884
Drop-to-upload functionality was lost in the first version of the new feature image uploader inside the main editor area, this adds it back in.
- fixed dropzone flickering issue by switching the event listeners to the capture rather than bubble phase so we can indicate a drag is occurring on the body without each individual drag/drop handler needing to know about it
- moved the event handler init/cleanup to the `ui` service
- moved the event handler init call to the application service as it no longer requires auth to have occurred for access to the labs flag setting
- removed the `featureImgDragDrop` labs flag
refs https://github.com/TryGhost/Team/issues/779
For draft posts the editor autosaves after each change but if you didn't see the "Saving..." indicator it wasn't clear what the save status of the post was. The editor will now always show "Saved" when there are no unsaved changes.
- removed indicator from published and scheduled posts because there's no autosave there
- removed the labs flag
no issue
- there was no need for the decorator as the class is up to date with Octane idioms after swapping `init()` for `constructor()`
- added a comment about the need for `member.get('id')`
no issues
refs https://github.com/emberjs/ember.js/issues/5566#issuecomment-429389165
Member deletion UI gets stuck in UI when deleted via these steps: View member list, filtered by label. Click on a member, delete them. Admin transitions back to previous screen before action is completed — deletion completes successfully but deletion UI hangs.
This happens due to a niche ember bug which causes transitions to abort when transitioning to a route with query params having `refreshModel:true`. The fix is simple one liner with return being separated from the route transition statement.
refs https://github.com/TryGhost/Team/issues/947
- With email-only posts there's a new "send" status that deserved it's own publishing action in the post publish menu. With with addition the post ended up having few more publishing states: publish, send, and publish&send. In addition to all this there's a "schedule" option. An addition of the "send" only select option there became a need to persist the "email_only" flag when the option was changed in the publish menu. Such persistance was not done before from the publishing menu and led a whole chain of additional methods being passed down from publishmenu component all the way down to distribution-action-select component
- At this moment only a happy path work properly when selecting one of the publishing options and publishing. More states will need to be handled for scheduled, unblished, etc. states of the post
refs https://github.com/TryGhost/Team/issues/947
- There is no way to "unpublish" the email-only post that has been sent already. For current alpha version the menu is hidden and up for further development when needed
refs https://github.com/TryGhost/Team/issues/986#issuecomment-900281186
The tiers features updated the "comped" functionality to no longer create a Stripe Subscription for members. Since theme developers expect comped members will have a subscription, we added a dummy subscription object for comped members in API.
Since Admin previously expected comped members to be ones without any subscription but access to product, this change updates Admin behavior to identify comped subscriptions on a product and show them the same way as before.
refs https://github.com/TryGhost/Team/issues/993
- added calls to `onFocus()` and `onBlur()` arguments inside the trigger when the input is focused/blurred so that the active class is correctly applied by ember-power-select
- removed unnecessary mousedown propagation cancellation, it was a copied from `<GhTokenInput>` where extra mouse handling is necessary for buttons inside tokens
- updated `.gh-input-with-select` styles to add the border when active
refs https://github.com/TryGhost/Team/issues/981
- saving a new or existing tier needed a hit on top right save on settings as well or it wasn't showing on the front-end. This change refreshes portal preview once a tier is saved from its modal window so that frontend can correctly reflect the right data immediately.
refs https://github.com/TryGhost/Team/issues/1009
- setting `tabIndex="-1"` on the trigger prevents the trigger container receiving focus rather than the container input element (fixes general tabbing in and out)
- added extra blur handling to the input element so that it is not left in an open dropdown state when tabbing out
refs https://github.com/TryGhost/Team/issues/947
- There is no need to use proxy objects in the newest versions of Ember. It's an old patterns that should not be perpetuated
refs https://github.com/TryGhost/Team/issues/947
- Added a "distribution" dropdown component to the post publish menu allowing to select from one of three available types of distribution: publish, poblush&send, and send
refs https://github.com/TryGhost/Team/issues/992
- within cards we sometimes want access to the `post` record so that UI or copy can be changed based on what is currently being edited
- added ability to pass `@cardOptions` through to the editor components
- fixed KoenigEditor not correctly assigning the `cardOptions` object to the `options` object that gets passed to every card when they are rendered
refs https://github.com/TryGhost/Team/issues/973
- added `@showCreate` option to `<GhInputWithSelect>` that enables the create option without having to pass a function in `@showCreateWhen`
- fixed autofocus not focusing input element in `<GhInputWithSelect>` when `autofocus="true"` isn't enough by itself
- updated `selectOrCreate` in `<GhInputWithSelect>` to trigger `onChange` if it's passed in rather than `onInput`
- swapped input in labs snippet input to `<GhInputWithSelect>`
- added actions for updating a snippet when an existing snippet is selected
- added action to editor control for saving an updated snippet
refs https://github.com/TryGhost/Team/issues/954
- The email icon is signalling there was a newsletter sent with the post and allows to identify the "email only" posts easier
no issue
- Koenig is making use of other Admin-provided components which meant that editor-specific styles for those components were increasingly needing to make use of `!important` to override those component styles (specific example is using power-select based components) due to the order that CSS was loaded
- Koenig styles don't really fit with the other generic utility classes inside spirit so it makes sense to elevate them to the same level as other component styles within Admin's CSS
closes https://github.com/TryGhost/Team/issues/903
- fixes multiple instances of "Specific tier" option in post access dropdown as main visibility list was getting modified on each load instead of using a separate instance
refs https://github.com/TryGhost/Team/issues/812
- adds default product(if none selected) to `portal_products` setting on Stripe connect, so when `Multiple tiers` are enabled there is always a default product selected for Portal
refs https://github.com/TryGhost/Team/issues/906
- The feature has moved to GA from behind alpha flag. It's skipping the beta phase as it's not needed in this specific situation
refs https://github.com/TryGhost/Team/issues/992
- swapped input element for `<GhInputWithSelect>`
- added `config.getSiteUrl()` method for generating front-end URLs including subdomain
- added example suggested URLs to email-cta card to pass as options to button url input
refs https://github.com/TryGhost/Team/issues/987
- `<GhInputWithSelect>` acts as a typical text input element but will also show options that are filtered whilst typing. Useful for inputs where there should be suggestions or the ability to choose an existing option
- updated `<GhSearchInput>` to use the renamed and slightly modified trigger
refs https://github.com/TryGhost/Team/issues/874
In the product benefits modal in Admin, hitting Enter has been updated to work as -
- when hit with focus in an empty benefit field: does nothing
- when hit with focus in any field outside benefit fields: does nothing
- add new benefit and focus on it when hit while on a non-empty benefit
refs https://github.com/TryGhost/Team/issues/912
- When email verification process is triggered "try again" CTA is not deireable
- The change also fixes refresh of imported members in the background
closes https://github.com/TryGhost/Team/issues/999
- Previous UX when the error popped up after the publish action was submitted was bad. Showing a warning and not allowing to send an email preembtively gives much better UX.
refs https://github.com/TryGhost/Team/issues/998
- posts have a new `email_only` property for an alpha feature but that is not a valid property for pages
- our pages model and serializers currently inherit from the post model/serializer so when saving the new property is triggering a "no additional properties" validation error
- updating the pages serializer to remove the new property means the pages add/edit API requests are valid again
refs https://github.com/TryGhost/Team/issues/994
Non-owner admin users have visibility of the "Connect with Stripe" UI in Admin, but lack permissions to setup the Stripe session in order to actually connect Stripe. This change patches the Portal settings UI by disabling Stripe Connect option for non-owner admins.
refs https://github.com/TryGhost/Team/issues/994
Non-owner admin users have visibility of the "Connect with Stripe" UI in Admin, but lack permissions to setup the Stripe session in order to actually connect Stripe. This leads to a dead-end with a raw JSON api response, which should never be the case. This change patches the UI by removing Stripe Connect paths for non-owner admins.
refs https://github.com/TryGhost/Team/issues/973
- we have more uses for an input-based trigger for a power select component so the rename prepares the input-based trigger we use for the site search for more general usage
- removed hardcoded search icon and class, they can be passed in as options via the `@extra` param
refs https://github.com/TryGhost/Team/issues/973
- adds feature flag and labs screen toggle for alpha feature that allows for replacing a snippet's contents without manually deleting and recreating
closes https://github.com/TryGhost/Team/issues/969
Wires the bulk action operation UI to Ghost API to perform operations on filtered member list - unsubscribe filtered members, add label to filtered members or remove label from filtered members
refs https://github.com/TryGhost/Team/issues/971
We use vertical-collection to allow infinite loading + scrolling for members list instead of loading and rendering all members at once. Since the members list behind filtering flag had a child container with fixed height, the list was not automatically loaded on scroll.
refs https://github.com/TryGhost/Team/issues/954
- The transition values wever missing for new "sent" email status and caused a 500 error to be displayed even though it had nothing to do with server errors
- There will be more tweaks to this in future iterations, this is a stop gap solution to have a working UI
refs https://github.com/TryGhost/Team/issues/954
- The URL for email-only posts is served with an `/email/` prefix, so it didn't make sense to show a regular URL in the PSM for such posts
closes https://github.com/TryGhost/Team/issues/965
If there's only one filter row in the members filter builder modal, then clicking on "X" in that row resets the fields instead of removing the complete row and showing empty filter builder
refs https://github.com/TryGhost/Team/issues/954
- This is a first iteration before replacing the status with an email icon in the future. It's meant to signal visually the current status instead of leaving it completely blank
refs https://github.com/TryGhost/Team/issues/947
- Before making a bigger changes - introducing an inline component with send/send&publish/publish dropdown, have made minimal copy changes to reflect what's about to happen after the publish menu submit button is pressed
refs https://github.com/TryGhost/Team/issues/947
- The toggle was missing an autosave, which was causing a confusing UX where the user had to remember to save the post before publishing.
refs https://github.com/TryGhost/Team/issues/969
A lot of power of filtering members comes from ability to perform actions on the filtered member list. This change adds bulk operation actions on the the UI to apply on filtered members, but has not wired them up to the API yet.
- adds unsubscribe bulk operation UI
- adds label addition bulk operation UI
- adds label removal bulk operation UI
- adds new single label selection UI for add/remove label to members UI
refs https://github.com/TryGhost/Team/issues/966
With introduction of members filtering, the current way of editing member labels needed an upgrade. This change updates the member label input component to include editing option which allows triggering label edit modal directly from the filtering menu when working with labels. The long term idea is to make this a consistent global pattern with labels dropdown, extending to member details screen as well.
refs https://github.com/TryGhost/Team/issues/943
The filter UI behind labs in Admin allows filtering members list across several filters. Since each filter type can have its own specific set of values to choose from, this change adds custom UI based on filter type to select filter value.
refs https://github.com/TryGhost/Team/issues/943
- adds new columns to member list table based on selected filters in UI
- handles dynamic columns in members list with formatted output like for labels
- works behind the filtering feature flag
closes https://github.com/TryGhost/Team/issues/950
- fixes the mrr value/chart on dashboard when a site has no new mrr events in more than 30 days shown as 0
- adds tests to cover more mrr event scenarios
no issue
- added free members to dashboard controller's count stats data
- moved email open rate chart into it's own dashboard box
- added free members count chart under paid members chart (where email open rate used to be)
refs https://github.com/TryGhost/Team/issues/943
- separates the new alpha members filtering to its own `-labs` component
- fixes behaviour for existing filtering feature on members list which was overwritten with last change
- updates up action handling to modern glimmer syntax
refs e25e36352d
Since the concat method does not change the existing array but instead returns a new array, the extra filters on the API query object were not being applied. The extra filter included filtering on `created_at` date for members which was not applied as the filter was not stored in the array correctly.
closes https://github.com/TryGhost/Team/issues/896
- Having this checkbox allows user to control posts email_only flag
- Also sets the post automatically to "public" when the email-only toggle is switched on as the access would be controlled form within email and not through the internal gatekeeping mechanism
no issue
- added `dashboardTwo` feature flag and labs screen toggle
- added `dashboard-labs` route with duplicated dashboard controller/template
- added redirect to `dashboard` route so it transitions to `dashboard-labs` when the feature is enabled
Refs https://github.com/TryGhost/Team/issues/928
- Added icons for top and bottom border
- Updated spacing for hr element when not in edit mode
- Got rid of hr element when in edit mode
- Got rid of left border for email, html and markdown cards and feature image
refs https://github.com/TryGhost/Team/issues/928
- added btn group for selecting left/center alignment of CTA button
- updated rendered view to center the button when center alignment is selected
refs https://github.com/TryGhost/Team/issues/928
- the background color of the button was incorrectly applied to the original accent colour rather than the adjusted accent color
- added adjustment of text color on hover too in case it went outside of a visible range
refs https://github.com/TryGhost/Team/issues/928
- we want to make use of the same color adjustments and contrast selection for accent colors we use in Admin on the server-side for emails so utility functions have been extracted to an external package
refs https://github.com/TryGhost/Team/issues/928
refs eed299d1f6
- usage of `color` was incorrect resulting in an infinite loop because the color was not being changed on each iteration
- `Color().lightness()` adjusts via percentage not exact number
- `Color().l()` does not return lightness
refs https://github.com/TryGhost/Team/issues/928
- switched to using `color` for color conversion and adjustments rather than maintaining our own limited utils (preparation to extract our own utils to separate library)
- changed contrast threshold for yiq-based contrast adjustment from `128` to `186` to match Portal's current behaviour
refs https://github.com/TryGhost/Team/issues/913
- Some limit errors don't contain a "details" property, in those cases the code should still execute instead of throwing an errors!
refs https://github.com/TryGhost/Team/issues/927
- the `email-cta` card can be segmented so only free or paid members can see the content, it should be possible for authors to preview what that will look like in either case
closes https://github.com/TryGhost/Team/issues/913
- When an error is returned from the server during a CSV import and it's because of the email freeze the import modal error has to show a special header along with error message
refs https://github.com/TryGhost/Team/issues/927
- button should be visible when not editing if both text and url are set
- added container for the content section so other links aren't clickable
- added tooltip to button so button url can be checked without having to go into edit mode
refs https://github.com/TryGhost/Team/issues/927
- added CTA `button and url inputs to email-cta card
- added `textColorForBackgroundColor` color util and used it to add a white/black text color variable that can be used when the accent color is used as a background color
- added `{{hex-adjust}}` helper for modifying lightness and saturation of a hex color
- adjusted inline power-select dropdown styling
refs https://github.com/TryGhost/Team/issues/927
- we'll soon need access to adjusted accent colours outside of the application controller so they're now available on the `ui` service
refs https://github.com/TryGhost/Team/issues/926
- updated `<KoenigEditor>` so it creates default card payloads as TrackedObject instances so that getters in glimmer component based cards can track changes to payload properties
- added dropdown free/paid selector to email-cta card that sets the `segment` payload property to the respective filter
- updated design to show the footer outside of edit mode too so that the selected segment is always visible
no issue
- `iconClass` was set to `gh-nav-logo-default` when first loading admin with the default icon
- when a new icon was uploaded the background style was changed but the class wasn't reset so continued to appear inverted
refs https://github.com/TryGhost/Team/issues/910
- segmented email content will be used for a new "Email-only CTA" card
- updated labs checkbox text to reflect what's actually being turned on/off
refs https://github.com/TryGhost/Team/issues/732
This fix is part of the broader design change we want in Admin, moving away from showing errors on focus out in fields with feels a little aggressive and instead change it to the default behaviour of showing errors when submitting the form. This change updates this behaviour for invite staff modal.
refs https://github.com/TryGhost/Team/issues/884
- add `[data-user-is-dragging]` to `body` element when any drag is occurring so that we can make drop zones active
- added dropzone and drop handling to feature image component
closes https://github.com/TryGhost/Team/issues/744
- we were using `{{on}}` with a function on the component that wasn't bound to `this` via the `action` decorator meaning errors were thrown every time the input lost focus
closes https://github.com/TryGhost/Team/issues/745
- `URL()` will throw when given something it doesn't understand. As `seoURL` is just a display property it doesn't matter, we can catch the error and do nothing
refs 8630be5a87
- referenced commit skipped current user and proxy service population when `skipAuthSuccessHandler` was set but the population is needed during setup
- `skipAuthSuccessHandler` is used for skipping the post-authentication transition rather than skipping all post-auth behaviour so the the post-auth behaviour was reintroduced but put in a guard so we don't try to do it again when it's already been run
refs 8630be5a87
- referenced commit introduced an early return when invalidating session on a failed ajax request so that error alerts weren't shown when re-authenticating. This had an unintended side-effect of breaking invalidation when not re-authenticating and redirecting to signin screen
closes https://github.com/TryGhost/Team/issues/865
Ghost now returns a forbidden error rather than an unauthorized error when saving whilst logged out so the session invalidation was not being triggered.
- added forbidden check to ajax service to trigger session invalidation
- added automatic retry of save in editor when re-authenticating
- fixed re-population of user and proxy services when re-authenticating, it's not needed at that point because nothing has been cleared
issue https://github.com/TryGhost/Team/issues/857
- The goal is to avoid testing for the owner role only is cases where we should be testing for the owner or admin role
- `isOwner` => `isOwnerOnly`
- `isAdmin` => `isAdminOnly`
- `isOwnerOrAdmin` => `isAdmin` (concerns now both Owner and Admins)
no issue
- converted publish menu and `gh-tags-list-item` components to glimmer syntax so data attributes can be passed in via `...attributes`
- added explicit `data-test-button` bound attribute to `gh-task-button` component
- moved `modal-theme-warnings` auto-bound data attribute from JS file to explicit html attribute in template
no issue
Having `session.user` return a promise made dealing with it in components difficult because you always had to remember it returned a promise rather than a model and had to handle the async behaviour. It also meant that you couldn't use any current user properties directly inside getters which made refactors to Glimmer/Octane idioms harder to reason about.
`session.user` was a cached computed property so it really made no sense for it to be a promise - it was loaded on first access and then always returned instantly but with a fulfilled promise rather than the underlying model.
Refactoring to a synchronous property that is loaded as part of the authentication flows (we load the current user to check that we're logged in - we may as well make use of that!) means one less thing to be aware of/remember and provides a nicer migration process to Glimmer components. As part of the refactor, the auth flows and pre-load of required data across other services was also simplified to make it easier to find and follow.
- refactored app setup and `session.user`
- added `session.populateUser()` that fetches a user model from the current user endpoint and sets it on `session.user`
- removed knowledge of app setup from the `cookie` authenticator and moved it into = `session.postAuthPreparation()`, this means we have the same post-authentication setup no matter which authenticator is used so we have more consistent behaviour in tests which don't use the `cookie` authenticator
- switched `session` service to native class syntax to get the expected `super()` behaviour
- updated `handleAuthentication()` so it populate's `session.user` and performs post-auth setup before transitioning (handles sign-in after app load)
- updated `application` route to remove duplicated knowledge of app preload behaviour that now lives in `session.postAuthPreparation()` (handles already-authed app load)
- removed out-of-date attempt at pre-loading data from setup controller as that's now handled automatically via `session.handleAuthentication`
- updated app code to not treat `session.user` as a promise
- predominant usage was router `beforeModel` hooks that transitioned users without valid permissions, this sets us up for an easier removal of the `current-user-settings` mixin in the future
- added max height to theme uploader modal container to avoid long list of errors leaning out of screen
- added shadow on top of footer to indicate long list of errors
refs https://github.com/TryGhost/Team/issues/779
- add "- Saved" to status text in editor when a post has no unsaved changes
- uses `savedIndicator` labs flag so we can test and tweak behaviour before go-live
no issue
- there can be cases where the connection fails but Ctrl/Cmd+S won't work as a direct retry (eg, publish fails so the status reverts, in that case Cmd+S would save a draft rather than re-attempt a publish)
- switched to a neutral "try again" message
no issue
- transitioning of all properties causes flickering when modals are animated in and out because the DOM elements are duplicated before fading out to account for Ember's component destruction
- applied same property transition list as used for `.gh-btn`
refs https://github.com/TryGhost/Team/issues/840
- added media queries so the image sizing doesn't take the sidebar width into account when it's acting as a popover rather than a sidebar
refs https://github.com/TryGhost/Team/issues/822
With multiple products flag we are re-enabling segmentation by product for posts. This change adds new segment option for post access option in post-settings menu, which allows option to choose specific products for post access.
- updates post settings and post settings labs menu to add new option for segment
- handles visibility filter changes for API based on selected segment
- the new behavior is behind the alpha flag for multiple products
refs https://github.com/TryGhost/Team/issues/822
The post access dropdown in the Post settings menu and default access settings should not show the default segments as we only allow segmenting on specific products.
refs https://github.com/TryGhost/Team/issues/803
With multiple products we'll re-enable segmentation by product for posts, which also means need to add a new option to the default post access setting in Membership settings. This change -
- adds new `A segment` option to default post access dropdown behind the alpha flag for multiple products
- shows member segment select dropdown for `A segment` option
- handles update of `defaultContentVisibility` to allow setting custom filter
refs https://github.com/TryGhost/Team/issues/849
Multiple products alpha feature brings back segmented post access using products. The new visibility filter based on segments is returned in a separate `visibility_filter` property on post/page API