closes#12154
Adds a new css class selector to app-dark.css to mimic the same effect as created in the gh-markdown-editor. The class keonig-card-html--editor is applied conditionally when the card is in edit mode, as per its template file. This now makes the cursor the same color as the text and easier to read.
refs https://github.com/TryGhost/members.js/issues/77
- There was a quick flicker before the portal popup appears due to the site theme being visible in background till portal loads
- Adds the constant background with slight delay to show the frame which ensures the portal script is successfully loaded to minimise the visible flicker
no issue
- Members importer returns to first state of uploader with file selection when unknown error happens during the upload. If the upload fails and 'summary' state is set, it leads to showing summary stas during 'customizing' state.
closes https://github.com/TryGhost/Ghost/issues/12112
- perform a paid members list query with a limit of 1 when the modal is displayed if the post is set to members only, then use the pagination meta data to get a total number of members
- display a spinner and disable the confirm button whilst the count query is in progress
- does not display any counts for users with the Editor role as they do not have permission to list members
refs fd91b593a5
- fixed incorrect call `pluralize(undefined, {withoutCount: true})` when number is undefined - `pluralize()` expects only one argument when no number is provided
- fixed destructuring in ghPluralize
- fixed linting error for undefined method after removal of `formatNumber` import
- fixed typo of import path in members controller
closes https://github.com/TryGhost/Ghost/issues/12110
- adds `{{gh-pluralize}}` helper that wraps the `{{pluralize}}` helper from `ember-inflector` but formats the number using our `{{format-number}}` helper
- updates all uses of `{{pluralize}}` to `{{gh-pluralize}}`
closes https://github.com/TryGhost/members.js/issues/80
- This adds the link/attribute switcher and chooser directly to Admin in Portal preview area
- Thinks links/attributes section was previously shown as a Portal page
closes https://github.com/TryGhost/Ghost/issues/12102
- The scheduled date was incorrectly shown as month number in the toast box after scheduling
- Updates to correctly show the selected date
refs https://github.com/TryGhost/Ghost/issues/12098
- the component template was directly referencing `this._isSaving` which meant that the `this.isSaving` getter was never fetched and so no autotracking was set up for `this.args.isSaving` to trigger the task that updates `this._isSaving`
no issue
- updated single member delete modal copy + design layout
- swapped switch to regular checkbox + applied red color to it
- set button label based on checkbox state
no-issue
* Supported cancellation of subscriptions on delete
This makes the cancellation of subscriptions much more obvious to the
user, and we err on the side of caution by *not* cancelling by default.
* Updated base adapter to handle urls with query params
After creating the member adapter and overriding the urlForDeleteRecord
method the flow would take the url from that and it would get passed
into the buildUrl method of the base adapter. At this point it would
append a "/" _after_ the query param.
It would ouput http://admin.com/ghost/api?query=blah/
rather than http://admin.com/ghost/api/?query=blah
no issue
- Accent color setting was behind dev flag on General settings screen
- Its now moved inside Portal settings where its primarily being used
- This change removes it from general settings screen so its only on Portal settings
no issue
- Updates url to load portal preview to use more specific path by appending `/preview` in hash path
- Allows portal script to validate preview mode easily instead of guessing based on query string
requires 8ceabbcfba
- if the API responds with `meta.import_label` after an import, use it to reset and apply the filter across the members list so that it's quick to see the results of the import and perform further bulk actions (coming later)
- added ability to pass arguments through `<GhFullscreenModal>`'s `@confirm` action
- added a `console.error()` call to the members csv import so that any underlying error is not completely lost by the custom error handling
no issue
- All interactions on the portal preview should be disabled to keep a focused view.
- Disabled pointer events on portal preview iframe to not allow any interactions on page that can cause popup to close or navigate away
no issue
- Adds mapping for default svg icons to keys
- Updates custom icon check to not include default icons
- Updated settings update to save default icon key on update
no issue
- Portal preview's free plan selection for Signup in settings was disabled because of old setting check
- Updates the disabled check to use correct self signup property
refs https://github.com/TryGhost/Ghost/issues/11971
- Newsletter preview email request has been using hardcoded fixed error message
- Reads custom error message from server's API response to show when available
no refs.
- refined typography, colors and layout
- using built in admin icons for portal button icon temporarily
- styled icons for future usage with inline svgs
closes https://github.com/TryGhost/Ghost/issues/12052
* Added breaking test for mailgun settings
* 🐛 Fixed mailgun settings to always set a baseUrl
This matches the functionality seen before the bulk_email_settings were
split, where the baseUrl was set when any of the mailgun settings were.
no issue
- Portal modal was using incorrect `allowSelfSignup` value post settings refactor
- Updated to use correct setting for free signup to correctly disable/enable checkbox
closes https://github.com/TryGhost/Ghost/issues/11385
- Updates og and twitter description to use correct fallbacks for posts/pages
- Updates og and twitter description to use correct fallback for tags
- Updates og and twitter title to use correct name format for tags
no issue
- Removes redesigned members importer features from behind `enableDeveloperExperiments` flag enabling it by default for everyone
- Had to disable some of the tests for future investigation to unblock the release
no issue
- Ensures the "email" field required to create a member is always present with the mapping
- If the field is not mapped, import would fail for all members
no issue
- Because returned validation errors are too technical some of the most common ones were mapped for better human readibility.
- This is a patchwork on the client instead of introducing a lot bigger changes on the server side
no refs.
- added counter ("x of y") to "Data" header for member import mapping table
- set disabled style to prev/next buttons in "Data" header for first/last records
no issue
- Fixes nav item values not saving on keyboard save shortcut
- Nav items value was only being updated in settings on focus out from text field.
- In case of keyboard save, focus out didn't happen so old value got saved and re-populated
- Change fixes to update setting value while typing
no issue
- Adds new Look & Feel section to portal settings to control accent color, button style, text and icon
- Adds Links section to portal settings to show static links to control popup behavior
- Adds the 3 new portal settings to setting model
no issue
- A new validation stage has been introduced as a second step after CSV file has been dropped. It is meant to catch any obvious validation errors and output detailed statistics about
- These improvements also improve sampling logic which increases sample size to 30 non-empty cells which are used to validate stripe_customer_ids when there's such need.
- New sampling logic also introduces improved automatic field type detection which allows to better map email and stripe_customer_id fields to CSV columns
refs https://github.com/TryGhost/Ghost/issues/11965
- updated the `{{gh-format-post-time}}` helper that is used in editor status and in post settings menu email sub-menu for displaying email sent time
no issue
- moved `primaryTag` CP into the post model as per `primaryAuthor`
- removed all unnecessary or unused CPs in the component's backing class
- switched to using `@post` for direct argument access rather than `this.post`
refs https://github.com/TryGhost/Ghost/issues/11965
- changed to native class syntax
- extracted main method out so that it can be used outside of templates
- switched the "in x hours" logic to use moment's `.from()` method when time is within 12 hours rather than 15 minutes
no issue
- the post/page conditional was looking at the old `post.page` property rather than the `post.displayName` that was added when posts and pages became separate models
refs https://github.com/TryGhost/Ghost/issues/11965
- be more explicit about when the post will be published
- indicate if and to which type of members the post will be emailed
- improved description formatting by making sure pertinent pieces of information do not wrap
refs https://github.com/TryGhost/Ghost/issues/10318
- The check for disabled update button for from address was reversed in this commit - 5d22b788c8
- This updates the check to correctly validate for from address update for disabling the button
refs https://github.com/TryGhost/Ghost/issues/11971
- Updates error messages incorrectly pointing to invalid mailgun config to show more generic error
- Needs to be updated to point to correct error message in future
refs #10318
* Updated settings model with new settings
* Removed parseSubscriptionSettings from settings service
* Updated members-utils to use new settings
* Updated labs controller to use new settings
* Fixed dependency for member-settings-form
* Updated members-lab-setting component to use new settings
* Updated disconnect modal to use new settings
* Updated members portal modal to use new settings
* Removed Direct from settings
* Renamed members_allow_signup -> members_allow_free_signup
* Allowed for null fromAddress
no issue
- use the same API query param generation for bulk delete requests as we use for the primary members list so that delete affects the same list that is visible/selected
no issue
- Adds live preview of members.js modal UI to the new settings modal behind dev flag
- Uses `gh-site-iframe` to render site in preview mode with custom portal url
refs https://github.com/TryGhost/Ghost/issues/10318
- API has been updated to still work with `active_timezone` for backwards compatibility but it makes sense for the client to match the underlying settings keys
refs https://github.com/TryGhost/Ghost/issues/10318
- API has been updated to still work with `default_locale` for backwards compatibility but it makes sense for the client to match the underlying settings keys
refs https://github.com/TryGhost/Ghost/issues/10318
- primary change is in the settings service which is the only place we fetch the settings endpoint
- mocked APIs and fixture data updated to expect and to filter on `?group` rather than `?type`
no-issue
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
This adds the ability to disconnect the Stripe Connect integration from the Members settings.
closes https://github.com/TryGhost/Ghost/issues/11866
- Adds extra check to task button states if the last task ran was same as the current associated task
- In case of task groups, triggering one task in group also triggered states for other tasks in group
- Editing slug called `updateSlug` task which is part of the same task group as `save` task, which triggered the state for save button
no issue
- display a confirmation modal when bulk deleting members
- hit the `DELETE /members/?all=true` endpoint when confirming
- show counts of members deleted/skipped
- fix selection reset when leaving edit mode
no issue
depends on 77e1ada6c6
- reverts commit 6760527 with modifications for naming
- Adds new portal settings UI in Labs -> Members setting
- Allows customization of new portal-* settings upstream
- Updates settings service to include portal group
- Updates settings modal to include new portal-* settings
closes https://github.com/TryGhost/Ghost/issues/11882
- Editors have all the same permissions and access to tags as Owner/Admin roles, but had the sidebar navigation for tags missing
- Adds "Tags" to sidebar for Editor roles same as Owner/Admin
closes https://github.com/TryGhost/Ghost/issues/11590
- Dirty attribute flag was set incorrectly on focus out from label/url fields as no check with existing was used
- Checks against existing nav item value before setting dirty attribute on focus out
no issue
- Adds new modal settings option in members settings
- Allows customization of modal settings for membersjs
- Uses new `memebrsjs_*` settings from core
no issue
- initial UI for bulk-selection, focusing for now on first stage which is limited to select-all and delete actions
- adds "Edit" button to the members table that shows the "selection" toolbar in place of the table header and shows a checkbox next to each member
no issues.
- removes email and Stripe duplicate customer ID check to focus validation that might affect the whole dataset
- applies visual style and refines copy
no issue
- Adds a table representation of data present in a CSV file that is about to be imported. Allows to navigate through data to see how exactly the file would be parsed on server
no issue
- it's useful to be able to see the column headers anywhere in the list
- prep for having the table header toggle between normal and edit modes where having to scroll back up to the top of the page each time you want to toggle would be a poor experience
no issues.
- changed warning style when import can still happen
- combines all warnings to a single section
- hides details for warnings behind an expandable list so that
- updated copy
no issue
- hook template up directly to the `settings.stripeConnectIntegrationToken` value
- reset `settings.stripeConnectIntegrationToken` when leaving the labs route
- without the reset, after a failed save other settings screens will show the "unsaved changes" warning
no issue
- extract width/height from selected local image when uploading and store in the payload with `src` once upload finishes
- capture width/height from Unsplash and store in the payload after selecting an image
- We have many customers asking for INR as there are special rules in Stripe for this currency
- As well as a desire for local-selling
- Meaning it's not valid to use e.g. USD instead
closes https://github.com/TryGhost/Ghost/issues/11707
- Firefox is different to every other browser and doesn't allow file input values to be reset by doing `input.value = null`
- outcome of reset not working is that Firefox won't trigger the change event when the same file is re-selected
- fixed by cloning the input element and replacing it
no issue
- Added client side detection rule for Stripe's customer ids. Based on the check performed on the server side - cb26fd9305/core/server/api/canary/members.js (L43-L60)
- Also expanded check to a whole set of data as that should not be too slow of a check (did the same for emails). Kept the rest consistent to the data that is sent to the server for the check.
requires https://github.com/TryGhost/Ghost/pull/11892
- adds `?paid` query parameter to members route that is tied to the `?paid` query param in the API request
- added all/free/paid members dropdown to members filter component
no-issue
This is now the central place for checking if stripe is configured for
members and we want to make sure that the Stripe Connect correctly
affects this value
no issue
- Adds validations for imported CSV data
- These checks include obvious validation checks for data - like if email addresses are valid, checking if Stripe configured when entries with stripe_customer_id are present and additional server-side validation for entries with stripe_customer_id to check if they appear in connected Stripe account
- The validation set is calculated by naive choosing of first 5, middle 5 and 5 tail records from imported set. This logic comes from observations that errors usually apear withing "test" records in the beggining or the end of the file. These selection rules might change in the future if we find a need for it.
- Adds papaparse CSV parser, which was chosen for it's maturity and relatively small minified size. In the future this library should be lazy-loaded to make the first page load UX nicer
no issues
Updated and refined Stripe Connect design in Labs/Members settings:
- refined visuals and UI logic
- updated copy
- added switch for test mode
- added error handling
no issue
- This logic is planned to be reused in more places, e.g. members import data validation. This change is meant to be a prep work for that.
- With stripe connect functionality coming it is important to have a central place checking for configured Stripe
no issue
- adds `visibility` query param to posts and pages controllers/routes that is tied to the `filter` query param used in API requests
- adds dropdown for selecting post/page visibility to `<GhContentFilter>`
no issue
- there was a race condition when deleting tags...
- the delete tag modal's `close` action toggles the `showDeleteTagModal` property to `false`
- the `deleteTag` action triggered when clicking the delete button was transitioning to the tags screen
- if the transition occurs before the close action is triggered, the modal component is destroyed and it's close action is never triggered leaving the `showDeleteTagModal` property on the controller set to `true`
- the next time the tag screen is accessed the delete tag modal is displayed because the `showDeleteTagModal` property is `true`
- adds an explicit reset of `showDeleteTagModal` after a tag is successfully destroyed
- makes open/close of the delete tag modal explicit actions so there's no ambiguity when toggling
no issue
- Unsaved labels were still persisted in the store. This was causing unsaved labels reappearing on different instances and caused broken states
no issue
- error was "You passed the `searchParam` query parameter during a transition into members, please update to search"
- this was caused by the `reset-query-params` helper specifying `searchParam` as the query parameter which is the controller property name, not the query param name
refs https://github.com/TryGhost/Ghost/issues/11414
- Appends blog domain as default for from address members setting
- Disabled update button when current from address is same as in field
refs TryGhost/Ghost#11414
- Restructures member settings in labs, from address gets its own section
- Removes explicit site domain for fromAddress as we allow updating the full address
- Adds new CTA to trigger magic link for updating members from address
- Adds new confirmation modal for email sent to new from address
- Adds notification banner for from address update redirect link
refs TryGhost/Ghost#11789
- Reverted 28fbc341af as we want to handle the state with css props instead of relying on specificity
- Updates fix for change password button on staff user edit screen to use task button props - 28fbc341af
no issue
- The invalid file type error should be shown on the very first step of import and should not allow proceeding without selecting a correct file.
refs 633ba27f0e
- Import modal is now devided into separate stages with ability to specify labels which will be assigned to every member present in the dataset.
- Also adds explicit "Import" button without automatic import when the CSV file is selected
no issue
- passed in the `refreshData` action to the `<GhMembersNoMembers>` component and called it after creating the member
- converted `<GhMembersNoMembers>` to a glimmer component
requires fdeb7daf40
- swapped to using settings model for storing custom views instead of user accessibility field
- added conditional that checks current user is an admin/owner when displaying the manage custom views button in the content filter (only admins/owners can edit settings model)
- passed `session.user` into the `<GhContentFilter>` component as an argument so that the conditional getter doesn't need to handle async user access
- fixed no-shadow linting error in settings service
no issue
- By default, action buttons had auto-reset off and reset had to be explicitly set
- Auto reset for action buttons is on by default now, and any button that should not reset should explicitly switch it off
no-issue
- Rendering is conditional on `stripeDirect` config being false.
- CSS downloaded from https://stripe.com/newsroom/brand-assets
- `stripe_connect_integration_token` is the setting to _set_ the
stripe_connect_integration setting
no issue
- move members loading code into `members` controller so that it's more accessible to other areas of the app
- add `refreshData()` to the `members` controller which forces members list and stats to be re-fetched
- call `members.refreshData()` after successful upload of members import file
- store range/days in `membersStats` service so that it's remembered across refreshes and component renders
no issues.
- adds a placeholder value for impersonate URL field to avoid empty field while loading
- disables "Copy link" button until the actual URL is not loaded
refs TryGhost/Ghost#11863
Some `a`tags with `href` attributes that are empty are used as buttons, but since the href is not linkifying anything, they appear as text nodes to assistive technologies. Give them a `"button"` role so it is guaranteed that assistive technologies will pick them up as actionable controls.
refs #11863
* 🐛 Gave various buttons accessible labels
Hidden span elements are not rendered to assistive technologies, so duplicate the text in an aria-label on the button element.
* 🐛 Fixed various accessibility issues in the editor
* Made menus menus and menu item menuitems.
* Added labels to buttons where there were only hidden spans, or no text at all.
* Made separators show up for screen readers.
refs #11863
* 🐛 Fixed accessible button label for showing and hiding custom post types.
* 🐛 Made the menu separators accessible.
* 🐛 Fixed the More item to be a button for assistive technologies.
no issue
- removes the "old" members screens
- swaps route names and links to point at the new members screens that were behind the experiments flag
Why are the new screens faster?
- only loads 50 members at once rather than every member in the database
- loads pages of members in as-needed whilst scrolling
- fetches member stats from the API rather than calculating locally
- caches members list and stats data for 60 seconds to avoid re-fetching when navigating to/from the members list
- moves search and filtering duties to the API rather than calculating locally
no issue
- the members list uses occluded rendering to keep scrolling performance high but this will cause constant reflows of the table contents whilst scrolling because contents are swapped in and out causing the browser to adjust the column widths to match longest/shortest content in the currently rendered set of rows
- applying `table-layout: fixed` to the table means that columns will always match the sizes defined by the first row of the table (in this case the header) ensuring that there is no dynamic resizing whilst scrolling
no issue
- `display: table` doesn't provide an equivalent of `colspan` so the loading state needs to include the same number of `display: table-cell` elements as the live state
refs https://github.com/TryGhost/Ghost/issues/11841
- Allows editors to see email customization option for sending test newsletters
- Editors had the necessary permission fixtures but the UI was previously only available to owners or administrators
no issue
- the "days changed" logic was incorrect so we were always performing new fetches rather than using existing data
- added a minor improvement that returns an in-progress fetch promise if we have one and params haven't changed - avoids triggering unnecessary extra fetches in the rare occasions the chart is re-rendered before a previous stats fetch has finished
requires https://github.com/TryGhost/Ghost/pull/11854
- ties the search input on the members screen to a `?search` query param, debounced at 250ms to avoid unnecessary API requests and UI churn
- updated the members route's `model` hook to pass through the search param in the API request query parameters