Commit Graph

31241 Commits

Author SHA1 Message Date
Naz
d817e5830d
Added header snapshots to webhook e2e tests
refs https://github.com/TryGhost/Toolbox/issues/320

- Header snapshot matching was missing from webhook e2e tests. With a bumped version of webhook-mock-receiver it's now possible to record and match webhook request headers.
2022-10-05 17:23:02 +08:00
Daniel Lockyer
8b7a573a1d
Released Portal v2.13.2 2022-10-05 16:03:46 +07:00
Daniel Lockyer
e60fc167e4
Improved yarn ship for Portal
refs https://github.com/TryGhost/Toolbox/issues/426

- with the existing `ship` command, it publishes to npm before pushing
  to GitHub
- I fear we're likely to run into a scenario where the HEAD of `main` is
  behind, so the git push fails, and then rebasing the HEAD will break
  the tags that we created
- in this scenario, I think it's better to hard reset back, git pull and
  then try again
- in that case, we need to publish to npm after GitHub
- this commit should implement that
2022-10-05 15:48:10 +07:00
Daniel Lockyer
700a62e048
Added quotes to version-tag-prefix
- without this, the following line does not apply for some reason
2022-10-05 15:27:20 +07:00
Daniel Lockyer
a26886ed65
Updated Portal README and repository link
refs https://github.com/TryGhost/Toolbox/issues/426

- these needed updating now Portal is in the monorepo
2022-10-05 15:22:17 +07:00
Daniel Lockyer
2a40f72f36
Added yarn test:unit to Portal
refs https://github.com/TryGhost/Toolbox/issues/426

- this ensures we provide a `test:unit` command for CI
- this probably needs changing in the future - not sure yet
2022-10-05 15:17:01 +07:00
Daniel Lockyer
22c85df66f
Added .yarnrc config for Portal
refs https://github.com/TryGhost/Toolbox/issues/426

- this ensures the git tag and commit message are in the expected format
2022-10-05 15:15:14 +07:00
Daniel Lockyer
314281cf08
Removed extraneous logging from Portal dev script
refs https://github.com/TryGhost/Toolbox/issues/426

- now Portal is in the monorepo, the dev script doesn't need to wipe the
  console output nor print instructions as that should be handled with
  setting environment variables
2022-10-05 15:13:34 +07:00
Daniel Lockyer
08cef79674
Updated lockfile 2022-10-05 15:07:12 +07:00
Daniel Lockyer
181f12d2de
Cleaned up extra files in Portal package
refs https://github.com/TryGhost/Toolbox/issues/426

- these files are no longer needed now the code is in the Ghost monorepo
2022-10-05 15:06:36 +07:00
Daniel Lockyer
2f36651e3c
Migrated code and history from Portal repo
refs https://github.com/TryGhost/Toolbox/issues/426

- this migrates all code and history over from the Portal repo so we can
  provide a better development experience
2022-10-05 15:02:24 +07:00
Sanne de Vries
b7fd0c04b6 Updated tag and history breadcrumbs
Refs https://www.notion.so/ghost/Switch-breadcrumb-style-513a624c0e0d490ca39a2fdb97a6971a

- Updated the copy to follow the common breadcrumb pattern
2022-10-05 12:40:51 +07:00
Daniel Lockyer
ab99109bbf
Added support for running Portal from the monorepo
refs https://github.com/TryGhost/Toolbox/issues/426

- this adds support for `--portal` in `yarn dev` to support the upcoming
  migration of Portal into the monorepo
- also adds the Portal folder to the ignorelist for nodemon so Ghost
  doesn't bootloop
2022-10-05 11:51:06 +07:00
renovate[bot]
a5adffbcb5 Update Test & linting packages 2022-10-05 11:23:47 +07:00
Daniel Lockyer
b73a657435 Updated react-scripts and eslint-plugin-ghost dependencies
refs https://github.com/TryGhost/Toolbox/issues/426

- this commit bumps both dependencies because it resolves various issues
  I've encountered when moving Portal to the Ghost monorepo
2022-10-05 11:20:29 +07:00
Daniel Lockyer
8daa06a3b8 Fixed various linting issues
- these changes were needed ahead of the upcoming bump to react-scripts,
  which bumps eslint to v8, and therefore we can update
  eslint-plugin-ghost, which introduces some new linting rules
2022-10-05 11:11:03 +07:00
Daniel Lockyer
264e6d41a7 Updated CI Ubuntu version to latest
- 18.04 is deprecated and getting phased out so we should switch to the latest version
2022-10-05 10:58:24 +07:00
Daniel Lockyer
20d9256105 Updated CI Node version to 16
refs https://github.com/TryGhost/Toolbox/issues/163

