Commit Graph

616 Commits

Author SHA1 Message Date
Naz
40cedb84ff Added integration with limit service
refs https://github.com/TryGhost/Team/issues/587

- This is first pass on the frontend limit-service integration. Max count queries are substituted with HTTP requests to mimick backend checks. Note, they are not meant to substitute backend checks only to suplment them.
2021-04-08 16:59:56 +12:00
Sanne de Vries
2e8109d05f Clarified staff user roles in Admin (#1874)
refs https://github.com/TryGhost/Team/issues/572

- Replaced dropdown in invite-user modal with radio buttons
- Added description for each user role
- Added icon to provide more info on hover for each role
- Got rid of unused box styling
2021-04-07 15:20:30 +01:00
naz
238632402c 🐛 Fixed host limit error when resending a pending invite (#1881)
refs https://github.com/TryGhost/Team/issues/587
refs e30b9735fa

- It was not possible to invite a new Contributor to a site that has reached its limit
- This fix divides the resend invite action into two separate steps: 1. Deleting existing invite 2. Creating a new one for the same data
- It was hitting the limit because the permissions were correctly checking for "add" action being executed when the limit of invites/staff users was already used up. By removing existing invite we mimic the behavior the server would do for us anyway (2111992dd4/core/server/services/invites/invites.js (L18-L22))

Co-authored-by: Rish <zrishabhgarg@gmail.com>
2021-04-06 15:10:03 +12:00
Sanne de Vries
2f6b643244 Fixed test 2021-03-23 12:42:23 +01:00
Rishabh Garg
74e2d3ef8c 🐛 Fixed MRR start date value in chart (#1865)
no refs

MRR start date value for charts was being calculated with start value as 0, assuming we have the data for first date in our range to use as start value. Since the events data returned only has data on dates where any MRR event happened, in case the first date in our range didn't have any. data we started from 0 instead of value on previous date. This fix

- updates calculation to pick the start value for chart based on value on last date in our range(30 days)
- adds unit tests for stats
2021-03-15 15:23:55 +05:30
Sanne de Vries
6ea24e6384 Changed all green and blue modal buttons to black 2021-03-05 13:16:43 +01:00
Peter Zimon
477b58e076 Using accent color on login button 2021-03-03 13:36:44 +01:00
Peter Zimon
acc4254f3c Basic sign in UI update
- updated sign in UI to match better with the rest of Ghost.org
2021-03-02 17:40:35 +01:00
Kevin Ansfield
e66bb4feac Removed tour feature
refs 10b48b1d6d
refs 1531712d92

- the tour feature is no longer used so all associated code can be removed
- removes `liquid-tether` dependency as it was only used by the tour throbbers/popovers
2021-03-02 14:29:26 +00:00
Kevin Ansfield
ff8f45be54 Fixed tests
refs 0503ce5f35

- referenced commit changed `dashboard` to redirect to `site` when logged in user is not an owner or admin
- updated tests to reflect the change
2021-02-24 15:56:18 +00:00
Kukhyeon Heo
568cd65fb3 Added YAML file support for redirects (#1703)
refs https://github.com/TryGhost/Ghost/issues/11085
refs https://github.com/TryGhost/Ghost/pull/12187

- YAML file support has been added to Ghost's API through referenced above PR. YAML will become a default supported file in the next version of Ghost replacing JSON redirects
2021-02-22 13:27:00 +13:00
Naz
d84a70752d Removed more leftover unsplash code & fixed tests
refs refs 07abb5443a

- Found some more unnecessary code for previous unsplash setting structure and removed it.
- Refactored the tests to be more in line to how AMP tests are done
2021-02-18 15:03:53 +13:00
naz
07abb5443a Fixed EmberObject.create error on Admin start (#1841)
refs https://github.com/TryGhost/Ghost/pull/12632

- The `unsplash` setting has been migrated to a new format - plain boolean value. This is why it's no longer needed to do any serialization dances
2021-02-18 13:25:21 +13:00
Peter Zimon
43708f20fe Refined buttons on staff screens 2021-02-12 16:58:04 +01:00
Kevin Ansfield
5a8753fb8f Added ability to install free themes directly from GitHub (#1837)
refs https://github.com/TryGhost/Ghost/issues/12608
requires https://github.com/TryGhost/Ghost/pull/12635

- adds `/settings/themes/install` route with `source` and `ref` query params that match the API. Shows a confirmation modal when accessed asking to confirm installation and activation
  - does not allow Casper to be installed
  - warns if installing the theme will overwrite an existing one
  - follows similar process to zip uploads for error handling
- adds install/preview links for Massively in the free themes showcase

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2021-02-12 09:19:25 +00:00
Kevin Ansfield
8e8059cc0c Skipped test that broke with FF85 on linux
no issue

- possible difference in `localeCompare()` ordering, edge case enough not to worry about for now
2021-02-10 09:23:29 +00:00
Kevin Ansfield
39a883a4dc Fixed tests
refs 8490ebc542

- updated editor test to use stable selector for the save button
- changed save button test attribute to match our standard naming scheme
2021-02-08 21:56:18 +00:00
Peter Zimon
697a28ecef Fix test 2021-02-08 15:08:55 +01:00
Sanne de Vries
47abad1837 Updated buttons and styles in editor, post-preview modal and launch-site wizard
No ref

- Updated all buttons in the editor header
- Updated buttons in publish menu
- Updated back-button in post-preview
- Updated icons for launch-site wizard
- Updated Stripe-info box in launch-site wizard
2021-02-08 10:13:26 +01:00
Kevin Ansfield
27dadcf1c4 Switched from v3 to canary API
refs https://github.com/TryGhost/Team/issues/221

- we're getting ready for the 4.0 API version so we should be using canary to fully test the changes
- changed from `v3` to `canary` in `utils/ghost-paths.js`
- updated mirage and tests to use `ghostPaths` util so we only need to change the version in one place in the future
2021-02-05 09:12:26 +00:00
Kevin Ansfield
5092e936cc Fixed unauthed access to launch wizard and updated test to use Owner user
refs 6a14087ccc

- `super()` is needed in `beforeModel()` hook so that the AuthenticatedRoute redirect can occur
- launch wizard acceptance test needs to use an Owner user because Admins don't have access
2021-02-04 17:45:16 +00:00
Peter Zimon
04d9caefed Updated navigation (#1832)
no issue

Updated settings navigation to a completely redesigned flow for Ghost 4.0 🎉

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Fabien O'Carroll <fabien@allou.is>
Co-authored-by: Rish <zrishabhgarg@gmail.com>
2021-02-02 16:08:06 +00:00
Kevin Ansfield
b466e844e4 Removed unused GhLaunchWizard tests
no issue

- tests were fragile because they were checking content that is undergoing heavy iteration
- tests were not testing anything important
2021-02-02 16:08:06 +00:00
Kevin Ansfield
151ae2ff57 Fixed tests
refs 9ffc7bce36
2021-02-02 16:08:06 +00:00
Kevin Ansfield
3dc4213678 Fixed tests
refs 9ffc7bce36

- removed acceptance tests that were checking removed routes
2021-02-02 16:08:06 +00:00
Peter Zimon
0b4d789bbe Moved publication identity to Design settings 2021-02-02 16:08:04 +00:00
Peter Zimon
679dc3c0d6 Separate theme design (#1831)
* Separated theme and design settings
2021-02-02 16:08:04 +00:00
Peter Zimon
c610d3d072 Moved members settings out of labs 2021-02-02 16:08:04 +00:00
Peter Zimon
91d1a4edd0 Fixing tests 2021-02-02 16:08:04 +00:00
Kevin Ansfield
18f8c9325d Fixed tests expecting / to redirect to /site
no issue

- `/` now redirects to `/dashboard` instead of `/site`
2021-02-02 16:08:03 +00:00
Kevin Ansfield
4b5f3f64a4 Added launch wizard prototype
refs https://github.com/TryGhost/Team/issues/450

Initial prototype of new launch-site wizard, meant to speed up the setup of a members site with the following steps:

1. Customise design
2. Connect Stripe
3. Set subscription pricing

- added wizard link to dashboard screen
- added `/launch/*` screens representing the wizard steps
- duplicated and refactored relevant general and members setting code and templates into each step
2021-02-02 16:08:03 +00:00
Kevin Ansfield
a6b11b8c0c Added blank dashboard screen
no issue

- adds blank `/dashboard` route ready for future 4.0 related changes
- `/` now redirects to `/dashboard` instead of `/site`
- adds "Dashboard" link to main nav menu
2021-02-02 16:08:00 +00:00
Kevin Ansfield
a059ace335 Reverted dashboard route
no issue

- removing dashboard prototype from master ready to re-apply in 4.0 branch
2021-01-21 09:04:54 +00:00
Kevin Ansfield
72d8b4f14d Reverted launch wizard prototype
no issue

- removing launch wizard from master ready to re-apply in 4.0 branch
2021-01-21 09:02:19 +00:00
Kevin Ansfield
26f4e79ac7 Fixed test (updated expected text in) 2021-01-19 22:38:32 +00:00
Aileen Nowak
abc38ab375 Updated links to ghost.org sites
no issue

Follow-up task of the updated Ghost Docs structure. Updated links reflecting the new structure to prevent unnecessary 404s and redirects.
2021-01-19 13:18:59 +13:00
Kevin Ansfield
00c73bbf68 Actually fixed tests 2021-01-18 21:16:00 +00:00
Kevin Ansfield
60be92bbc0 Fixed tests 2021-01-18 21:07:48 +00:00
Kevin Ansfield
d48abaa1f8 Added outline launch wizard framework
refs https://github.com/TryGhost/Team/issues/450

- adds `launch/*` routes corresponding to launch wizard steps
- sets up navigation between each wizard step
- adds components for each `launch/*` step to contain step-related functionality and facilitate later refactoring to a generalised wizard component
- adds link to the launch wizard from the dashboard screen
2021-01-18 13:48:23 +00:00
Kevin Ansfield
5463e95d8e Added blank dashboard screen
no issue

- preparatory work for upcoming features
- default homepage when developer experiments is enabled
2021-01-18 09:02:44 +00:00
Sanne de Vries
27cc99c907 Fixed issues for member details mobile view (#1807)
* Fixed issues for member details mobile view

No-ref

- Changed order to display feed at the bottom
- Displayed heading and value vertically between 1400px and 1160px
- Displayed "Complementary plan" copy and switch vertically between 1400px and 1160px
- Added margin below "Continue subscription" button
- Prevented date in feed to wrap

* fixed tests

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2020-12-16 10:04:33 +01:00
Sanne de Vries
77e24d4d25 Fixed test failure for post time format 2020-12-11 10:03:29 +01:00
Rishabh Garg
f068e40723 Added new members CSV importer (#1797)
no refs
depends on https://github.com/TryGhost/Ghost/pull/12472

The members CSV importer gets an overhaul and works with new importer module in members service, performing the import in a background job when the import will take too long to complete in a reasonable time and send an email with data on completion. Also includes updated CSV mapping UI and error handling to allow easier import from different type of exports.

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
Co-authored-by: Peter Zimon <zimo@ghost.org>
2020-12-10 01:02:31 +05:30
Peter Zimon
6ecba355eb Moved members settings to new page (#1736)
no refs

Moves members related settings in Labs to its own page to improve the overall UX and make it more consistent with the rest of the Admin.
2020-10-22 16:09:00 +05:30
Peter Zimon
33e1ceb010 Fixed test for scheduling copy change
no refs.
2020-10-09 17:15:21 +02:00
Kukhyeon Heo
c38ca94683 🐛 Fixed Ctrl/Cmd+S triggering browser save when tags or authors input has focus (#1707)
closes https://github.com/TryGhost/Ghost/issues/11786

`GhTokenInput` uses `PowerSelect` component of `ember-power-select` internally in `app/components/gh-token-input/select-multiple`. 

When you open that component, [you can find](d36f38f39e/addon/components/power-select.ts (L262-L278)) that it calls `stopImmediatePropagation` when ctrl/cmd or meta key is down.

```js
  handleTriggerKeydown(e: KeyboardEvent) {
    if (this.args.onKeydown && this.args.onKeydown(this.storedAPI, e) === false) {
      e.stopImmediatePropagation();
      return;
    }
    if (e.ctrlKey || e.metaKey) {
      e.stopImmediatePropagation();
      return;
    }
    if ((e.keyCode >= 48 && e.keyCode <= 90) || isNumpadKeyEvent(e)) { // Keys 0-9, a-z or numpad keys
      (this.triggerTypingTask as unknown as Performable).perform(e);
    } else if (e.keyCode === 32) {  // Space
      this._handleKeySpace(this.storedAPI, e);
    } else {
      return this._routeKeydown(this.storedAPI, e);
    }
  }
```

Because of that, I had to dispatch event directly to the root of the Ghost admin app.
2020-09-21 18:14:57 +01:00
Nazar Gargol
240edf89aa Added automatic 'first_name' column mapping for members CSV importer
no issue

- When columns which match /name/ patter are present in imported CSV they should detect the mapping to 'name' column automatically
2020-08-20 15:04:35 +12:00
Kevin Ansfield
0b6a2eda80 Updated core files to match ember-cli new output 2020-08-03 09:24:58 +01:00
Kevin Ansfield
3b78973a21 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
Kevin Ansfield
6048b44d55 Removed errant .only from test suite 2020-07-22 20:00:03 +01:00