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

976 commits

Author SHA1 Message Date
Kevin Ansfield 5606b9c068 Implemented first iteration of content snippets
closes https://github.com/TryGhost/Team/issues/411

- adds "Create snippet" icon to the editor toolbar
- uses the same link input component design for specifying snippet titles
- snippets are loaded in the background when the editor is accessed
- snippets are listed at the bottom of the card menus of the + and / menus
- clicking a snippet inserts the snippet's contents in place of the current blank section
2020-10-15 18:03:35 +01:00
Kevin Ansfield a4338ca21f Added developer experiments indication to about page
no issue

- without this there's no indication the config flag is set when you have no access to the config file or you don't know which features are currently behind the flag
2020-10-09 11:38:47 +01:00
Fabien 'egg' O'Carroll 56df9d4b5e
Added support for filtering the exported Members CSV (#1716)
no-issue

Co-authored-by: Peter Zimon <zimo@ghost.org>
2020-09-23 14:29:47 +01:00
Sanne de Vries 802722a607 Added message box on Staff user page that indicates user is locked, and improved boxes naming and styling 2020-09-16 15:37:33 +02:00
Rish 301fdde0f7 Added new support and reply-to address for members
no issue

- Adds 2 new email address fields for members in email settings section - support address and reply-to address
- Support address - Is used for member auth emails as well as in themes and Portal for allowing members to contact support.
- Reply-to address - Is used to set `reply-to` address for newsletter emails that allows configuring where member's reply to emails will go
- Disabled from address update for empty value
- Updated success toast message and copy for from/support address update
- Changed section title + description for email addresses
- Added "public" to support email description
2020-08-31 18:10:26 +05:30
Rishabh Garg e41d9f2902
Allowed Admin users to impersonate members (#1679)
closes TryGhost/Ghost#12126
depends on https://github.com/TryGhost/Ghost/pull/12132#pullrequestreview-469092171

- Previously, only Owner user was shown option to impersonate a member
- Grants Administrator user ability to impersonate a member
2020-08-18 14:19:12 +05:30
Kevin Ansfield 754f8483e9 Added number formatting to all pluralized counts
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}}`
2020-08-10 11:16:03 +01:00
Rish ee494a4882 Removed accent color from general settings
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
2020-07-24 16:46:32 +05:30
Kevin Ansfield dea7a3da03 Removed bulk member edit dev experiment
no issue

- we're moving forward with a simplified bulk delete and the UI would conflict if both approaches are behind the dev experiments flag
2020-07-23 15:03:18 +01:00
Fabien 'egg' O'Carroll 7ef6b04282
🐛 Fixed email newsletter settings (#1641)
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.
2020-07-16 11:13:36 +02:00
Fabien 'egg' O'Carroll dbd5da0c36
Added UI for AMP GA Tracking ID (#1638)
refs https://github.com/TryGhost/Ghost/pull/12039

Adds the initial UI for setting the `amp_gtag_id` setting
2020-07-15 13:45:31 +02:00
Peter Zimon 50055f7a8c Refined members import modal dropdown
no refs.
- updated style of members import modal field dropdown
2020-07-07 13:07:21 +02:00
Peter Zimon 8a288245de Rearranged accent color in settings
no refs.

- moved accent color setting to section top in Settings/General according to its importance
2020-07-06 16:07:22 +02:00
Fabien 'egg' O'Carroll 3e21c21d12
Updated labs to use new mailgun_* settings (#1628)
refs https://github.com/TryGhost/Ghost/issues/10318

This removes references to the old bulk_email_settings
2020-07-03 11:48:54 +02:00
Fabien 'egg' O'Carroll eea43963a1
Refactored to use updated members and stripe settings (#1621)
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
2020-06-29 19:37:11 +02:00
Kevin Ansfield 3da8815759 Renamed activeTimezone setting to timezone
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
2020-06-24 15:34:59 +01:00
Kevin Ansfield 9f9273fafc Renamed defaultLocale setting to lang
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
2020-06-24 15:27:17 +01:00
Kevin Ansfield 90dc419249 Fixed settings not saving due to settings.brand
refs https://github.com/TryGhost/Ghost/issues/10318

- moves `settings.brand` as a JSON object to `settings.accentColor` as a string
2020-06-23 20:49:29 +01:00
Kevin Ansfield 312b9fb4e1 Added first pass bulk members delete confirmation and results display
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
2020-06-19 18:14:41 +01:00
Kevin Ansfield 29bed994ff Moved members bulk delete confirmation into a modal 2020-06-19 14:14:39 +01:00
Rish 0e55590360 🐛 Fixed incorrect save warning on design settings
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
2020-06-18 17:46:18 +05:30
Kevin Ansfield 0f587a90d0 Added rough "edit mode" for members table behind dev flag
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
2020-06-18 11:08:53 +01:00
Kevin Ansfield 67d195179f
Added all/free/paid filter to members admin screen (#1600)
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
2020-06-12 12:12:27 +01:00
Kevin Ansfield 443364c619 Fixed missing rename of <GhMembersFilter> in members.hbs 2020-06-09 23:22:43 +01:00
Kevin Ansfield 24bf414cc3 Added access level filter to posts and pages lists in admin
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>`
2020-06-09 12:19:40 +01:00
Kevin Ansfield 49700d9b64 Fixed delete-tag modal showing unexpectedly
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
2020-06-09 10:15:28 +01:00
Rish c16381bb42 Added site domain for default from address
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
2020-06-09 11:14:53 +05:30
Rish 7fde2e1aac Updated fix for staff user edit button using task button property
refs TryGhost/Ghost#11789