- Node 16 is our recommended version so we should test using that
2022-10-05 10:56:39 +07:00
renovate[bot]
2c2ee81adb
Update Test & linting packages 2022-10-05 00:36:08 +00:00
Kevin Ansfield
289e8a8da6 Fixed staff acceptance test
refs e0430b4efc

- acceptance test had mixed up name/slug fields so was testing for incorrect values now that cmd+s inside the slug field is working as really expected
2022-10-04 18:55:25 +01:00
Kevin Ansfield
e0430b4efc 🐛 Fixed ctrl/cmd+s not saving focused fields on general/staff settings screens
no issue

- swapped from route actions triggered by shortcuts mixin to explicit `{{on-key}}` actions
- when saved via keyboard, blur any focused element to trigger it's on-blur action and schedule the save to run after those actions
2022-10-04 17:55:24 +01:00
Kevin Ansfield
c77c150745 Refactored facebook/twitter URL inputs
refs https://github.com/TryGhost/Ghost/issues/14101

Twitter/facebook URL validation doesn't follow our typical validation and was duplicated across multiple screens making the controllers unnecessarily complex.

- extracted url input fields and their validation into separate components
- uses tracked scratch values so that the input field values can reset to the saved value on save
  - twitter/facebook URL inputs are different to our other inputs because invalid values won't prevent saving, instead they are reset to their previous value on save
- added `this.validate()` call after a successful save in `settings` service so the service and underlying model validations are both in sync (fixes validation error sticking around after saving with invalid twitter/facebook values that have been reset)
2022-10-04 17:55:24 +01:00
renovate[bot]
9608f834c3 Update sentry-javascript monorepo to v7.14.1 2022-10-04 15:59:31 +00:00
John O'Nolan
5106643871
Updated readme download count 2022-10-04 10:26:33 -05:00
Djordje Vlaisavljevic
b15451dfa6 Deemphasized unavailable sources and added an explainer
refs https://github.com/TryGhost/Team/issues/1986
2022-10-04 13:29:25 +02:00
Kevin Ansfield
d8193da005 Revert "Fixed errors thrown from blank twitter/facebook URL fields"
This reverts commit a523fedccb.

- caused input value to be cleared on focus+blur with no changes
- reverting in favor of an incoming refactor
2022-10-04 10:30:13 +01:00
Kevin Ansfield
a523fedccb Fixed errors thrown from blank twitter/facebook URL fields
no issue

- reset logic was incorrect meaning that if you focused a twitter/facebook URL field then moved to a different field without inputting anything an error would be thrown from trying to use `.match()` on `null`
2022-10-04 10:09:36 +01:00
Sanne de Vries
0124c2f28a Updated member activity page with new breadcrumb styles
Refs https://www.notion.so/ghost/Switch-breadcrumb-style-513a624c0e0d490ca39a2fdb97a6971a

- Filtering on specific member activity now uses new breadcrumb pattern
- Fixed double scrollbar issue on member activity and history page
2022-10-04 13:51:01 +07:00
Sanne de Vries
2c498ab193 Updated breadcrumb and title style across admin
Refs https://www.notion.so/ghost/Switch-breadcrumb-style-513a624c0e0d490ca39a2fdb97a6971a

- Separating out the breadcrumbs and the title makes it easier to navigate back on multiple levels for nested pages.
- Avoids very long titles, as it doesn't include breadcrumbs anymore
2022-10-04 12:35:29 +07:00
Rishabh
09fbe19a31 Fixed anchor chart load for site without paid tiers
refs https://github.com/TryGhost/Team/issues/2019

