no refs.
- added indicator icon to appropriately show which card is a newsletter email one
- fixed bug of card menu staying the same height when triggered via "/" menu
* Updated save buttons to reset state
no issue
Currently the save buttons across Admin don't auto-reset to idle state after success/failure on run which can give false impression once user changes any value. This PR auto-resets the button to idle state after a fixed timeout if no subsequent action is performed as a short term UX improvement.
* Fixed success check for auto reset
* Updated timeout value
* Added explicit save button reset for pages
* Updated save buttons to reset via shortcut
Auto-reset for save buttons wasn't working if not done through manual click on task button previously, this handles by splitting the original save task in controller to handle shortcut saves.
* Updated reset check for only successful tasks
* Added save reset to code-injection and design settings
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
no issue
- using the setup-node action is currently failing because of an
upstream issue - https://github.com/nodejs/node/issues/32683
- this commit switches to using a Docker container
no issue
- adds "Email" card to the card menus when developer experiments is turned on
- adds `<KoenigTextReplacementHtmlInput>` implementing most of Koenig except:
- uses html as it's input/output format
- replaces backtick "code" formatting with `{replacement}`
- no headings
- no cards at all
- minimal toolbar but all formatting is still available using markdown text expansions or keyboard shortcuts
no issue
- the card wrapper component was registering an event handler for keyboard events when entering edit mode. This was a problem because those events were also picking up the initial ctrl/cmd+enter and then immediately toggling back out of edit mode
- added a 20ms timeout for registering the event handlers so that they're not working cross-purposes
no issue
- when the mobiledoc spec changes due to a mobiledoc-kit version bump, any posts created with that version will fail to load in the editor if a rollback to an earlier Ghost version occurs
- use an explicit version to avoid the problem - we should only be bumping the mobiledoc spec version if we start using features from that version and mark it as a breaking change
no issue
- includes fixes for html->mobiledoc conversion (used when copy/pasting from external sources)
- fixes multiple spaces appearing in text content if source content is indented and has newlines
- fixes crash if source content has `<li>` elements containing headers
- fixes crash if source content has non-`<li>` top-level elements inside a list
- fixes `blockquote>p` markup in source content losing blockquote styling
refs https://github.com/TryGhost/Ghost/issues/11649
- The bug was changing all complimentary plan prices to the value of yearly.
- This is another point to putting in place validation of plan setting object on the server side so we don't accidentally allow values like this to slip through
closes https://github.com/TryGhost/Ghost/issues/10240
- intercept known macOS content-modifying keyboard shortcuts and simulate the "normal" keyboard events that they map to
- `ctrl+h`: `Backspace`
- `ctrl+d`: `Delete`
closes https://github.com/TryGhost/Ghost/issues/10090
- when mobiledoc-kit replaces the selection the caret window selection is temporarily set to the whole editor element which was causing our scroll-cursor-into-view routine to scroll incorrectly
- adding the guard allows the first replacement cursor change to be ignored but the second cursor change to be picked up which will do nothing if the text is on-screen, or scroll if it's off screen as normal
closes https://github.com/TryGhost/Ghost/issues/9792
- use `getClientRects()` to get separate rectangles for each line of a link and use the mouse position to find the closest one so that the toolbar can be positioned relative to that link section on that line rather than always in the middle of the editor canvas
- pass the rectangle used for positioning the link toolbar through to the link input component so that there is no jumping of position when clicking the edit button
Displaying the role of suspended staff users is misleading, giving the false impression that those users still have access to the publication.
no refs.
- updated label to "Suspended" for all suspended staff user
refs c0512e30bb
- Adds a dropdown allowing to select and set custom currency.
- At the moment we don't have a specific way to interface with the members configuration API so all values are set directly on existing "config JSON". Ideally we should add more validations and be more precise what values can be set for the `stripeProcessor.config.*` values.
- Saves selected currency in `stripeProcessor.config.currency` variable.
no-issue
* Updated the iframe src
* Moved billing behind config
* Transition to home route for missing billing config
* Replaced jquery element selection with native
no issue
- success routine when deleting a post/page was not taking into consideration the type of record being deleted
- deleting a post should keep previous behaviour of redirecting to posts list
- deleting a page should redirect to the pages list
no issue
- removes number of clicks required to insert images, especially when using the `/image` shortcut
- strips `triggerBrowse` property from the payload after inserting to avoid triggering file browse when a post with blank image cards is rendered/re-rendered
no issue
- added `geolocation` attribute to member model with json-string transform
- prevent geolocation from being sent back to the API in member serializer
- add "Location" column to members list
- if country is "US" then display "{State}, US" otherwise show full country name such as "United Kingdom"
- displays "-" if no geolocation data has been collected for the member
no issue
- cleaned up property access in template to differentiate between passed-in args and component-defined properties
- tidied up logic in `backgroundStyle` and `initials` getters
no issue
- switched to using a glimmer component
- cleaned up property access in the template
- used helpers for basic display logic in the template
- removed unused computed properties, aliases, and injected services
no issue
- There is no way to turn on "Complimentary" subscription when Stripe is not connected
- There is no constructiove information that can be shown about subscriptions
no issue
Fixes incorrect member count for Editors when trying to publish/schedule post with send email.
Note: This is a short-term fix till we fix fetching member data for Editors for proper count.
no issue
So far, only owners or Admins were allowed to control the send email setting while publishing/scheduling a post. This change allows Editors to see the setting as well and toggle as needed.
No changes on the API side were needed.
no issue
- browser tests would intermittently fail because they would hit the
timeout limit
- this commit increases the limit to allow for more variability in the
CI environment
no issue
refs TryGhost/Ghost#11538
* Added members label handling v1
* Added members label dropdown in list screen
* Updated selected labels and member list UI refactor
* Added v1 label add/delete modal
* Added add label modal v1
* Fixed disabled check for new label save
* First stab at member filters layout
* Updated member detail screen design
* Member detail refinements
* Added basic editing for member labels
* Fixed label deletion from members list
* Updated filtered list header
* Refinements for dropdown and empty filter state
* Refined label modal
* Updated member labels fetch logic
* Added custom dropdown component for labels
* Refined style for dropdown
* Refined dropdown button
* Restructure and refine members dropdown styles
* Added selected indication to dropdown
* Fixed dropdown footer style
* Removed member label placeholder
* Removed add label from member list actions
* New label refinements
* Added confirmation modal for label delete
* Added duplicate validation check for labels
* Updated validation check with slug
* Updated copy
* Updated actions dropdown copy
* Fixed visual glitch of dropdown on FF
* Hide scrollbar for labels dropdown
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
- use model._meta to access the meta object in the delete response
- removed unused `_deleteUser` method
- move the success/failure method bodies into the main `deleteUser` task to improve readability
- added a timeout after calling `_exportDb()` so that the iframe is not removed from the DOM immediately after it's `src` value is set due to a transition away from the member screen
no issue
- added a `transitionTo` after deleting a custom view that transitions to the `posts` route with default query params
- refactored `reset-posts-query` helper to a more generic `reset-query-params` helper
- moved default query params definitions to this helper and expose them so we have a single source of truth
- exposed `resetQueryParams()` function from the helper for use outside of templates
- adjust the function and helper behaviour to accept the route name as the first param so that `router.currentRouteName` can be used as a generic reset
no issue
- removed an old guard that was exiting early when `user.accessibility` was null which meant that the default views were never being inserted into the custom views list
no issue
- the `custom-views` and `navigation` services would trigger their observers immediately when `this.session.user` changed but that would occur before authentication had fully finished which was resulting in the `this.session.user` access triggering a request with no cookie/an old cookie set and causing a 403 error that interrupted the setup and authentication flows
no issue
- list custom post views in collapsable sidebar navigation
- default views: Draft, Scheduled, Published (except for contributors)
- record expanded/collapsed state of the navigation menus in user settings via new `navigation` service
- adds `customViews` service that manages custom views
- provides list of default views
- gives access to "active" custom view based on current route and query params
- manages loading/saving of custom views to user settings
- show "Add view" button in the content filter when the posts list has been filtered
- show "Edit view" button in the content filter when the posts list filter matches a saved view
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
refs TryGhost/Ghost#11537
- Adds support for "Complimentary" plan toggle only when editing an existing member. The same functionality for adding a new member was left out intentionally for simplicity sake.
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
no issue
We switched to angle bracket syntax and some PowerSelect properties were not properly auto configured here which enabled search box on members chart range dropdown
no issue
- the `willDestroyElement` hook is referencing event handlers that aren't used in the bookmark card
- stopped setting `type` in the card payload as it's not used anywhere (possible hangover from when bookmarks were a type of embed card)
refs https://github.com/TryGhost/Ghost-Admin/pull/1474
- show some indicitive text rather than a blank dropdown button when type/author/tag/order query param is present but doesn't match something in our data sets (eg, if a tag/author has been deleted or a query param has been incorrectly typed)
no issue
Ember is migrating to `<AngleBracketSyntax />` for component invocation, see https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md
We were in a half-way situation where some templates used angle bracket syntax in some places, this PR updates templates to use the syntax everywhere.
This simplifies the rules for what template code is referring to...
`<Component>` = a component
`{{helper}}` = a helper (or locally assigned handlebars variable)
`{{this.foo}}` = data on the template backing context (a component/controller)
`{{@foo}}` = a named argument passed into the component that the component backing class has not modified (note: this commit does not introduce any named arguments)
- ran codemod https://github.com/ember-codemods/ember-angle-brackets-codemod on the following directories:
- `app/templates`
- `lib/koenig-editor/addon/templates`
- removed positional params from components as angle bracket syntax does not support them
- `gh-feature-flag`
- `gh-tour-item`
- `gh-cm-editor`
- `gh-fullscreen-modal`
- `gh-task-button`
- updates some code that was missed in 3c851293c1 to use explicit this
no issue
- posts and pages (and their corresponding `-loading` counterparts) templates were all duplicating a lengthy section of handlebars
- extracted the duplicated handlebars into a template for easier design changes or upgrading of `ember-power-select`
- moved generation of the "selected" CSS classes into the template to clean up code in the controller
no issue
- converted remaining uses of `this.$()` that I could find over to native DOM
- deprecation is still silenced for now because both `liquid-fire` and `liquid-wormhole` trigger it
refs 704cbcfb4d
- `reset()` method was previously removed as it's no longer needed
- supporting code for calling that method was missed in the previous cleanup
* ✨ Enabled manual typing of post publish dates
closes https://github.com/TryGhost/Ghost/issues/9256
- stores the typed date internally to the component until
- Enter is pressed whilst focused
- Ctrl/Cmd+S is pressed whilst focused
- the input loses focus
- shows an error message if the typed date is not in the correct format or is invalid
- stops Ctrl/Cmd+S propagating if the typed date is not in the correct format or is invalid
- as long as the date is valid it calls the `setDate` action when the input loses focus, Ctrl/Cmd+S or Enter is pressed
- prevents publish being triggered in the publish menu if an invalid date is entered
- resets any invalid state in the PSM when it's closed
- manages focus when using <kbd>Tab</kbd>
no issue
- the tag screen is now separate from the index so the code needed for handling switches between main/meta panes and scroll resets is not used and no longer needed
- tidies up indentation in the template
no issue
- if only some roles have been loaded, such as from embedded user records in posts, navigating to the Staff screen when invites exist for roles that have not yet been loaded would result in an Ember Data error
- the error occurs because we use `invite.role.*` in the template but we've specified `{async: false}` in the `belongsTo` relationship for `invite.role` which prevents Ember Data automatically querying the API
- by always fetching the roles list before fetching the invites list we prevent the error but we do introduce an extra API request in some circumstances
no issue
- cleaned up the `deprecation-workflow.js` file by removing deprecations that are no longer being triggered by our test suite or general app usage (if they are still triggered in untested areas it will be useful to see the logs)
- updated usages of `{{gh-text-field}}` to use it's `shouldFocus` attribute rather than directly overriding it's `autofocus` computed property
no issue
- adjusts mirage config so that we're correctly serializing foreign keys
- our API outputs (and our app code expects) foreign keys for non-embedded resources to be in the format `{relationship_name}_id` but mirage's default REST serializer does not include the `_id` suffix
- tests started failing because c46d04f612 introduced a direct access of the invite->role relationship which Ember Data was not correctly creating when mirage was outputting `role` rather than `role_id`
refs 3d7e593c96
- `record.belongsTo().id` is an older Ember Data concept so it was returning `undefined`
- the `role` relationship is set up as `async: false` and is always output as an embedded record by our API so we're safe to use `this.role.id` without dealing with any async lookup
no issue
- it's being caused by the `ember-infinity` addon and was making test output rather noisy
- revert once `ember-inifinity` has a release removing `isVisible` and we've upgraded
no issue
- `ember-cli-pretender` is no longer required when using `ember-auto-import`
- updated `pretender` dependency from 2.1.2 to 3.2.0
- removed upload progress tests (one was already skipped due to random failures) because pretender is not outputting meaningful `event.loaded` and `event.total` values
no issue
- output the reason we're showing the unsaved changes modal along with some context to the console
- to share it, right click on the object that is logged to the web inspector console next to the text "showing leave editor modal" and choose "Store as global variable" in the popup menu, then execute `copy(temp1)` (if `temp1` was the variable that was created for you) which will copy a string representation of the object to your clipboard ready for sharing
no issue
- the inputs in tag/member settings are now two-way bound which means that a `null` or `undefined` value can become `""` when a field is focused/blurred due to inputs only working on strings
- if a `null` or `undefined` property value becomes `""` Ember Data will treat that as a dirty property and that will in turn trigger the unsaved changes modal when leaving the tag/member details screens
- this change strengthens our `_saveXProperty` private controller methods to skip any changes between "falsy" property values unless the new value is explicitly `false`
refs. https://github.com/TryGhost/Ghost/issues/11445
- fixed input field background colors in Post Settings menu in darkmode
- applied color variables to day picker calendar component
- fixed colors of day picker calendar in darkmode
no issue
- having so many addons grouped into a single PR is difficult to manage when not reviewing, updating and merging frequently. If a single addon requires deeper work or breaks our node support range than it blocks upgrades on all other addons which then compounds required effort over time
no issue
We weren't correctly clearing state for the "display modal" booleans when leaving screens. This meant that it was possible to end up in a state where where every time you access a screen you get the unsaved changes modal
no issue
We were in a part-way state where some touched files had been (sometimes partially) migrated to explicit `this`. The codemod that was available has now fixed the formatting issues it had so it was a good time to run it.
https://github.com/ember-codemods/ember-no-implicit-this-codemod
- part of the migration path for https://github.com/emberjs/rfcs/pull/308
- starts to make template resolution rules more explicit
- `<MyComponent />` - always a component
- `{{my-component}}` - component or helper (components _must_ have a `-`. This style of component will go away once fully migrated to angle bracket components)
- `{{value}}` - a helper or local template variable
- `{{this.value}}` - reference to a property on the backing context (either a controller or a component JS file)
no issue
- the member count is automatically calculated via the length of the live members array so there's no need to manually decrement it - if we do manually decrement then the count is off by one because the auto calculation runs to get the new value before the manual decrement
no issue
- keep a scratch model on the tag/member controllers rather than inside of the form components
- allows the controller's `save` task to transfer scratch values to real values before saving
- means that pressing Cmd+S whilst a field is still focused will save the expected value rather than the old value avoiding unsaved changes modals when trying to leave the screen when you think you've already saved
- fixed route and url not changing after saving a new member
- fixed error when clicking delete tag button
- cleaned up unused `showDeleteTagModal` actions
no issue
- removed unused `isViewingSubview` property
- replaced `hasMultipleSubscriptions` CP with the `gt` CP macro
- fixed indentation in the template
no issue
The tag and member screens share the same underlying UI/UX patterns but were using different code patterns. This brings both in line so that we have consistent code patterns that can be re-used for other screens.
- fixed cleanup of new tags by adding the `deactivate` hook to the `tag` route
- updated `member` and `member.new` route/controller setup to match tag route/controller setup
- added `save` action to member controller so that Ctrl/Cmd+S works on member screen
- updated tag route/controller to utilise the same instant display w/background refresh when accessing the tag details screen
- completed transition of non-component tag/members templates over to angle bracket component syntax
refs https://github.com/TryGhost/Members/pull/107
- Added 'cancel at period end' logic to members subscription details
- Added stripe subscription link in subscriptions details
no issue
- don't show "Delete tag" button when we're displaying a new/unsaved tag
- refactor the `_deleteTag()` method to be more explicit and remove handling that is no longer required since the tag screen is not nested in the tags screen
- revised the condition in `showUnsavedChangesModal()` method so that it's body doesn't fire twice when leaving the `tag` or `tag.new` route
- revised the `showUnsavedChangesModal()` method body to look at the number of changed properties on the tag rather than relying on `tag.hasChangedAttributes` which is always `true` for new models
no issue
- removed unused `<GhTagsManagementContainer>` component and related `isMobile` CPs
- un-nested `tag` and `tag.new` routes
- nested routes in Ember are used for nested UI but these are both separate screens
- removes usage of `selectedTag` property in favour of using Ember's built-in model handling
- removed unnecessary `tags/new` controller
- sets up `tag.new` route which extends the `tag` route to avoid duplicate code