- Reverted aaac414745 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 - aaac414745
2020-06-08 19:54:48 +05:30
Kevin Ansfield b75f5965d3 🐛 Fixed members list not refreshing after adding yourself
no issue

- passed in the `refreshData` action to the `<GhMembersNoMembers>` component and called it after creating the member
- converted `<GhMembersNoMembers>` to a glimmer component
2020-06-05 08:50:20 +01:00
Kevin Ansfield 4a53587f3b Switched per-user custom views to shared custom views
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
2020-06-04 21:30:06 +01:00
Rish a258e8ad15 Removed redundant auto reset for amp
no issue

- Auto reset is on by default, this got missed in last commit
2020-06-04 19:25:42 +05:30
Rish 4ed4f71c71 Removed redundant reset value for task buttons
no issue

- Since task buttons by default have reset on now, we don't need to explicitly add it to individual buttons
2020-06-04 19:23:59 +05:30
Fabien 'egg' O'Carroll c17612e3d1
Added Stripe Connect UI (#1586)
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
2020-06-02 13:58:43 +02:00
Kevin Ansfield ef491730d8 Fixed members list/chart not updating after members import
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
2020-06-01 15:48:46 +01:00
Kevin Ansfield 3da16a8c32 Improved performance of members admin screens
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
2020-05-28 13:35:53 +01:00
Kevin Ansfield 6a94e56988 Fixed columns resizing whilst scrolling members list
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
2020-05-28 12:59:34 +01:00
Kevin Ansfield 64d7639b57
Added server-side search to new members screen (#1582)
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
2020-05-28 10:15:17 +01:00
Kevin Ansfield c582f16dc0 🐛 Fixed members import not showing upload modal
no issue

- template was not renamed correctly in 9250d7939b
2020-05-26 15:49:48 +01:00
Kevin Ansfield 332cb72e25 Updated <GhMembersChart> to fetch stats from the API
no issue

- added mocked API for `/admin/members/stats/` that generates random data for the chart
- re-architected `<GhMembersChart>` to fetch data from the API rather than calculating stats from all members loaded in memory
- enabled mirage in development so that the chart can be tested before the live API is ready
2020-05-22 17:58:45 +01:00
Kevin Ansfield ad7c8ed423 Linked label dropdown in members screen to paginated list loading
no issue

- moved model loading back into the route
- updated model loading to refresh correctly when `label` query param changes
- fixed infinite loading/"no members" display in members list by using the `members.loading` property that `ella-sparse` gives us (previously we'd never leave the loading display because `this.members.length` would be 0)
- changed the members nav link to reset query params only if it's clicked whilst on the members screen - matches posts/pages behaviour and lets you navigate without having to re-enter your filter/search
2020-05-22 17:58:45 +01:00
Kevin Ansfield aba7f0b7c8 Added loading state for member list rows
no issue

- with the sparsely loaded list you can scroll to an area which is being loaded in the background
- if a list row is being loaded, display a "loading" version of the row so it doesn't look like you're stuck on a blank screen
2020-05-22 09:31:17 +01:00
Nazar Gargol 1cf3573d12 Fixed browser URL syncronization with embeded iframe state
no issue

- Opted in to use explicit `hisotry.replaceState` and setting iframe's `src` using assignment instead of tracking it through computed property. This allows for tighter control over when iframe's history is updated which was causing problems when `src` was bound to computed property
- Added billing page metadata. This way browser history records appear with nicer signature
- Removed "update button" iframe and rewrote "global iframe" to not use modals. This allows to have single iframe on a page, which simplifies `postMessage` communication and preserve history inside iframe to be able to navigate it after closure
- Added route change handler responding to BMA app route changes. Allows to sync browser URL visible to the user with active route in BMA iframe. The sync is based on `hisory.replaceState` method that makes sure singular history records are kept in the browser history
- Added nested wildcard billing route. This is meant to catch all the nested routes inside of BMA iframe
2020-05-22 14:44:37 +12:00
Kevin Ansfield 33bb521c11 Updated members list to use paginated loading
no issue

- disabled members search/filter/chart as they won't work without all members loaded into memory (they will be added back later)
- added `ember-ella-sparse` to handle a sparse array of members
- updated `fetchMembersTask` to return a sparse array instance
- updated components that work on a `member` instance to use `.get` because all items in a sparse array are proxy objects
- changed list loading behaviour to not refresh the list from the API unless the client-side list is more than a minute old - allows for much snappier nav between list and details screens
2020-05-20 16:39:32 +01:00
Kevin Ansfield e80fa137db Updated members routes/controllers with Octane idioms
no issue

- ran [`ember-native-class-codemod`](https://github.com/ember-codemods/ember-native-class-codemod) on members-related files
- updated files to remove need for `@classic` decorator where possible
    - switched to tracked properties
    - removed usage of `this.get/set/toggleProperty` etc
- swapped usage of `{{action 'foo'}}` for `{{this.foo}}`
2020-05-20 16:39:31 +01:00
Kevin Ansfield 9250d7939b Swapped duplicated members files from -dev to -old
no issue

- allows continued development on the "original/non duplicated" files to better preserve git history once the `-old.*` files are deleted
2020-05-20 16:39:31 +01:00
Peter Zimon a5fa4074e2 Removed test email function from Labs
no refs.
- removes leftover test email section from Labs to resolve a lot of confusion around it
2020-05-20 11:34:56 +02:00
Kevin Ansfield dc5549a265 Duplicated members screens for development experiments
no issue

- members screens will be undergoing heavy development to change how underlying data loading works
- duplicated all related screens and components so that development can occur behind the `enableDeveloperExperiments` flag without breaking the existing screens
- added "Members (dev)" link to the duplicate screens in nav bar when `enableDeveloperExperiments` is on
2020-05-19 16:18:30 +01:00
Kevin Ansfield d6058dbf27 Co-located component template files
no issue

Keeps component JS backing files and template files in the same directory which avoids hunting across directories when working with components. Also lets you see all components when looking at one directory, whereas previously template-only or js-only components may not have been obvious without looking at both directories.

- ran [codemod](https://github.com/ember-codemods/ember-component-template-colocation-migrator/) for app-level components
- manually moved in-repo-addon component templates in `lib/koenig-editor`
- removed all explicit `layout` imports as JS/template associations are now made at build-time removing the need for them
- updated `.embercli` to default to new flat component structure
2020-05-18 13:14:08 +01:00
renovate[bot] 8dd6c5c5c0
Update dependency ember-infinity to v2.1.2 (#1573)
* Update dependency ember-infinity to v2.1.2
* updated gh-infinity-loader template to match ember-infinity default template

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-05-18 09:06:04 +01:00
renovate[bot] cc80214916
Update dependency ember-power-select to v4 (#1528)
* Update dependency ember-power-select to v4
* Fixed trigger component override collision when building

- move the "override" into our own namespace
- update all `<PowerSelect>` usage to explicitly reference our customised trigger component

* Bumped ember-power-datepicker

- bumps `ember-basic-dropdown` sub-dependency
- resolves "Error: Could not find module `ember-compatibility-helpers` imported from `@glimmer/component/index`"
- https://github.com/cibernox/ember-basic-dropdown/issues/551

* Updated trigger to use class syntax

- it's not possible to use `.extend()` on an imported class

* Updated <GhBasicDropdown>

- match updated ember-basic-dropdown code

* Added `autofocus` modifier

- added `ember-modifier` dependency so that we can create our own render modifiers

* Updated <GhSearchInputTrigger> to a glimmer component

* Updated gh-token-input components

* Fixed tests

- wrap `<PowerSelect>` with `<div>` to maintain test selectors
- fixed `<GhBasicDropdown>` not rendering anything due to not having a local template

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-05-17 22:35:53 +01:00