Commit Graph

31584 Commits

Author SHA1 Message Date
jbenezech
3d44e37cbd
🐛 Fixed sitemaps with no content (#15571)
closes: https://github.com/TryGhost/Ghost/issues/14981

- Taxonomy-specific sitemaps were invalid xml when there was no data
- These invalid empty sitemaps were referenced in the index sitemap causing SEO tools to report errors
2022-10-12 14:11:19 +01:00
jbenezech
b9dd9f066d
🐛 Fixed settings overriden when updated from multiple tabs (#15536)
closes: https://github.com/TryGhost/Ghost/issues/15470

- When multiple browser tabs are open, each manipulate a different copy of ember data model, changes to the model in one tab are not reflected in the model of the other tab.
- When updating some settings, all current settings were sent to the API.
- As a result, when updating two different categories of settings (navigation/code inspection) in different tabs, the second update was overriding the first one.
- From a user perspective, this is not a natural behaviour. Only settings visible on-screen when clicking save should be modified.

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-10-12 14:03:54 +01:00
Daniel Lockyer
845f8d965e
Added test to validate schema structure
refs https://github.com/TryGhost/Toolbox/issues/441

- this is only v1 of the test I would like but it validates the keys on
  a column definition are part of an allowlist
- this has already uncovered a bug with `maxLength` (vs `maxlength`)
2022-10-12 19:19:33 +07:00
renovate[bot]
178df69ae2 Update dependency @playwright/test to v1.27.1 2022-10-12 17:55:29 +07:00
Daniel Lockyer
5aeaa977fd
Pinned moment dependency
- this shouldn't make any difference because `moment` has a resolution but we take
  the approach of pinning all our dependencies in this repository
2022-10-12 15:42:46 +07:00
Daniel Lockyer
e2ba19b0df
Fixed import of bson-objectid in accordance to the typings
- there's a few different ways we can import it but I've chosen to
  append `.default` as we have done in several other places in the code
2022-10-12 14:54:35 +07:00
Daniel Lockyer
2422f4a95c
Fixed minor jsdoc typing issue regarding arrays
- `[string]` indicates an array with exactly one item but we actually
  want the type to be `string[]` to indicate an array of strings
2022-10-12 14:52:59 +07:00
Daniel Lockyer
b3ee6a4c9e
Promoted sourceAttribution flag to private beta
refs https://www.notion.so/ghost/Source-attribution-7ad2f4f75b4a458f8d8090ad75d9359e

- this allows us to enable the feature for private testing before we
  continue with GA'ing it
2022-10-12 13:46:35 +07:00
Rishabh
6b7f4dd1c7 Fixed cursor for attribution table header
refs https://github.com/TryGhost/Team/issues/1986
2022-10-12 10:51:13 +05:30
Daniel Lockyer
727187df32
Added missing jsdoc imports for PaymentsService
- this helps with populating types in editors
2022-10-12 11:08:49 +07:00
renovate[bot]
ab598dd7ea Update dependency minimist to v1.2.7 2022-10-12 10:16:31 +07:00
renovate[bot]
6fc497743d
Updated @tryghost dependencies (#15479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-12 10:16:05 +07:00
renovate[bot]
2857fc5e67 Update dependency ember-ajax to v5.1.2 2022-10-12 10:15:02 +07:00
Simon Backx
68bdc1afea
Added post sentiment (#15592)
fixes https://github.com/TryGhost/Team/issues/2054

This change adds the sentiment and positive_feedback counts to the posts models. This change isn't really ideal because there are some problems here:
- sentiment isn't really a count
- we don't need to include the sentiment and positive_feedback as a default for posts (but the same is true for attribution)

It would make sense to move this to separate endpoints that only fetch the analytics for a given post when the analytics page is opened. But for our initial skateboard version of audience feedback this should be a good start to already see the data.
2022-10-11 17:52:14 +02:00
Simon Backx
c670209c82
Added audience feedback handling to Portal (#15590)
fixes https://github.com/TryGhost/Team/issues/2048

Changes so Portal can handle feedback links and use the members API to store a vote.
2022-10-11 17:14:43 +02:00
Djordje Vlaisavljevic
88d4872346 Added fix links in newsletter feature flag
refs https://github.com/TryGhost/Team/issues/2063
2022-10-11 17:08:41 +02:00
Daniel Lockyer
e11636b6f8
Fixed execution path for lint commands in lint-staged
refs https://ghost.slack.com/archives/C02G9E68C/p1665497363885949

- we've seen an issue with `lint-staged` in the Admin package because it
  doesn't pick up the lint-todo file, so it incorrectly flags linting
  issues that we're ignoring
- this is happening because it runs the command from cwd, where the lint
  exclusion file does not exist
- thankfully, `lint-staged` has `--relative` which will run the command
  from the directory where the command is defined in config, so `ghost/admin`
  in our case, and that means the lint file is present and picked up
2022-10-11 21:54:58 +07:00
Simon Backx
08309f8d88 Fixed audience feedback package dependencies
refs e540344ef2
2022-10-11 16:53:54 +02:00
Simon Backx
e540344ef2
Added audience feedback service and storage (#15584)
fixes https://github.com/TryGhost/Team/issues/2049
fixes https://github.com/TryGhost/Team/issues/2053

- This adds a new audience feedback package to Ghost. 
- A new members API to give feedback on posts using the `/api/feedback` endpoint.
- Added a new authentication middleware that supports both uuid-based and session based authentication.
2022-10-11 16:32:28 +02:00
Sam Lord
6ff34fb49f Added logging & metrics to mailgun API calls
refs: https://github.com/TryGhost/Toolbox/issues/439

Adds timed metrics to ensure we know how long Mailgun takes to respond to queries - as well as the status codes we hit.
2022-10-11 15:11:46 +01:00
Elena Baidakova
1221ba5d1d
Added feedback_enabled to newsletters table (#15589)
closes TryGhost/Team#2042
- Added ability to enable audience feedback per newsletter (just on BE side).
2022-10-11 16:06:26 +04:00
Simon Backx
74d749fa63
Added members_feedback table (#15581)
fixes https://github.com/TryGhost/Team/issues/2041
2022-10-11 13:21:31 +02:00
Naz
714e108d40
Fixed typo 2022-10-11 17:24:11 +08:00
Naz
9b34bd70a2
Added test coverage for Subscription edit API
refs https://github.com/TryGhost/Team/issues/2047

- We anticipate upcoming changes in the PUT /members/:id/subscriptions/:subscription_id endpoint , so covered it with a snapshot test to track the differences more precisely.
- Note, the test case contains a more explicit outgoing HTTP request mocking.
2022-10-11 17:24:00 +08:00
Djordje Vlaisavljevic
b3175b5b77 Deleted the chart and the dropdown
refs https://github.com/TryGhost/Team/issues/1986
2022-10-11 10:47:31 +02:00
Djordje Vlaisavljevic
73f679ce59 Updated attribution box design
refs https://github.com/TryGhost/Team/issues/1986
2022-10-11 10:47:31 +02:00
Djordje Vlaisavljevic
185f6132e1 Removed unavailable source explainer
refs https://github.com/TryGhost/Team/issues/1986
2022-10-11 10:47:31 +02:00
Djordje Vlaisavljevic
b9d80c1164 Commented out chart, legend and dropdown
refs https://github.com/TryGhost/Team/issues/1986
2022-10-11 10:47:31 +02:00
Djordje Vlaisavljevic
09efa27630 Fixed date range dropdown without flag
refs https://github.com/TryGhost/Team/issues/1986
2022-10-11 10:47:31 +02:00
Djordje Vlaisavljevic
fd790ae4c6 Made the dashboard header sticky
refs https://github.com/TryGhost/Team/issues/1986
2022-10-11 10:47:31 +02:00
renovate[bot]
4145b85b44
Update dependency eslint-plugin-react to v7.31.10 2022-10-11 04:51:25 +00:00
Daniel Lockyer
9f04475918
Refactored JSON content importer handler to async-await
- this makes the code easier to read and removes an import of Bluebird
2022-10-11 10:22:13 +07:00
renovate[bot]
3b62e8c52f Update sentry-javascript monorepo to v7.15.0 2022-10-11 09:24:03 +07:00
renovate[bot]
aa29478057 Update dependency @playwright/test to v1.27.0 2022-10-11 09:23:33 +07:00
renovate[bot]
9f5ca0ede0 Update dependency jwks-rsa to v2.1.5 2022-10-11 09:23:12 +07:00
John Grisham
c41f431fc7
Added e2e tests for page.added webhook (#15548)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-10 19:56:53 +01:00
Fabien 'egg' O'Carroll
dc8617a1e6
Added full flow test for click tracking (#15546)
refs https://github.com/TryGhost/Team/issues/1967

This tests the full flow of publishing a newsletter, and then checking
that clicked links will increase the click count, generate events for
the member which clicked the link as well as the redirects contain the
correct query params.
2022-10-10 10:15:31 -05:00
AmbroziuBaban
4ca74c0c2f
🐛 Fixed note field keyboard save in admin members form (#15476)
closes: https://github.com/TryGhost/Ghost/issues/15450

- the object property "note" was updated only on focus out, which is wrong
- the property should be updated on input
	-this problem occurred only for TextArea component
2022-10-10 13:59:49 +01:00
Daniel Lockyer
10c5f6680c
Added support for linting handlebars files in Admin when committing
- this requires duplicating the `*.js` definition as per the lint-staged
  docs because only the closest set of configuration applies at any one time
2022-10-10 17:12:37 +07:00
Daniel Lockyer
8ec071a47c
Update dependency eslint-plugin-ghost to v2.16.0 (#15551)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-10 10:23:24 +01:00
renovate[bot]
9cd15ec9fb Update dependency husky to v8.0.1 2022-10-10 15:49:51 +07:00
Daniel Lockyer
c80d6d5b1c
Updated .eslintignore list for core
- this file path no longer exists
2022-10-10 15:12:52 +07:00
Daniel Lockyer
a37b2cd24e Switched to Husky + lint-staged for git hooks
- up until this commit, git hooks were only used by a handful of people
  because they were a pain:
  - they'd only be set up when you did `yarn setup`
  - the existing hooks ran `yarn lint` on all projects, which was
    incredibly slow
- as a result, not many of us actually had them enabled, but this would
  cause issues in CI because people were pushing un-linted commits
- other JS projects tend to use husky to automate the git hook setup and
  lint-staged to speed up linting on changed files
- this commit switches to using them both
  - `lint-staged` only runs `eslint` on staged JS files that are about to
    be committed - if there's a linting error, it will stop the commit
  - I've configured the pre-commit hook to successfully exit in CI because we
    don't want to run pre-commit hooks right now
- this means we can remove Grunt - yay!
2022-10-10 15:10:48 +07:00
Simon Backx
73f5fd92eb Added audience feedback feature flag
closes https://github.com/TryGhost/Team/issues/2039
2022-10-10 09:27:45 +02:00
Naz
0125f51780
Fixed typo/reference in db schema
refs https://github.com/TryGhost/Team/issues/2030

- There was a typo and a reference to a wrong field in members_stripe_customers_subscriptions schema definition
2022-10-10 14:03:42 +08:00
Daniel Lockyer
83d7e5afd5
Fixed minor jsdoc issues in Stripe package
- all are minor issues but they stop the editor showing function names,
  parameters and return types otherwise
- this should help with a better developer experience
2022-10-10 12:15:48 +07:00
Sanne de Vries
3895f20d89 Fixed missing padding on whats-new page title 2022-10-10 11:06:01 +07:00
Daniel Lockyer
75f83718f5
Fixed comment typos in schema definition 2022-10-10 10:58:51 +07:00
renovate[bot]
34439f2e28 Update dependency html-validate to v7.6.0 2022-10-10 10:33:10 +07:00
renovate[bot]
82441e943d Update dependency express to v4.18.2 2022-10-10 10:29:34 +07:00