- the anchor chart keeps showing the loading spinner for a site that has no paid tiers and the source attribution flag switched on.
- this was because it tries to load the the MRR chart by default, which doesn't has any data when paid tiers are disabled.
- updated the chart to use `total members` data when paid tiers is disabled
2022-10-04 10:34:44 +05:30
Ronald Langeveld
226794e201
🐛 Fixed broken close buttons on modals (#15514)
* 🐛 Fixed broken `close` button on modals
no issue

Some modals' close elements containing `{{on "click" @close}}` and `href=""` would not take the 'on cl
ick' function into account, meaning the whole page would get redirected to "/" (back to the root of the dashboard) instead of just closing the modal.
2022-10-04 06:33:49 +04:00
renovate[bot]
8751245fa5 Update sentry-javascript monorepo to v7.14.1 2022-10-04 08:07:37 +07:00
Kevin Ansfield
cd9a50841e Fixed tests
refs 85cce39af7

- removed out of date transfer owner modal integration test
- fixed missing `?` in optional chaining in `<GhImageUploader>` error handling
2022-10-03 22:05:02 +01:00
Kevin Ansfield
bdc5984cdc Fixed linter error
refs 85cce39af7
2022-10-03 21:20:37 +01:00
Kevin Ansfield
85cce39af7 Refactored staff user modals
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
- cleaned up the `upload-image` modal which had multiple areas of code that were no longer being used
- disabled `no-duplicate-landmark-elements` template lint rule as it's buggy and mostly gives false positives
2022-10-03 21:15:34 +01:00
Kevin Ansfield
74d66ca9be Renamed incorrect test selectors on limit modals
no issue

- selectors hadn't been updated when copy/pasting modal contents
2022-10-03 21:15:34 +01:00
Stephen Sauceda
eb585f9c02
🐛 Fixed active state bug in sidebar nav (#15511)
closes: https://github.com/TryGhost/Ghost/issues/15506

- The sidebar items that don't open the editor were missing some relative current-when attributes so the nested views weren't considered "active".
2022-10-03 19:49:21 +01:00
Djordje Vlaisavljevic
02369ee852 Switched the dash character
refs https://github.com/TryGhost/Team/issues/1986
2022-10-03 17:29:07 +02:00
Fabien 'egg' O'Carroll
35bc5fa08a
Fixed no-shadow lint warnings (#15520)
We're planning to change this from a warning to an error and need to
clean the codebase up before we do so.

In all of these cases the shadowing was known about and was not
causing unexpected behaviour, so the refactor consists entirely of
renaming, rather than refactoring/bug fixes.
2022-10-03 15:50:28 +01:00
Kevin Ansfield
353cad7ed2 Fixed mirage members route permissions checks
refs 568e4183e3
refs 258f56ded9

- when in test environment add a `X-Test-User` header to API requests that allows the mirage endpoints to check the logged in user without having to cross boundaries into the application or test contexts
2022-10-03 14:59:16 +01:00
Rishabh
01249926d5 Refined attribution data on member details page
refs https://github.com/TryGhost/Team/issues/1986

- hides referrer source on member details page if its `Created manually` as its not useful
2022-10-03 18:58:48 +05:30
Djordje Vlaisavljevic
c48df76d9b Updated formatting of the signup info
refs https://github.com/TryGhost/Team/issues/1986
2022-10-03 14:25:32 +02:00
Djordje Vlaisavljevic
f351064726 Commented out the Learn more link
refs https://github.com/TryGhost/Team/issues/1986
2022-10-03 14:20:03 +02:00
Kevin Ansfield
568e4183e3 Disabled mirage member routes permission checks
refs 258f56ded9

- `@ember/test-helpers` is not included outside of test builds but we load mirage in development too so this was causing import errors that completely broke the app in development
- commented out the checks for now to get development working again whilst we look for alternatives to `getContext()`
2022-10-03 13:13:37 +01:00
Hannah Wolfe
04621b1e2e
Fixed ESLint no-shadow warnings in members-api
- I want to upgrade no-shadow to an error, but to do this I need to resolve the outstanding warnings
- This is not all the warnings, just the ones that were easy to fix
2022-10-03 12:08:55 +01:00
Kevin Ansfield
258f56ded9
Added regression test for publishing as editor when over member limit (#15518)
closes https://github.com/TryGhost/Team/issues/2010
refs a67cb265fc

- wrapped all members endpoints in a permission check that returns a 403 response if the logged in member is not an admin
- added a publish-flow acceptance test that goes through the flow as an Editor user that fails if the stats endpoint is hit and throws a permissions error
- removed some unnecessary waits in members acceptance test that were added for earlier versions of Ember
2022-10-03 12:05:58 +01:00
Kevin Ansfield
485b793ee3 Deleted test for component that doesn't exist
no issue

- looks like the test file was left over from development
2022-10-03 11:26:00 +01:00
Djordje Vlaisavljevic
7fea370faf Fixed all sources modal gradient in dark mode
refs https://github.com/TryGhost/Team/issues/1986
2022-10-03 12:24:54 +02:00
Djordje Vlaisavljevic
ee40c92758 Updated cursor for disabled dropdown
refs https://github.com/TryGhost/Team/issues/1986
2022-10-03 11:42:50 +02:00
Rishabh
e57502e02f Handled empty attribution section on member detail page
refs https://github.com/TryGhost/Team/issues/1986

- hides attribution section if there is no source and page/post attribution
2022-10-03 14:58:14 +05:30