refs https://github.com/TryGhost/Team/issues/1303
- added rudimentary styling to the new onboarding modal
- added in three new icons to go with the new modal
- added the styling to the main.css for the moment
refs https://github.com/TryGhost/Team/issues/1252
- on stripe disconnect, the prices on tiers are deleted, which causes the archive/unarchive on them to fail in admin
- this change removes the archive/activate option for such tiers, which will get properly cleaned up once we start removing tiers on stripe disconnect
refs https://github.com/TryGhost/Team/issues/1252
- enables available tiers list for portal in case of a single tier as well, which was previously hidden
- allows site owners to enable a tier again for Portal if it was archived in past
no refs
- in an edge-case scenario, if an offer is using a tier with missing price, it will not throw an error because of lack of price
- this case will be auto-handled once we delete all existing offers in future on stripe disconnect
refs https://github.com/TryGhost/Team/issues/1295
- moved `?firstStart` query param handling into `'home'` route as it seemed like a preferable location
- switched to using `resetController` hook to manage removal of query param which seemed more reliable than the transition approach
- added `firstStart` query param to the transitions when completing step 3 of the setup flow
Updates Admin UX for Contributors
When logged in as a Contributor:
- removes sidebar, added floating account menu and dark-mode switch to right side. Updated mobile menu accordingly
- all post by the given user is listed in the Post list
- changed post filtering
- hides email columns in post list
- removes publishmenu for Contributors in Post preview modal
- visual tweaks
refs: https://github.com/TryGhost/Team/issues/1277
- added a z-index to fix breadcrumbs when filters overlap
- made the scrolling list longer on the member activity page to remove gap
refs https://github.com/TryGhost/Admin/pull/2227
- in the switch to native class syntax the `super()` calls for click handlers in the `<GhDropdown>` and `<GhDropdownButton>` components were lost, meaning the event propagation was not cancelled by the DropdownMixin's `click()` handler resulting in the click-to-open being immediately undone by the body click-to-close
no issue
- if a member has no name when they are selected on the member activity screen we weren't showing anything in the header breadcrumbs or member filter
- switched to showing name or email
no issue
- ran [ember-native-class-codemod](https://github.com/ember-codemods/ember-native-class-codemod) to convert the majority of remaining EmberObject based controllers and components to native class syntax using the `@classic` decorator
- skipped older style modal components (`components/modal-*.js`) due to observed incompatibilities in some cases
refs TryGhost/Team#1071
Specific tier visibility for a post was previously stored in `visibility` column directly, which had a limitation of 50 charts. Going forward, for the specific tiers visibility of post/page, we use `tiers` array in API that contains list of tiers with access for post. This change -
- replaces `filter` type to `tiers` for visibility
- adds new visibility filter segment component in post settings menu which stores array of tiers instead of nql string for visibility
- updates serializer and model for post/page
- updates tests
refs https://github.com/TryGhost/Team/issues/1252
- allows site owners to (un)archive existing tiers via Admin UI
- adds option to switch between archived or active tiers view
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
refs https://github.com/TryGhost/Team/issues/1294
- added `dashboardHideGettingStarted` feature flag that uses the `user.accessibility` JSON blob
- added `{{toggle-feature}}` helper which returns a function that can be used with the `{{on}}` helper to toggle a feature flag on or off from templates
- hooked up the dismiss behaviour for the dashboard widget using the `toggle-feature` helper
- hid the dashboard when `dashboardHideGettingStarted` feature is enabled
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Admin/pull/2227
- updated modal component to use newer ember-promise-modals modals implementation
- removed use of "delayedColor" properties as the workaround for liquid-fire based animation is no longer required
- added `validate` action to remove need for `{{action}}` - we can't call the `validate()` method directly from the template because it's not bound correctly with `@action` and binding it breaks other code that expects `_super()` for the validate method to work via the mixin (eg, staff invite modal)
- removed `customViews.toggleFormModal()`` and changed `customViews.editView()` to open the modal directly
- updated templates to use `{{on "click" this.customViews.editView}}` in place of toggling the "showFormModal" property
refs https://github.com/TryGhost/Team/issues/1168
This allows users to set the welcome page url on a tier by tier basis
rather than globally for all paid tiers or all free tiers.
No issue
- When disabling email newsletters, the "Subscribed to email" toggle in the member profile is hidden
- Copy changes to the Default newsletter recipients setting
- Moved tiers to the top of the segment selection in Default newsletter recipients
refs https://github.com/TryGhost/Team/issues/1290
- added `{{members-event-filter}}` helper that can be used to build an event filter string that will always exclude email events when the newsletter is disabled
- useful when used in conjunction with `{{members-event-fetcher}}` because the filter is automatically adjusted for you without needing additional logic or JS backing files for components
- updated dashboard and member screen activity widgets to use `{{members-event-filter}}`
- updated members-activity screen
- updated to use `{{members-activity-filter}}` helper in the template which allowed for removal of filter generation in the controller
- changed `@hideMemberOnlyEvents` to `@hiddenEvents` on `<MembersActivity::EventTypeFilter>` so that we can control which events are available in the filter based on newsletter enable/disable and presence of a filtered member
refs https://github.com/TryGhost/Team/issues/1290
- when set to `false` prevents the dropdown opening when it would only contain the "Type to search" message
- uses the `@extra` hash param. Would be preferable to be able to use `@searchMessage=""` but ember power select doesn't pass the searchMessage argument through to the trigger
refs https://github.com/TryGhost/Team/issues/1277
- added new selected style to filters for activity
- added new subscription icon for filters for activity
- added in the GhMembersAvatar to events row
- fixed the green link for activity mini-view
refs https://github.com/TryGhost/Team/issues/1290
- when the activity feed labs flag is enabled
- hide top members widget
- increase number of events in activity widget from 5 to 10
refs https://github.com/TryGhost/Team/issues/1290
- switched to using our `gh-input-with-select/trigger` power select trigger to get a search input with select
- kept the replacement with a button once a selection is made for easier clearing of the selection
refs https://github.com/TryGhost/Team/issues/1277
- changed breadcrumb for activity
- added back in three columns for activity when not filtered
- made adjustments to visual look and feel
no issue
- it should be possible to pass a POJO rather than an EmberObject object so the component is usable with raw data like we have with member events
- switched to using `get()` rather than assuming the passed in object has it's own `.get()` method
refs https://github.com/TryGhost/Team/issues/1290
- renamed `@updateExcludedEvents` to `@onChange` and updated associated action name so we have consistent naming for our select-like components
- added `<MembersActivity::MemberFilter>` component
- utilises `<PowerSelect>` with a custom trigger component and and a debounced search via the member's API
- does not use `<PowerSelect>`'s default "selected" behaviour in favor of replacing the select with a button to provide a clearer "reset filter" UX that's easier to build/style outside of the power-select components
- added `.ember-power-select-trigger-reset` class to reset margins, paddings, borders, and heights so that it's easier for a custom trigger's contents to control the display
Updated email newsletter settings
- Added toggle to disable email newsletters
- Hides email related UI when email is completely turned off
- Rearranged email newsletter settings
- Added publish-menu preview in
- Changed default-recipients setting
- Updated publish-menu to show Publish as default action
- Removed the confirmation modal during publishing when no emails are intended to be sent
No issue
- Authors don't need access to staff page and don't need to see breadcrumbs on their profile page
- There's enough space in the side navigation for the post views to be visible by default
refs https://github.com/TryGhost/Team/issues/1277
- removed inclusion of `email_recipients` in member query when fetching member for display on the member details screen as it was only used for the activity feed
- added `<Member::ActivityFeed>` template-only component as a replacement for `<GhMemberActivityFeed>`
- uses `members-event-fetcher` resource for consistency with main activity feed and dashboard widget. Allows for a template-only component because data fetching behaviour can be managed directly from the template rather than requiring a backing component
no refs
- updates unarchive task method used on enter key for the unarchive offer popup
- wrong method was causing the enter key to not unarchive the offer as expected
refs https://github.com/TryGhost/Team/issues/1277
- switched to using the `<GhLoadingSpinner />` component as it has a 200ms delay before it's shown to avoid flashing on fast data changes
refs https://github.com/TryGhost/Team/issues/1277
- removed nav item in favor of links only from the dashboard and member details screens
- added params reset to the dashboard link so you don't unexpectedly land back on a member-specific events list
- updated the members activity screen header so it's clearer this is a sub-section of members
refs https://github.com/TryGhost/Team/issues/1277
- extracted member details display into a `<GhMemberDetails>` component for re-use in the member details and members-activity screens
- added loading of member record from the member id query param and displayed the member details above the table when a member filter is present
- hid the member column in the events table when a member filter is present
- it's useless/repeated info at that point
refs https://github.com/TryGhost/Team/issues/1277
- used the `<GhEmailPreviewLink>` component to display the email's subject inside the activity feed that when clicked opens the email preview modal
refs 21f2a58a8a
- passed in arg is `@data` not `@email` because it can be an email or post object
- added `~` handlebars syntax to collapse white-space so links can be surrounded by other chars without spaces being visible, eg `"<GhEmailPreviewLink />"`
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Team/issues/1277
- switched modal implementation to the newer promise-modal style
- added `<GhEmailPreviewLink>` component that renders a link that when clicked opens the modal
- removes the need for templates/controllers to manually handle modal opening/closing and to pass actions down from parents
- updated all places we were triggering an email preview modal to use `<GhEmailPreviewLink>`
refs https://github.com/TryGhost/Team/issues/1277
- added `member` query param that expects a member ID
- using an ID as it makes the filtering simpler than using an email because there is no async member fetching required
- updated `filter` generation to build `type` and `member` parts and combine them in an AND query
- updated link in member screen to use a `member` param rather than a `filter` param
- resets any `excludedEvents` param so all events for the member will be shown when following link from member->members-activity
refs https://github.com/TryGhost/Team/issues/1277
- moved event parsing from a component to a helper
- keeps code as a plain function
- allows for per-event parsing which helps with rendering as we're not rebuilding/re-rendering a whole array each time the events data changes when a new page is loaded
- updated to include full member and email objects (will be used later for email preview popup)
- updated members-activity table row component to use the event parser helper for better event details
refs https://github.com/TryGhost/Team/issues/1277
- we were inadvertently adding an empty string to the excluded events set resulting in a trailing comma in the filter string (`type:-[x,y,z,]`)
refs https://github.com/TryGhost/Team/issues/1290
- added an explicit `current-when="members-activity"` so the active class is not tied to the default behaviour of matching specific query params
refs https://github.com/TryGhost/Team/issues/1290
- changed query param from `filter` to `excludedEvents`
- exposing filter directly creates problems converting back to NQL after parsing+modifying the query
- removes suggestion that raw NQL can be manipulated by editing the URL
- allows us to use a set of well-defined query params to build the underlying filter string from scratch each time a query param changes
- added `<MemberActivity::EventTypeFilter>` that renders a filter button with a dropdown containing a checkbox for each event type
- if no `member` property is set on the members-activity controller (soon to be another query param) any email event types are hidden because the API can't currently paginate those correctly and in any case they would drown out any other type of event
refs https://github.com/TryGhost/Team/issues/1277
- using `<= created_at` requires client-side deduplication to prevent the same records appearing in the next page
- using `< created_at` does result in a possibility of records being missed between pages with the API's current pagination behaviour if many events occur within the same second but for our current requirements (no email events shown unless filtering by specific member) that is edge-case enough that simplified client code is preferable
refs https://github.com/TryGhost/Team/issues/1277
- fetching member event data is now handled by the `members-event-fetcher` resource as that gives better ergonomics for data loading in templates
refs https://github.com/TryGhost/Team/issues/1277
- re-uses same fetcher resource used on member activities screen
- allows for component to be simplified as it no longer needs to care about handling data loading itself
- drops use of 1-minute data caching as there is no real need for it in typical usage and can be confusing when the dashboard didn't update as expected
- exposed error message on `members-event-fetcher` if one is encountered
refs https://github.com/TryGhost/Team/issues/1277
- added `ember-could-get-used-to-this` dependency to get access to Resources
- context: https://www.pzuraq.com/introducing-use/
- added MembersEventFetcher resource for loading members events
- using a Resource allows for a better data loading experience using only components
- uses raw data from the API rather than going through Ember Data because we don't need full models or session-length caching that gives us
- data is kept around in memory for the lifecycle of the resource, if the `filter` param changes the resource is torn down and recreated so it starts from page 1 again, once it's no longer used by a component it's torn down so data isn't kept around
- paginates by using a `created_at:<={lastSeenTimestamp}` filter - this assumes the API can handle that effectively as a cursor with no duplicate or skipped records
- updated `members-activity` template to use the new resource and control data loading using infinite scroll
- moved overall screen structure from the `<MembersActivity::Table>` component into the `members-activity` template so that the table component can stay focused on just the table display
no issue
- many "The automatic session initialization is deprecated" were shown in test output due to an old method of initializing the session service
- switched to explicit session setup in the application route's `beforeModel` hook
- https://github.com/simplabs/ember-simple-auth/issues/2314
no issue
- bumped `ember-source`, `ember-data`, and `ember-cli` to latest 3.22.x versions
- fixed errors caused by updating properties inside of a render
- `<GhPublishMenu>` removed insta-call of `@setSaveType` when rendering sub-components in favour of pre-setting the default `@saveType` value when the underlying post status changes
- updated `<GhNavMenu>` to use the run-loop to update the `firstRender` property once rendering has finished rather than mid-render
no issue
- part of ember upgrades
- removed all unnecessary usage of `.get`
- cleaned up imports where we had imports from the same module across multiple lines
- standardized on importing specific computed helpers rather than using `computed.foo`
- switched tests from using `wait()` to `settled()`
refs https://github.com/TryGhost/Team/issues/1277
- if email events were passed through the parser they had blank actions and objects
- added `opened`, `received`, and `failed to receive` actions for email events
- changed object to equal `an email` for any email events
refs https://github.com/TryGhost/Team/issues/1277
- `data-cache` service has a `.set(key, data, lifetime)` method that will store the data under the key and sets a timeout that will remove the data when the lifetime expires
- data can be retrieved with `.get(key)`
- allows for components to cache data for use when re-rendering without having to worry about keeping track of their state and it's expiration manually somewhere else
- moved caching concern out of the `members-activity` service and into the latest-member-activity dashboard component which is the one that cares about it's data and cache lifetime
- frees the `members-activity` service up to be more generic as it's no longer tied to the dashboard component's concerns
- component switched to using a task rather than a promise so it is automatically cancelled if it's destroyed before data fetching is complete
no issue
- we want to re-use this component as display-only on the email newsletter settings screen but the previous component design meant that changes to the `@filter` argument did not update the display
- moved to using getters for the internal base/specific filter Set instances so they are auto-updated when the `args.filter` param changes
- updated the `toggleSpecificFilter` action to store the current specific filter as temporary internal state when toggled off so it can be re-filled when toggling back on
- this interaction was why the component state had previously been disconnected from the `@filter` param
- moved filter string generation into an explicit `updateFilter` method that is called when any action occurs that should update the filter string. Changes to the filters are passed in as arguments so that we call the passed in action which will then update the `@filter` argument and the component state can react accordingly
refs https://github.com/TryGhost/Team/issues/1277
- renamed `<GhActivityTimeline>` to `<GhMemberActivityEventParser>` and modified so that it yields parsed events rather than directly renders them
- makes the component re-usable as it can be used to decorate raw events ready for use in context-specific templates
- switches to using a getter to yield the parsed events so that they will update automatically when the `@events` argument changes
- updated `<Dashboard::LatestMemberActivity>` to use `<GhMemberActivityEventParser>` and keep the member activity box output local to itself
- added integration tests for `<Dashboard::LatestMemberActivity>`
- added Mirage setup for member activity event models/serializers/route
refs https://github.com/TryGhost/Team/issues/1277
- first step of further refactoring to make member activity display more generic
- separates component data loading from overall controller logic and allows it to be tested in integration tests as well as acceptance tests
refs https://github.com/TryGhost/Team/issues/1277
- pulled timeline fetching from `members-stats` service to `members-activity` service ready for further refactoring to make fetching/processing more generic
refs https://github.com/TryGhost/Toolbox/issues/175
- both cases now show the same message so I've reverted back to
returning a boolean indicating whether it should be shown
- also pulls out the check for Pro so the if-statements are easier to
read
no refs
- price amount formatting was incorrectly calling `toFixed` method on a string, which is not needed as we already round off the amount before formatting
refs https://github.com/TryGhost/Toolbox/issues/175
refs c4083967df
- the referenced commit added a warning message to the What's New page
to notify the user that we're going to be requiring MySQL 8 in
production as of v5
- this would also show if the user was already using MySQL 8, which
isn't ideal
- I've added a library to Ghost which will return the specific version
of MySQL used, so we can now detect that
- eb68e8d339 has updated the config endpoint to return `mysql5`, `mysql8` etc,
so we can now change the logic here to reflect that
- this commit also adds another warning if we're in development mode and
using mysql5, as this will not be supported as of v5
refs https://github.com/TryGhost/Team/issues/1277
- added `/members-activity` route with associated controller, template, and components behind labs flag
- table component currently renders some dummy rows
- added navigation item to main menu
- will use the currently set `?filter` query param unless clicked whilst already on the `/members-activity` screen in which case it will reset the query
- added link to dashboard members activity panel
- added link to member details activity panel
- sets the filter param to `?filter=member:{member.id}` in preparation for the feed to be filtered to the member's activity
- updated the labs-flag test helper file to export both `enableLabsFlag()` and the new `disableLabsFlag()` so it's easier to test for flag-disabled functionality
- adjusted min and max widths of various elements in audio card in What's New only to stop it from visually breaking when at specific viewport widths
- quick fixes for z-index of certain elements across cards in What's New only so they didn't appear above the page header
refs https://github.com/TryGhost/Team/issues/1277
- used for prototyping a separate activity feed screen that can show all members activity, combining the events shown in the dashboard with the email events shown on the member screen
no issue
- ran the `ember-native-class-codemod` codemod to convert just the route classes to native class syntax and performed some minor manual cleanup
- modern Ember uses native classes rather than EmberObject-based objects, this brings us closer to normalizing our code style across the codebase
- skipped the Application route as that requires deeper testing with a replacement for the `ShortcutsRoute` mixin
no issue
- mixins are deprecated in Ember so we want to remove their usage
- pre-requisite for easier automation for switching to native class syntax
- removed ShortcutsRoute mixin in favor of using the `{{on-key}}` modifier and standard controller action
no issue
- mixins are deprecated in Ember so we want to remove their usage
- pre-requisite for easier automation for switching to native class syntax
- removed ShortcutsRoute mixin in favor of using the `{{on-key}}` modifier and standard controller action
no issue
Mixins are deprecated in Ember so we want to remove their usage. The `CurrentUserSettings` mixin was used in Route files to provide `transitionAuthor()` (that also transitions contributors) and `transitionEditor()` methods so the the consuming route could use them to prevent access to authors/editors. In practice the only reason this was used was to prevent access to admin-only routes.
- added an `AdminRoute` class that inherits from our `AuthenticatedRoute` class
- when any route inherits from this class it will only allow access to admins and owners, any other user will be redirected to the home screen (dashboard or site depending on permissions)
- updated all of our admin-only routes to use the new `AdminRoute`
- allowed for removal of `CurrentUserSettings` mixin usage
- allowed for `beforeModel()` hooks to be removed from consuming routes in many cases
- some admin-only routes were extending/inheriting directly from Ember's `Route` based on the assumption that the router hierarchy would have a parent route perform the redirect. Those have also been switched to `AdminRoute` for consistency and to prevent accidentally making them available if the router hierarchy changes
- `/#/settings` does not use the `AdminRoute` so that it can redirect to the current user's setting page for non-admin users
- removed `CurrentUserSettings` mixin file
- cleaned up unnecessary computed property and function used for redirect-when-disabled in the Zapier route
no issue
- the controllers and templates for the old theme setting screens have been removed already but the route files had been missed in the cleanup
no issue
- Ghost 5.0 will require MySQL 8 when running in production so we've added a warning to the whats new/about screen to give some visibility for self-hosters to prepare
- updated `whatsnew` controller to native class syntax
no issue
- the branding modal was a hangover from before the design settings screen that hadn't been fully removed after the newer settings screen was released
refs https://github.com/TryGhost/Team/issues/559
- switched to new ember-promise-modals pattern
- removed controller and template in favor of opening modals directly from the route
- removed unused `mousedown` event handlers - they are only necessary when an input blur would trigger validation errors
- fixed Enter key not triggering create action by adding an `{{on-key "Enter"}}` event handler to the name input
- fixed scroll not resetting to top of integrations screens when navigating between them by adding `{{scroll-top}}` element modifier to the main content sections
refs https://github.com/TryGhost/Team/issues/559
- switched to new ember-promise-modals pattern
- simplified `willTransition` handling because we can now wait on the promise returned from opening the modal
- the modal content was changed to use `{{on "click" (fn @close true)}}` on the "leave" button so we can check for that return value for leave confirmation
refs https://github.com/TryGhost/Team/issues/559
- changed modal to use new modal pattern
- fixes padding jump when opening due to improved animation behaviour not using duplicated elements
no issue
- offer-related modals were split across the top-level `modals` directory and the `modals/offers` directory
- normalized to the `modals/offers` directory
no issue
- converted component to glimmer component and native class syntax
- reduced duplication by adding a description of each searchable model that is then used for data loading and searching
- removed convoluted use of computed properties as they weren't needed - the result of the search function is used by `<PowerSelect>` directly so we don't need any tracking/automated re-rendering
refs https://github.com/TryGhost/Team/issues/1270
- Zapier template links for example pre-built templates were broken due to a bug with Zapier
- updates links to use new zap creation template link which works
- double scrollbars showing at certain widths
- strange resizing of search members text box
- borders showing through when scrolling
- tidying table horizontal scrolling when viewport is narrower
refs https://github.com/TryGhost/Admin/pull/2041
- the pretender upgrade highlighted an issue with the component's progress event handler where it could fire and attempt to set the progress property after the component has been destroyed
no issue
- the members query reset was using `""` rather than `null` due to a bug in an old version of search/filtering but that meant we could end up with an empty param
- switched to `null` as it no longer appears necessary to use a blank string, this matches behaviour of other params
no issue
- after importing members a filter is applied to the members list only shows imported members
- the query param used for this was still using an old format which correctly updated the list but meant that the filter selection UI was left in a bad state that didn't correctly show the selected label or allow easy clearing of the bad filter
closes https://github.com/TryGhost/Team/issues/1265
- we were generating the correct query params for the export endpoint but those query params weren't applied to the export URL before fetching it meaning the default GET behaviour of listing first 15 members was always being used when generating the backup CSV
no issue
- after clicking the "Publish and send" button in the publish confirmation modal the post is saved and an email is created which caused the wording to change to automatically switch to the "publish only" state because posts with existing emails can't be sent again
- changed the wording-choice data to be set statically based on data available when the modal is triggered rather than auto-updated based on overall system state
refs https://github.com/TryGhost/Team/issues/1164
- removed flag and labs screen toggle
- removed all conditionals
- removed all old/unused route/controller/component files
- renamed labs components and classes to non-labs naming
refs https://github.com/TryGhost/Team/issues/1253
Using text-align: left will shift our cursor to the left of the editor,
but this does not match up with the placeholder text, so we need to use
media queries and some CSS calculations for that.
Zimo did the CSS magics for this
refs https://github.com/TryGhost/Team/issues/1249
When images are used which do not fill the space of the card - e.g. when
using a fullwidth card the slider is positioned to the left and doesn't
look good.
refs https://github.com/TryGhost/Team/issues/1249
This adds a WIP for the Before/After card UI - behind an alpha flag.
It's completely missing design input and is intented to serve as a base
to work from.
no-issue
If the onUploadStart or onUploadSuccess methods error, and the error
does not contain a payload property then we recieve an opaque error
message which can be difficult to understand.
no-issue
Currently the onUploadSuccess and onUploadFailure have no way to
identify which upload has succeeded or failed other than the filename.
However the filename is not guaranteed to be unqiue, so this can cause
bugs.
refs https://github.com/TryGhost/Team/issues/1229
- changed the video card image so it uses an aspect-ratio box set to the aspect ratio of the video, with the image using `object-fit: cover` to match the background image behavior in the front-end
refs https://github.com/TryGhost/Team/issues/1245
- Used onmouseover because a CSS-only approach wouldn't work
- CSS can only highligh next siblings on hover, while we want to highlight previous sibling in our case
- This adds a hover class on mouseover to the right stars and removes it onmouseout
refs https://github.com/TryGhost/Team/issues/1239
Repeatedly clicking the quote icon in the editor toolbar or using the <kbd>Ctrl+Q</kbd> keyboard shortcut will cycle through standard-blockquote -> alternative-blockquot -> standard paragraph.
no issue
- when buttons and button-like links were mixed in a modal footer, the link did not inherit the expected button styles and if the link followed a button the two became smushed together because of missing left margins
no issue
- the upgrade button is a link rather than a button so was not triggering the modal's close behaviour
- added an `{{on "click" @close}}` handler to the link. `@close` does not preventDefault so the link's transition will still occur
refs https://github.com/TryGhost/Team/issues/1169
Previously we were only showing a confirmation dialog if a publish action would trigger an email which was inconsistent and did not instil confidence when publishing.
- replaced old `modal-confirm-email-send` modal with the newer-style `modals/editor/confirm-publish` component
- updated to handle standard publish in addition to email publish
- updated copy
- added "error" state when attempting to send email-only post to no members
- updated publish menu `save` task to open the confirm modal when going from `draft` to `published` or `scheduled`
- underlying save with email polling moved to `_saveTask` so it can be re-used across `save` task (when not publishing) and when confirming from the modal
refs https://github.com/TryGhost/Team/issues/1001
Our email newsletter preview is rendered inside of an iframe with
javascript disabled. When opening links from the preview, the new
window/tab inherits this property - which breaks links to twitter.
refs https://github.com/TryGhost/Team/issues/1245
- Moved away from using only checkboxes and css because we need to use SVGs to display the stars
- Made it simple to keep CSS to the minimum and enable flexibility
no-issue
We now calculate whether or not a flag is enabled on the server, so this
extra check is redundant. It also means that when we promote a flag to
GA on the server this check will still take places, meaning that we need
to make two commits to promote a flag to GA.
refs https://github.com/TryGhost/Team/issues/1225
When inserted opens a searchable gif selector, creating an image card when a gif is chosen.
Includes keyboard navigation once open:
- `Tab`/`Shift+Tab` cycles highlighted gif through search result order
- `Up` / `Down` / `Left` / `Right` moves highlight in the respective direction
- `Enter` inserts highlighted gif
For the gifs card to be activated it's necessary to add a Tenor API key (obtained freely from https://tenor.com/gifapi) via your config.production.json file:
```
...
"tenor": {
"publicReadOnlyApiKey": "YOUR_KEY"
}
}
```
closes https://github.com/TryGhost/Team/issues/1246
- offer screen filters out invalid tiers (without prices) in the dropdown as tiers lose their prices on stripe disconnect/reconnect
- this is a temporary user facing workaround till we start removing offer data on stripe disconnect which will solve this properly
refs https://github.com/TryGhost/Team/issues/1169
We want all publish actions to trigger a confirmation modal. Currently that confirmation modal is controlled by `<GhPublishmenu>` which made it difficult to use from the route-induced publish shortcut.
- removed old shortcut mixin approach from the editor route
- added modern keyboard handler to a hidden element that is rendered any time the publish menu is present
no refs
By default, the uploader component was always using the `post` method to make upload calls for the files. Since some usecases like uploading media thumbnails need a different request method like `put`, this change allows overriding the request method used in upload.
refs https://github.com/TryGhost/Team/issues/1245
- This is a proof-of-concept as there are so many ways to implement a star-rating component
- The component is only available when editing the product card
- Uses the unicode star character: ★
- The inspiration is an old article from Lea Verou: https://lea.verou.me/2011/08/accessible-star-rating-widget-with-pure-css/ (minus the clever use of :not(:checked) on something that's not an input to filter-out IE)
- There is currently no way to remove the star rating as it'll get designed this week
refs https://github.com/TryGhost/Team/issues/1225
When the gif selector is activated we want to scroll as much of the picker into view as possible.
- updated `scroll-into-view` modifier so it can work on bounding rects as well as offsets for those situations where a scroll parent is not the offset parent
- only implemented "off bottom" behavior for now as that's all we need for this use-case
- if the scroll adjustment would mean the top is cut off we readjust so that the top of the element is always visible
refs https://github.com/TryGhost/Team/issues/1237#issuecomment-981770688
- API key names for external services now follow a standard pattern
- top-level key of the service name
- public/private and read/write perms inside the name, eg. `publicReadOnlyApiKey`
- updated test to match expected API key name
refs https://github.com/TryGhost/Team/issues/1225
- `TAB` / `SHIFT+TAB` now cycle through gifs in the search return order. It means the highlight gif will not always be in the next column over but it drastically reduces the vertical scroll jumping
- `LEFT` / `RIGHT` now select the gif to the left/right that visually lines up with the top third of the currently highlighted gif and will stop at the grid edges. The result is `UP` / `DOWN` / `LEFT` / `RIGHT` act more like spatial navigation with no unexpected scroll jumps
- switching to only storing the highlighted gif and relying on indexes added to each gif by the `tenor` service when assigning to columns means that column number changes when resizing the viewport are automatically handled
refs https://github.com/TryGhost/Team/issues/1225
- added `scroll-into-view` modifier that will scroll an element into view putting it at the top or bottom of the viewport depending on which direction scroll is required
- used the `scroll-into-view` modifier to scroll the highlighted gif into view
refs https://github.com/TryGhost/Team/issues/1225
Behaviour:
- `TAB`
- highlights first gif if pressed whist search has focus
- moves highlight to right, wrapping to next row, stops at final gif
- `SHIFT+TAB`
- moves highlight to the left, wrapping to previous row
- focuses the search bar if pressed whilst first gif is highlighted
- `ENTER`
- highlights first gif if pressed whilst search has focus
- inserts the highlighted gif
- `UP`
- moves highlight up through current column
- focuses the search bar if pressed when gif in top row is highlighted
- `DOWN`
- highlights first gif if pressed whilst search has focus
- moves highlight down through current column, stops at final gif in column
- `LEFT`
- moves highlight to the left, wrapping to previous row
- focuses the search bar if pressed whilst first gif is highlighted
- `RIGHT`
- moves highlight to the right, wrapping to next row, stops at final gif
refs https://github.com/TryGhost/Team/issues/1225
- iterations of earlier approaches (modal-image-selector, and kg-media-selector) for the gif selector were kept around whilst we narrowed down the interaction patterns, we've settled on the inline-image-selector pattern introduced in 3f3b66b668 meaning the others are no longer needed
refs https://github.com/TryGhost/Team/issues/1236
Stripe allows coupon names to be only upto 40 chars long, while Ghost allowed them to be 191 chars. This change updates the admin validation to restrict name to 40 chars to match Stripe limit
refs https://github.com/TryGhost/Team/issues/1225
- when opening the media selector and the bottom is cut off, scroll the whole selector into view so it's bottom is 20px away from the viewport bottom
- if the adjusted scroll would hide the top of the selector, make sure the top is 20px from the viewport top leaving the bottom cut off
refs https://github.com/TryGhost/Team/issues/1225
Re-using the existing pattern of creating an image card and having it launch an image selector was proving to have a lot of edge cases when we wanted a more streamlined in-line image selector for gifs.
- added a new `'selector'` type to card definitions
- requires a `selectorComponent` argument that is the name of a component that renders the media and handles search
- updated card components to open the selector component when respective menu item is activated
- updated slash menu to instantly trigger the selector component when the slash command matches a card and is followed by a space so that searches continue inside the selector
- added `<KoenigMediaSelector>` component that wraps the card-definition provided component and handles escape key, clicks outside of the editor, and provides a stripped down API to the child component for selecting/closing
- added `<KoenigMediaSelectorTenor>` which mostly replicates the `<GhTenor>` component but has different styling and uses the provided media selector API
no issue
- fixed typo in the install-theme modal that meant we weren't correctly identifying Casper as the default theme meaning an attempt to install it was made instead of activating it
refs https://github.com/TryGhost/Team/issues/1121
Double-clicking the delete button in the confirmation modal could trigger a second attempt to delete the post/page when it had already been deleted resulting in an ugly/incomprehensible error bubbling up.
- added `{drop:true}` to the task instance so it can't be called again whilst it's currently running
- added a guard for `isDeleted` so we don't attempt to destroy an already deleted record
- added a `true` return so the button indicates a successful state rather than an error state whilst the modal is closing
refs https://github.com/TryGhost/Team/issues/1217
- tenor API config is now an object that lives at `config.tenor`
- updated gifs card gating to use the new config object
- added passthrough of `contentfilter` param from config when making Tenor API requests
Refs https://github.com/TryGhost/Team/issues/1206
- Replaced background and swatch colors to semi-transparent so that it works with light and dark mode
- Updated emoji-picker dark mode
- Removed text contrast adjustment for accent background
refs https://github.com/TryGhost/Team/issues/1206
- Re-use the saved emoji as the default for future callout cards
- Introduced a localstorage util that ignores errors. Ignoring errors avoids issues with browsers that don't support localstorage
no issue
- the front-end only supports white text on accent color backgrounds so we shouldn't have any auto contrast selection for text in Admin for consistency and to give a hint that a chosen accent color is too light
closes https://github.com/TryGhost/Team/issues/1223
It's possible to disable the Unsplash integration from the integration settings but when disabled the image selector was still available for post feature images and as an editor embed option.
- adds `isAvailable` property to card definitions, if it's set it should be a string that matches a config/setting that determines the card's availability
- unsplash card updated to use `'settings.unsplash'` as it's `isAvailable` property
- adds conditional to `<GhEditorFeatureImage>` so the Unsplash selector is only shown when enabled to bring it inline with the `<GhImageUploader>` component that was used previously for post feature images
refs https://github.com/TryGhost/Team/issues/1220
- there's no options for individual gifs like there are with Unsplash images and there's no real need to zoom for gifs that are already fairly small so the extra zoom step is unnecessary
refs https://github.com/TryGhost/Team/issues/1220
- added resize observer and cut-off widths for number of columns to auto-adjust based on the size of the selector's container
- fixed error when tenor service is unavailable due to missing `retry` action
refs https://github.com/TryGhost/Team/issues/1219
- added optional `adjustOnResize` argument to `{{movable}}` modifier
- when the movable element's size changes (based on a `ResizeObserver` event) the passed in action is called with the element and the current x/y position
- having this handled via the `{{movable}}` modifier is needed because that's what knows about any CSS translations that are present and allows the drag position to remain in sync with any resize-related adjustments
- return value of the action is expected to be a new `{x, y}` tuple
- used `adjustOnResize` in the `<KoenigSettingsPanel>` component so that any time the settings panel grows and causes part of it to be off-screen we re-position so that the whole panel is kept on-screen
refs https://github.com/TryGhost/Team/issues/1217
- adds `tenor` service that acts as a coordinator for the Tenor API similar to the `unsplash` service
- adds `<GhTenor>` component that renders an image search and select modal using the `tenor` service
- swapped the gifs card over to use the `tenor` image selector so it opens the tenor modal instead of the unsplash modal
refs https://github.com/TryGhost/Team/issues/1219
- added `dropdown.closeDropdowns()` to the `{{movable}}` modifier when dragging starts
- updated ember-power-select derived inputs to close their dropdowns when the dropdown service triggers it's `'close'` event
no issue
When we were given a source+ref we were using that to find a theme object from the built-in list of marketplace themes and if it wasn't found redirecting to the change-theme screen. That redirect didn't need to happen because we only need the `ref` and can determine the theme name from that.
- passed `ref` through to the install modal as a data argument
- updated install modal to get theme name from passed in theme or extracted from passed in `ref` when theme is not known
- adjusted "isDefaultTheme" so it always checks against Casper rather than using the `ref: 'default'` value from the list of marketplace themes
refs https://github.com/TryGhost/Team/issues/1209
- adds new `KoenigHtmlTextarea` component for entering multi line html in cards
- updates accordion card to use html text area component