Commit Graph

31551 Commits

Author SHA1 Message Date
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
Kevin Ansfield
786e0ac9c5
Updated ValidationEngine to support bare native class models (#15567)
no issue

- if a plain native class instance with tracked properties is validated against the `ValidationEngine` and it's associated validators would cause errors by assuming that the instance has a `.get()` method
- updated all model access in `ValidationEngine` and the validators to use direct property access which works for both native class and `EmberObject` instances
2022-10-07 20:13:42 +01:00
Kevin Ansfield
0a827dfb47 Fixed max call stack error on error controller
no issue

- getter for `error` should return the model, not itself 🤦🏻‍♂️
2022-10-07 19:46:30 +01:00
Kevin Ansfield
717e89113c Refactored reset controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to full native class syntax
- swapped use of `<GhTextInput>` in favor of native `<input>` and removed use of `{{action}}` in associated template
2022-10-07 19:07:51 +01:00
Kevin Ansfield
ef0178cd06 Refactored posts and pages controllers to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to full native class syntax
- removed loading of snippets as they are not needed on post lists (they are needed on the editor screen which does it's own loading)
- removed `access` query param definition leftover from earlier development
- removed use of `{{action}}` in associated templates
2022-10-07 18:39:34 +01:00
Kevin Ansfield
a8fb80652c Refactored error controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to full native class syntax
2022-10-07 18:05:24 +01:00
Kevin Ansfield
cefd51c81c Refactored billing controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to full native class syntax
2022-10-07 17:59:49 +01:00
Kevin Ansfield
4f59aa8e25 Refactored application controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to full native class syntax
2022-10-07 17:59:34 +01:00
Kevin Ansfield
0de195d052 Updated component tests for moved nav item components
refs 48af4ab3a1

- updated test locations and component names
- updated tests to use angle bracket syntax to match component usage
2022-10-07 17:42:52 +01:00
Kevin Ansfield
48af4ab3a1 Moved navigation screen components
no issue

- moved screen-specific components out of the top-level components directory
- top-level directory should eventually only contain generally re-usable/application-wide components
2022-10-07 17:23:39 +01:00
Kevin Ansfield
ea05b30380 Refactored navigation controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to native class syntax
- removed use of jQuery that was long out of date and not necessary
2022-10-07 17:23:17 +01:00
Kevin Ansfield
fab7a82185 Fixed missed component rename
refs 74daa02b52
2022-10-07 17:17:44 +01:00
Kevin Ansfield
74daa02b52 Moved members list item components
no issue

- moved screen-specific components out of the top-level components directory
- top-level directory should eventually only contain generally re-usable/application-wide components
2022-10-07 17:09:18 +01:00
Kevin Ansfield
7eab83a6ec
Fixed member ProxyObject from sparse array leaking out of members list (#15565)
no issue

- the `ella-sparse-array` dependency used for the sparsely populated list on the members screen creates ProxyObjects that wrap the underlying member model instances meaning the forced use of `.get()` and `.set()` required by ProxyObject was leaking through to other areas of the app causing a mismatch in code patterns
- moved the loading state for each member into a separate component and put the loading conditional directly inside the `{{#each members}}` block so that we can pass the real model instance through to components via `{{member.content}}` rather than passing the ProxyObject wrapper, avoiding unexpected errors when not using `.get()` and `.set()` on member arguments
2022-10-07 17:03:45 +01:00
Kevin Ansfield
7b443d4b63 Removed need for .get() with config service
no issue

The `config` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `config` service by grabbing the API response after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to a tracked object holding the API response data. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `config.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed unnecessary async around `config.availableTimezones` which wasn't making any async calls
2022-10-07 16:14:57 +01:00
Kevin Ansfield
060d791a63 Removed need for .get() with settings service
no issue

The `settings` service has been a source of confusion when writing with modern Ember patterns because it's use of the deprecated `ProxyMixin` forced all property access/setting to go via `.get()` and `.set()` whereas the rest of the system has mostly (there are a few other uses of ProxyObjects remaining) eliminated the use of the non-native get/set methods.

- removed use of `ProxyMixin` in the `settings` service by grabbing the attributes off the setting model after fetching and using `Object.defineProperty()` to add native getters/setters that pass through to the model's getters/setters. Ember's autotracking automatically works across the native getters/setters so we can then use the service as if it was any other native object
- updated all code to use `settings.{attrName}` directly for getting/setting instead of `.get()` and `.set()`
- removed use of observer in the `customViews` service because it was being set up before the native properties had been added on the settings service meaning autotracking wasn't able to set up properly
2022-10-07 16:14:57 +01:00
Ghost CI
b5fd02c9e8 v5.18.0 2022-10-07 16:00:53 +01:00
Ghost CI
a6177b46b5 🎨 Updated Casper to v5.3.2 2022-10-07 16:00:52 +01:00
Rishabh Garg
8a598fe721
🐛 Fixed member importer crash for failed imports (#15560)
refs/closes https://github.com/TryGhost/Team/issues/2004

- for imports, members are created inside a transaction, which causes the member created events to be dispatched.
- its possible that transactions for import can be rolled back if for some reason there is an error down the line while inserting other member properties. The rollback doesn't commit the member to DB, but the event dispatched earlier will still try to create the member created event which fails due to missing member id.
- knex transactions resolve the `executionPromise` both in case of explicit commit or rollback from the user, so just the transaction end check will not be good enough to make sure the member exists in DB
- adds explicit config to knex to reject transaction in case of rollback, which is then caught and event is not dispatched
2022-10-07 19:15:18 +05:30
Aileen Booker
c4188c1a9e
Added Ghost Explore in Ghost as iframe app behind feature flag (#15495)
no issue

- Added Ghost Explore screen behind alpha flag
- Moved existing /explore route to /explore/connect which we'll redirect to for outside requests
- Added iframe communication with Ghost Explore App
2022-10-07 14:32:54 +01:00
Simon Backx
7e3b41f643
Removed emailClicks feature flag (#15556)
fixes https://github.com/TryGhost/Team/issues/2028

Since link clicks became GA, some older components and templates are no longer used.
2022-10-07 14:27:57 +02:00
Rishabh
2612b44c21 Fixed column sorting for attribution table on analytics page
refs https://github.com/TryGhost/Team/issues/1986

- adds column sorting for attribution table on analytics page
2022-10-07 17:15:06 +05:30
Naz
f8b51822af
Fixed typos 2022-10-07 18:41:21 +08:00
Naz
54c19226bf
Fixed an unhandled exception in job manager
closes https://github.com/TryGhost/Toolbox/issues/402

- The SQL error was thrown whenever a job error was happening and was trying to persist an error. Persisting an error should only happen for "named" one-off jobs, instead of just one-off jobs.
2022-10-07 18:41:11 +08:00
Elena Baidakova
b3a33760ac
🎨 Improved preview text on member alert emails (#15543)
refs/closes TryGhost/Team#2014
- Updated preview text.
- By default email client pulls text from email body for preview. Was added spaces to prevent such behaviour.
2022-10-07 14:31:05 +04:00
Djordje Vlaisavljevic
38e06954a3 Updated heading copy
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 12:28:34 +02:00
Simon Backx
07cb542b97
Improved timezone support date picker and improved tests (#15545)
fixes https://github.com/TryGhost/Team/issues/1946

Problem:
- When running the admin tests in a timezone that is later than UTC, the tests failed.

Causes:
- Some tests needed some adjustements
- The DateTimePicker did not always use the correct timezone.
- Test models createdAt times sometimes depended on the timezone of the test runner

Solution:
- All the input DateTimePicker gets should be processed in the blog's timezone.
- Make sure that all communication (properties, setters, minDate...) with `PowerDatepicker` happens in the local timezone. When setting, convert that date to the blog timezone and use that as the real value.
2022-10-07 12:20:06 +02:00
Djordje Vlaisavljevic
e679bb4187 Updated the svg size
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 15:43:59 +05:30
Rishabh
6301307d41 Refined attribution source modal on dashboard
- removes static text for unavailable data on all sources modal
- updates dashboard mocks for attribution data
2022-10-07 15:43:59 +05:30
Rishabh
17f587ca0e Refined source attribution dashboard chart
- updates chart to show percentage value for each source
- adds Others bar back to the charts to show total percentage of other sources out of top 5
2022-10-07 15:43:59 +05:30
Djordje Vlaisavljevic
836010c0f2 Added back both columns to the all sources modal
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 15:43:59 +05:30
Djordje Vlaisavljevic
4630e5122b Fixed all sources modal height
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 15:43:59 +05:30
Djordje Vlaisavljevic
4704e7ab31 Added column sorting and removed the dropdown
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 15:43:59 +05:30
Djordje Vlaisavljevic
15fbd3d7e6 Updated attribution widget design
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 15:43:59 +05:30