Commit Graph

15052 Commits

Author SHA1 Message Date
Hakim Razalan
48b033f1e1
🐛 Fixed missing unsaved changes modal for member newsletters (#15564)
closes: https://github.com/TryGhost/Ghost/issues/15507

- manually handle relationship changes detection labels and newsletters
- add `dirtyAttributes` controller property - return newsletters and labels dirty attributes status
2022-10-21 21:05:14 +01:00
Hakim Razalan
b88a54fb71
🐛 Fixed redirect to signin modal not shown when logged out (#15522)
fixes:  https://github.com/TryGhost/Ghost/issues/15291

- An attempt to improve re-authenticate modal toggle - show re-authenticate modal every time user save (ctrl/cmd + s)
- An attempt to fix redirection when user re-login on different tab. Prevent redirection to sign-in page since the user already logged in on another tab.
- Re-enable `editor` test on `authentication-test.js`
2022-10-21 21:03:12 +01:00
Halldor Thorhallsson
dbad621b91
Removed bluebird from fixture-utils.js (#15626)
refs: https://github.com/TryGhost/Ghost/issues/14882

- Opted to use the in-house `sequence` function when refactoring Bluebird's `Promise.each` to avoid deadlock issues (see 734ef66e6c). 
-It's hard to know without tonnes of context if any `Promise.each` are safe to refactor to `Promise.all`.
2022-10-21 20:56:21 +01:00
Elena Baidakova
9720459f55
Added pie chart for activity feed (#15673)
closes TryGhost/Team#2088
- Added pie chart to feedback event
- Added `negative_feedback` field to response from BE
2022-10-21 21:34:05 +04:00
Halldor Thorhallsson
39e246aaf8
Removed bluebird from fixture-manager.js (#15629)
refs: https://github.com/TryGhost/Ghost/issues/14882

- Removing bluebird specific methods in favour of the Ghost sequence method so we can remove the bluebird dependency

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-10-21 18:08:44 +01:00
James Morris
a79c48e547 Add in dummy rows and empty states to the engagement bar
refs https://github.com/TryGhost/Team/issues/2130
2022-10-21 17:33:44 +01:00
Simon Backx
5ef0753611 Improved post activity feed table
no issue

- Fixed counter at the bottom
- Fixed forward > backward not working
2022-10-21 17:19:34 +02:00
Simon Backx
7c824556c2
Added new members filters and refactored filters (#15667)
fixes https://github.com/TryGhost/Team/issues/2112

- Removed a bit of duplicate code across templates and components that was used to handle filters
- Updated filter objects to contain information about the filter
- Added resource filters that are able to select a single resource, which can be used in columns
- Filters can now define columns by themselves. Not all columns already make use of this functionality, but we can move those over later (cleanup: https://github.com/TryGhost/Team/issues/2133)
- The filter definitions became quite long. We should move them to separate files in the future: https://github.com/TryGhost/Team/issues/2134
- Filters can now have custom NQL parsing
- Improved support for parsing recursive or grouped NQL queries
- Added support for filtering members by feedback
2022-10-21 17:18:00 +02:00
James Morris
7d6cfc905e Making avatar initials smaller in the engagement bar
refs https://github.com/TryGhost/Team/issues/2139
2022-10-21 16:12:45 +01:00
James Morris
c2e43a0805 Changing the metric to positive feedback rather than more like this
refs https://github.com/TryGhost/Team/issues/2138
2022-10-21 16:06:27 +01:00
Ghost CI
67c742606d v5.20.0 2022-10-21 16:00:38 +01:00
Rishabh Garg
05330316e3
Allowed fixing newsletter links (#15672)
refs https://github.com/TryGhost/Team/issues/2116

- allows site owners to edit a link in a post that has already been sent out, fixing any typos or other mistakes
- resets click counter for the edited link back to 0 so site owners can see the clicks on new link, doesn't change the overall click count
2022-10-21 19:38:57 +05:30
James Morris
b4a178b45c Moved the newsletter settings option for audience feedback based on feedback
refs https://github.com/TryGhost/Team/issues/2124
2022-10-21 15:07:48 +01:00
illiteratewriter
a701f2114d
Added importer for custom theme settings (#15596)
closes: https://github.com/TryGhost/Ghost/issues/15542

- custom theme settings were not reinstated on import
- importing custom theme settings for the current active theme requires the theme be re-activated
2022-10-21 15:02:32 +01:00
James Morris
11bea8d9f0 Better matching the pagination styles across modules for post analytics
- Careful of flags, having different paginations depending on those
- Little stylistic adjustment to how pagination is shown on engagement bar
- Quite a few feature flag checks to make sure the right style is showing

refs https://github.com/TryGhost/Team/issues/2136
2022-10-21 14:53:09 +01:00
Hannah Wolfe
3ab1c418bc
Updated webhook test snapshots
refs: 717a27c85c
refs: 6380b82793

- The snapshots just needed updating
2022-10-21 14:36:20 +01:00
Halldor Thorhallsson
717a27c85c
Added e2e tests for page.unpublished webhook (#15613)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-21 14:16:13 +01:00
James Morris
8d13aa003f Quick tweak to max height when there are columns side-by-side
refs https://github.com/TryGhost/Team/issues/2118
2022-10-21 14:01:40 +01:00
Rishabh
3d355ea41d Fixed test snapshots
refs 5b283930f0
2022-10-21 18:14:57 +05:30
Samprit JC
f7738dc1a2
Added e2e test for post.unpublished webhook (#15628)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-21 13:08:54 +01:00
Djordje Vlaisavljevic
3d697fb67b Updated explainer text design
refs https://github.com/TryGhost/Team/issues/2127
2022-10-21 13:50:03 +02:00
Shashank Gupta
092fb7813d
Added e2e tests for page.edited webhook (#15627)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-21 12:45:38 +01:00
illiteratewriter
4ba254b339
Added e2e tests for member.edited webhook (#15620)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-21 12:43:30 +01:00
Shubhadeep Das
5b283930f0
Added e2e tests for post.edited webhook (#15625)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-21 12:39:24 +01:00
Rishabh
25f76642b3 Refined link edit cancellation on analytics page
refs https://github.com/TryGhost/Team/issues/2116

- ignores blur events when link is edited via keypress
2022-10-21 17:05:48 +05:30
Rishabh
86a9695ccb Fixed date format for link bulk edit
refs https://github.com/TryGhost/Team/issues/2104

- updates date format for `updated_at` to use the right DB date format
2022-10-21 17:02:37 +05:30
Naz
b552727b69
Changed members export to contain tiers
refs https://github.com/TryGhost/Team/issues/1076

- The "products" is a legacy term for what is now "tiers" since multiple tiers feature introduction in https://github.com/TryGhost/Ghost/releases/tag/v4.39.0
- Note, the "tiers" is a field meant for informational purposes and cannot be imported back into Ghost site.
2022-10-21 18:58:59 +08:00
Naz
850eb611c3
Added 100% unit test coverage to unparse
refs https://github.com/TryGhost/Team/issues/1076

- 100% is the golden standard. Easy to keep it this way once there
2022-10-21 18:58:59 +08:00
Naz
77e8fdfccb
Removed test "utils" folder
refs https://github.com/TryGhost/Team/issues/1076

- The members-csv package does not use "should" for assertions anymore, so the accompanying "utils" lib can go away now
2022-10-21 18:58:59 +08:00
Naz
0d1479158c
Migrated unparse test suite to assert
refs https://github.com/TryGhost/Team/issues/1076

- The 'should' assertion library is deprecated. Native 'assert' is the recommended lib to use
- Migrating this bit of code allows to remove the should's "utils" folder. Less code, yey!
2022-10-21 18:58:59 +08:00
Naz
6c2d057e25
Improved readability of unparse test
refs https://github.com/TryGhost/Team/issues/1076

- The column parameter has default behavior attached to it, so it is best to have it mentioned and used in an explicit way.
2022-10-21 18:58:59 +08:00
Aileen Booker
6c9f8ec32d
Improved URL syncing between Admin and Explore (#15640)
no issue

Improve the route communication between Ghost Admin and Ghost Explore to
reflect route changes in the URL and correctly navigate to Explore sub
routes
2022-10-21 11:48:18 +01:00
Rishabh
50c92142d4 Fixed lint 2022-10-21 16:08:26 +05:30
Rishabh
ba6fe63250 Fixed cached redirects for edited newsletter links
refs https://github.com/TryGhost/Team/issues/2135

The email link redirects on Pro are cached as 302 redirects in Varnish, so we're missing further clicks after the first one for each member, until the cache is invalidated. This change invalidates cache on link edits to ensure that we correctly redirect members to updated link everytime
2022-10-21 16:07:34 +05:30
Rishabh
25cbbff81c Refined link edit flow on Admin
refs https://github.com/TryGhost/Team/issues/2116
2022-10-21 15:57:32 +05:30
Djordje Vlaisavljevic
06365b1d00 Changed explainer text color and icon to deemphasize it
refs https://github.com/TryGhost/Team/issues/2127
2022-10-21 11:46:33 +02:00
Djordje Vlaisavljevic
1d4e6328cb Fixed row hover effects in dark mode
refs https://github.com/TryGhost/Team/issues/2127
2022-10-21 11:08:11 +02:00
Rishabh
910d13fbab Updated save button handling for links
refs https://github.com/TryGhost/Team/issues/2116
2022-10-21 14:36:33 +05:30
Djordje Vlaisavljevic
9e3e3d7131 Removed unnecessary padding
refs https://github.com/TryGhost/Team/issues/2127
2022-10-21 11:04:27 +02:00
Djordje Vlaisavljevic
1e1a155b7d Updated edited state font weight for better contrast
refs https://github.com/TryGhost/Team/issues/2127
2022-10-21 10:37:31 +02:00
Elena Baidakova
bbf6b95cbf
Added filtered events tables to the analytics page (#15669)
closes TryGhost/Team#2087
2022-10-21 12:31:25 +04:00
Rishabh
dcd607ad94 Fixed jumping of links on edit in analytics
refs https://github.com/TryGhost/Team/issues/2116

- editing a link caused it to jump in the list as its count is reset to 0
- this forces the order of links same after edit, the new order is only visible on refresh or navigating away and coming back
2022-10-21 13:34:15 +05:30
Djordje Vlaisavljevic
3203714b3d Added retry button in error state
refs https://github.com/TryGhost/Team/issues/2127
2022-10-20 22:10:37 +02:00
Djordje Vlaisavljevic
1435f0eabf Fixed explanation text not showing when there's no pagination
refs https://github.com/TryGhost/Team/issues/2127
2022-10-20 22:04:29 +02:00
Djordje Vlaisavljevic
dafdfc7a7c Vertically aligned icons
refs https://github.com/TryGhost/Team/issues/2127
2022-10-20 21:58:33 +02:00
Djordje Vlaisavljevic
e84e58f9b3 Fixed unrelated elements sharing the same CSS class
refs https://github.com/TryGhost/Team/issues/2127
2022-10-20 21:49:14 +02:00
Djordje Vlaisavljevic
2325969f77 Fixed missing padding in post analytics header
refs https://github.com/TryGhost/Team/issues/2127
2022-10-20 21:43:12 +02:00
Djordje Vlaisavljevic
bb182674df Deemphasized edited state
refs https://github.com/TryGhost/Team/issues/2127
2022-10-20 21:39:48 +02:00
Djordje Vlaisavljevic
a0b5267f0f Improved responsiveness
refs https://github.com/TryGhost/Team/issues/2067
2022-10-20 16:26:39 +02:00
Rishabh
ec126f0980 Added missing dependencies for link tracking 2022-10-20 19:49:04 +05:30
Djordje Vlaisavljevic
b4d16a7d3e Fixed first and last child padding in edit mode
refs https://github.com/TryGhost/Team/issues/2067
2022-10-20 16:11:44 +02:00
Rishabh
71999a26b9 Updated success state for link update on Admin
refs https://github.com/TryGhost/Team/issues/2116

- removes extra redundant success state handling
2022-10-20 18:25:46 +05:30
Rishabh
d7b3721036 Added edited property to links api
refs https://github.com/TryGhost/Team/issues/2104

- adds a boolean `edited` property to links api that denotes if the link has been edited
2022-10-20 18:17:44 +05:30
Rishabh
ee145ed5b3 Wired link update api on Admin
refs https://github.com/TryGhost/Team/issues/2116

- wires link update API on post analytics UI page to save edited links for a newsletter
- all links matching the edited link are updated by the API in the backend
2022-10-20 17:55:02 +05:30
Rishabh
6312b064f5 Added reset for link click count on edit
refs https://github.com/TryGhost/Team/issues/2104

When a newsletter link is edited, we reset its click count to 0 to show only the clicks on newly edited links. This is done by only counting the member click events for a link which are greater than its last updated at, so that all previous click events are not counted for the link, but are included in the total count of all links on the page.
2022-10-20 17:50:02 +05:30
Rishabh
d8bacf12d1 Added endpoint for fixing newsletter links
refs https://github.com/TryGhost/Team/issues/2104

- adds new bulk edit endpoint for links, updates all matching link with the current redirect url and update to new url
2022-10-20 17:50:02 +05:30
James Morris
40b8a838ae Moving the post analytics layout closer to new design
- Newsletter clicks module has new header and box
- Source attribution module has new header and box
- Resources have new headers inside the box
- New split layout if there are two modules side-by-side

refs https://github.com/TryGhost/Team/issues/2119
2022-10-20 13:17:25 +01:00
Simon Backx
adf10f0e76
Added support for filtering email events by post_id (#15666)
refs https://github.com/TryGhost/Team/issues/2093
2022-10-20 13:29:00 +02:00
Djordje Vlaisavljevic
0172fd3ef2 Made default and editing states the same height
refs https://github.com/TryGhost/Team/issues/2067
2022-10-20 12:43:41 +02:00
Fabien "egg" O'Carroll
b14b74315f Exported Tier events from tiers package
These are required to be exported so that external code can subscribe to the
events.
2022-10-20 17:40:37 +07:00
Fabien "egg" O'Carroll
5f928794c3 Added support for Tier events
refs https://github.com/TryGhost/Team/issues/2078

These events are all required for other parts of the Ghost system to stay in
sync. The events on each Tier object will be dispatched by the TierRepository
once they've been persisted.

TierCreatedEvent - generate Stripe Products & Prices
TierNameChangeEvent - update Stripe Products
TierPriceChangeEvent - update Stripe Products & Prices
TierArchivedEvent - update the Portal settings for visible tiers
                  - disable Stripe Products & Prices
TierActivatedEvent - enable Stripe Products & Prices
2022-10-20 17:31:33 +07:00
Djordje Vlaisavljevic
d1d3c1401f Added button for saving changes made to the link
refs https://github.com/TryGhost/Team/issues/2125
2022-10-20 12:18:56 +02:00
Naz
0e094b371b
Reused getDefaultProduct where possible
refs 82ed10473b
refs https://github.com/TryGhost/Team/issues/1869

- getDefaultProduct has unified logic across different places (see refed commit). It is recommended to use instead of writing custom queries prone to mistakes.
- Also added more readable name to the possible error message thrown by setComplimentarySubscription
2022-10-20 17:23:59 +08:00
Naz
5d5b77d32f
Fixed comped tier assignment
closes https://github.com/TryGhost/Team/issues/1869

- When there were "archived" tiers in the system the importer incorrectly fetched them instead of only taking "active" ones into account. The "getDefaultProduct" on product repository does exactly that.
- Additionally, reusing the "getDefaultProduct" makes testing the importer slightly less complex.
2022-10-20 17:19:52 +08:00
Naz
82ed10473b
Added 'getDefaultProduct' convenience method to product repo
refs https://github.com/TryGhost/Team/issues/1869

- There are multiple places in the codebase fetching "default product". The code is slightly divergent in each one of them and has been a source of bugs (like the one referenced). Having the logic captured in one place will allow reducing the code duplication, making code less bug prone, and making testing the modules dependent on the "setDefaultProduct" method easier
2022-10-20 17:19:52 +08:00
James Morris
02698b4559 Moved the resources to the new style
refs https://github.com/TryGhost/Team/issues/2117
2022-10-20 10:01:30 +01:00
Naz
03e0962889
Removed garbage test
no issue

- This test does nothing but occupy the disc space
2022-10-20 14:34:23 +08:00
Fabien "egg" O'Carroll
6614aa9070 Fixed add method for TiersAPI
refs https://github.com/TryGhost/Team/issues/2078

The check for creating free Tiers needs to be explicit, rather than implicit
because the type is optional, we only want to error if it is explicitly passed
as "free", not if it is missing as "paid".
2022-10-20 11:56:46 +07:00
Fabien "egg" O'Carroll
9e7b009236 Fixed edit method to accept a string
refs https://github.com/TryGhost/Team/issues/2078

This fixes a bug with the edit method where we passed a raw string
rather than ObjectID
2022-10-20 11:55:21 +07:00
Fabien "egg" O'Carroll
93e392fac1 Added error messages for monthly & yearly price validation
refs https://github.com/TryGhost/Team/issues/2078

These were missing, and will be refactored into the correct
tpl(messages.prop) format
2022-10-20 11:55:09 +07:00
Fabien "egg" O'Carroll
dfa88360ea Fixed trialDays validation to default to 0
refs https://github.com/TryGhost/Team/issues/2078

This retains current functionality
2022-10-20 11:55:01 +07:00
Fabien "egg" O'Carroll
581164ed60 Updated Tier welcomePageURL to be a string rather than URL
refs https://github.com/TryGhost/Team/issues/2078

We allow passing in relative URLs for the welcome page, so we need to accept a
string for this property.
2022-10-20 11:54:49 +07:00
Fabien "egg" O'Carroll
b607bee27f Updated Tier to use camelCase property names
refs https://github.com/TryGhost/Team/issues/2078

Having to map between snake_case and camelCase was becoming confusing, so this
updates the Tier object to exclusively use camelCase, and the snake_case for the
API can be handled by the serializer/mapper or at the controller level.
2022-10-20 11:54:18 +07:00
Fabien "egg" O'Carroll
3811169d20 Fixed visibility property on Tiers
refs https://github.com/TryGhost/Team/issues/2078

This property should be settable to either 'public' or 'none'
2022-10-20 11:54:12 +07:00
Fabien "egg" O'Carroll
0978a808d6 Refactored TiersAPI to use core slug generation
refs https://github.com/TryGhost/Team/issues/2078

This removes the burden from the Tier object, and allows us to reuse
the existing slug generation implementation we have in our bookshelf
models.
2022-10-20 11:54:03 +07:00
Daniel Lockyer
02c8690e87 Added ghost_subscription_id column to members_stripe_customers_subscriptions
refs https://github.com/TryGhost/Team/issues/2034

- this table will be used to link Stripe subscriptions to Ghost
  subscriptions via a foreign key that we add at a later point
- this also includes `constraintName` as the auto-generated one would be
  too long for MySQL 8
2022-10-20 10:59:36 +07:00
Rishabh Garg
318a5a809c
Added permissions for link edit endpoints (#15664)
refs https://github.com/TryGhost/Team/issues/2104

- adds edit permissions for links endpoints to fixtures
- new `bulkEdit` endpoint will use the permissions and allow fixing newsletter links via Admin
2022-10-20 09:11:26 +05:30
renovate[bot]
eaf6c5d1b7 Update dependency ember-svg-jar to v2.4.1 2022-10-20 10:14:41 +07:00
Rishabh Garg
60b10ad69a
Fixed permissions for links endpoint (#15656)
refs 5fcf5098a8

- links browse endpoint had permissions switched off unintentionally and was also missing the necessary permissions in fixtures.
- enables permissions for browse endpoint and adds migration insert permissions in DB
2022-10-20 08:18:29 +05:30
renovate[bot]
93e999ec1c
Update dependency mocha to v10.1.0 2022-10-19 17:53:57 +00:00
James Morris
79142c0a4c Fixed up the more like this event icons as they were too large
refs https://github.com/TryGhost/Team/issues/2106
2022-10-19 17:49:17 +01:00
Rishabh
88bda6e1b3 Handled no empty sources for attribution table
- fixes an edge case where if a site has no unavailable sources in a particular period, it broke the table view as the `Others` data doesn't get fetched
2022-10-19 20:31:48 +05:30
Rishabh
ca28ba8bae Added edited state for newsletter links
refs https://github.com/TryGhost/Team/issues/2111

- shows edited in UI next to edited newsletter links in post analytics
2022-10-19 20:25:58 +05:30
Djordje Vlaisavljevic
e6bde038ba Fixed period filter not appearing on smaller screens on dashboard
no ref
2022-10-19 16:55:33 +02:00
Simon Backx
6380b82793
Added sentiment ordering and include for posts (#15657)
fixes https://github.com/TryGhost/Team/issues/2090

- This changes how sentiment is exposed in the API. Now it is exposed as a `sentiment` relation, directly on the model (no longer in counts). Internally we still use `count.sentiment`.
- Content API users (and themes) can include the 'sentiment' relation and order by sentiment.
- Updated Admin to use sentiment instead of count.sentiment
2022-10-19 16:50:58 +02:00
Rishabh
3db8fb5a1c Wired newsletter link success/error states
refs https://github.com/TryGhost/Team/issues/2116

- wires handling of success and error messages on editing a newsletter link
- has the update api commented out temporarily to mock the changes
2022-10-19 19:23:15 +05:30
Djordje Vlaisavljevic
b310b3a97a
Added design for edited state of newsletter links
refs https://github.com/TryGhost/Team/issues/2111

- Added indicator that the link in a newsletter has been edited after sending
2022-10-19 15:33:37 +02:00
Sam Lord
68955aa704 Remove Grunt from yarn setup in Ghost core
no issue
2022-10-19 12:58:10 +01:00
Elena Baidakova
17cfdcd3a9
Updated feedback buttons url (#15655)
closes TryGhost/Team#2080
- If the post was published and emailed the link leads the user to the
post.
- If the post was just emailed the link leads the user to the home page.
2022-10-19 15:21:43 +04:00
Elena Baidakova
c65b980ada
Added tabs component (#15652)
closes TryGhost/Team#2086
2022-10-19 15:20:15 +04:00
Naz
b589a66cd4
Fixed broken CSV importer tests
refs 90768e9985

- With introduction of strict field mapping the regression test testing for "imports of not mapped fields" failed.
2022-10-19 18:33:47 +08:00
Naz
90768e9985
Added strict field mapping to member CSV importer
closes https://github.com/TryGhost/Toolbox/issues/430

- The members importer used to  import all fields present in the uploaded CSV if the headers match, even if they're not mapped in the UI. This behavior has lead to have misleading consequences and "hidden" features. For example, if the field was present but intentionally left as "Not imported" in the UI the field would still get imported.
- Having a strict list of supported import fields also allows for manageable long-term maintenance of the CSV Import API and detect/communicate changes when they happen.
- The list of the current default field mapping is:

    email: 'email',
    name: 'name',
    note: 'note',
    subscribed_to_emails: 'subscribed',
    created_at: 'created_at',
    complimentary_plan: 'complimentary_plan',
    stripe_customer_id: 'stripe_customer_id',
    labels: 'labels',
    products: 'products'
2022-10-19 18:10:40 +08:00
Naz
748ef87954
Made running the import outside of job on test env
- Allows to write tests for the importer easier when there is a "subscription" or a "product" present
2022-10-19 18:10:40 +08:00
Naz
9389064ae2
Removed unused error message
no issue

- The job-related code was ripped out form the importer and this message was just an overlooked leftover
2022-10-19 18:10:40 +08:00
Naz
1317500058
Migrated CSV parser tests to 'assert'
no issue

- Using native 'assert' module in unit tests is a preferred practice. Should is outdated and is phased out of codebase.
2022-10-19 18:10:40 +08:00
Naz
c0a415e0e1
Added strict header mapping parsing
refs https://github.com/TryGhost/Toolbox/issues/430

- Previously the CSV parser had "map whatever you can and pass on unknown properties further" approach to CSV parsing. This logic has led to unwanted fields leaking through CSV imports - messy, dangerous.
- The strict mapping rules act as a "validator" to the user input, only passing through the fields we expect explicitly - safer clean cut solution with no unintended side-effects.
2022-10-19 18:10:40 +08:00
Naz
eca4b142d2
Cleaned up csv parse test suite
refs https://github.com/TryGhost/Toolbox/issues/430

- Removed unnecessary "readCSV" leftover code.
2022-10-19 18:10:40 +08:00
Naz
f1e45f4632
Cleaned up test case names 2022-10-19 18:10:40 +08:00
Naz
f0b68846cc
Moved header mapping configuration to importer
refs https://github.com/TryGhost/Toolbox/issues/430

- To be able to introduce strict mapping rules (exclude unknown fields) we need to control the CSV header mapping on the importer level. This change moves the configuration up from CSV parser to the importer
- Also adds tests covering correct inserts for specially treated "subscribed_to_emails" field
2022-10-19 18:10:40 +08:00
Naz
c08d4f8ad1
Added basic test coverage for perform method
refs https://github.com/TryGhost/Toolbox/issues/430

- "perform()" is what gets executed by the import job for both immediate import and "inline job" import. Testing it on granular level will allow to change it with more confidence when introducing strict field mapping rules
2022-10-19 18:10:40 +08:00
Naz
8dc630b3a0
Removed cleaned up use of "Job" object
refs https://github.com/TryGhost/Toolbox/issues/430

- Importer code was filled with an unnecessarily complex "job" object that was passed around. It had an "id" property, which confusingly was a path to a file at all times.
- Simplified the logic significantly by keeping and passing around the path to a "prepared" members CSV.
2022-10-19 18:10:40 +08:00
Naz
812973d962
Removed unused concept of "status" in importer job
refs https://github.com/TryGhost/Toolbox/issues/430

- The job "status" is never anything different than "pending" and never leaves the module itself. It's an outdated concept that only takes up lines of code!
2022-10-19 18:10:40 +08:00
Naz
2175d64095
Added future investigation note
refs https://github.com/TryGhost/Toolbox/issues/430

- This is a strange hardcoded value that seems like some legacy leftover concept we could do without or improve
2022-10-19 18:10:40 +08:00
Naz
d165a0017c
Extracted MembersCSVImporter to a builder method
refs https://github.com/TryGhost/Toolbox/issues/430
refs https://github.com/TryGhost/Ghost/issues/14882

- The MembersCSVImporter constructor is way to complex and needs refactoring. This complexity makes initialization in tests too bulky and makes tests hard to read.
- Having a builder method is a stopgap solution to avoid going into MembersCSVImporter refactoring too deep.
2022-10-19 18:10:40 +08:00
Naz
4300f14d79
Removed hidden row mapping in csv parser
refs https://github.com/TryGhost/Toolbox/issues/430
refs https://github.com/TryGhost/Ghost/issues/14882

- Having an explicit mappings passed into the members CSV parser makes it easier to control and understand the transforms for package clients
- Eventually the parser will receive a strict map with the fields it should parse - skipping all unknown & unmapped fields
2022-10-19 18:10:40 +08:00
Naz
971a562b46
Added JSDoc to members csv parser
refs https://github.com/TryGhost/Toolbox/issues/430

- Typings make developer's life nicer
2022-10-19 18:10:40 +08:00
Naz
1c746c0ca0
Added test coverage for 'subscribed' transform
refs https://github.com/TryGhost/Toolbox/issues/430

- Not having any extra logic in the mapper will allow to have a generalized "mapping" concept for CSV input serialization
- This is groundwork for stricter header value filtering on the parsing stage
2022-10-19 18:10:40 +08:00
Naz
bc70835890
Increased test coverage
refs https://github.com/TryGhost/Toolbox/issues/430

- The bonus of using the module exports file is that it also gets included in the test coverage statistics ^_^
2022-10-19 18:10:40 +08:00
Naz
f38950c022
Fixed typo 2022-10-19 18:10:40 +08:00
Naz
6c9cfe8f24
Fixed typo 2022-10-19 18:10:29 +08:00
Naz
7a1389954b
Updated JSDoc and fixed typos 2022-10-19 18:10:29 +08:00
Djordje Vlaisavljevic
d14dd3e3ae Fixed overflow for newsletter links
refs https://github.com/TryGhost/Team/issues/2067
2022-10-19 12:59:54 +05:30
Djordje Vlaisavljevic
e3c03bb754 Added newsletter links editing explanation text
refs https://github.com/TryGhost/Team/issues/2067
2022-10-19 12:59:54 +05:30
Djordje Vlaisavljevic
6b46f3f295 Made edit link button always visible
refs https://github.com/TryGhost/Team/issues/2067
2022-10-19 12:59:54 +05:30
Fabien "egg" O'Carroll
4f54cbc37a Supported payment URL in Portal
refs https://github.com/TryGhost/Team/issues/2078

As part of decoupling Stripe from the members feature, we are going to be using
payment URLs rather than Stripe sepcific session ids and publick keys.

This prepares Portal to work with the new system, whilst retainign the existing
functionality
2022-10-19 11:06:10 +07:00
Fabien "egg" O'Carroll
fbc23a624e Refactored Tiers logic into separate package
refs https://github.com/TryGhost/Team/issues/2078

This pulls the current Tiers logic into its own package, the persistence part of
the work has not been done yet, that will be handled in core, so all bookshelf
model specific stuff is kept together.
2022-10-19 11:05:09 +07:00
renovate[bot]
6eaeaad5f2
Update dependency ember-template-lint to v4.16.1 2022-10-18 23:25:57 +00:00
Daniel Lockyer
9b8c33484d
Merged v5.19.3 into main
v5.19.3
2022-10-19 06:22:38 +07:00
Ghost CI
e1e5a7b35e v5.19.3 2022-10-18 16:18:29 +01:00
Simon Backx
a822c5a8c5 Added test to check if feedback buttons are hidden if alpha flag is disabled 2022-10-18 16:47:06 +02:00
Simon Backx
8ecf0a5858 🐛 Fixed alpha feature visible in new newsletters
no issue
2022-10-18 16:38:59 +02:00
Simon Backx
a01fb5f1aa
Added post_id filter and total to activity feed API (#15650)
fixes https://github.com/TryGhost/Team/issues/2091
fixes https://github.com/TryGhost/Team/issues/2089

- Added new fixtures to make testing easier for the activity feed
- Improved E2E test coverage of activity feed with separate test file
- Added data.post_id filter to enable filtering by events related to a
given post
- Fixed return types in JSDoc of test agents (TypeScript interprets
these as `typeof Agent` if we don't add `InstanceType<Agent>`)
- Added total pagination metadata to activity feed API (to allow a basic
type of pagination using filters)
2022-10-18 15:52:04 +02:00
renovate[bot]
2f43e71f7f
Update dependency ember-template-lint to v4.16.0 2022-10-18 10:21:09 +00:00
Kevin Ansfield
95cfb48c2d Fixed broken ember-svg-jar asset viewer
no issue

- downgraded to `2.3.4` because `2.4.0` is missing the asset viewer assets, see https://github.com/voltidev/ember-svg-jar/issues/233
2022-10-18 11:18:20 +01:00
Daniel Lockyer
2dcc4139b1
Merged v5.19.2 into main
v5.19.2
2022-10-18 17:04:23 +07:00
Djordje Vlaisavljevic
a014b5838a
Added design for success and error states for editing newsletter links
refs https://github.com/TryGhost/Team/issues/2095
refs https://github.com/TryGhost/Team/issues/2098

- Added success state design for editing links in newsletters
- Added error state for invalid URL when editing links in newsletters
2022-10-18 10:53:34 +02:00
Ghost CI
14a259b828 v5.19.2 2022-10-18 09:51:41 +01:00
Simon Backx
d1e6870740
🐛 Fixed large mailgun recipient data (#15638)
fixes https://github.com/TryGhost/Team/issues/2096

When generating the recipient data for emails, the email clicks
implementation is resulting in a recipient variable being added called
replacement_xxx once for each link containing the same UUID.

This generates a lot of unnecessary data overhead for emails, and it
turns out that mailgun has a 25MB message limit. We wouldn't have come
close if we only included the uuid once.
2022-10-18 10:32:50 +02:00
Daniel Lockyer
18c52f2a2a
Improved jsdoc for permission migration utils
- this helps with readability and editor autocomplete
2022-10-18 14:38:58 +07:00
Daniel Lockyer
3858f255b9 Dropped nullable status on subscriptions.tier_id
fixes https://github.com/TryGhost/Team/issues/2102

- this column was added with `nullable: true` but it should never be
  nullable, so we should drop the nullable status whilst it's easy to
2022-10-18 14:16:30 +07:00
Daniel Lockyer
2d324ea315
Fixed various code nits with schema command utils
- de-duped the exports at the bottom if they export the same name as the
  function
- added types to all functions, or fixed existing ones
- renamed `table` to `tableBuilder` to represent it better
- these should help with code readability and autocomplete in editors
2022-10-18 11:07:12 +07:00
Daniel Lockyer
c9d43b8fe1
Allowed constraintName in schema column spec
refs 0ba3d6df49

- this is used to indicate the name of the foreign key constraint and so
  we should let it through the schema checks
2022-10-18 10:29:55 +07:00
Daniel Lockyer
0ba3d6df49 Added support for supplying the foreign key constraint name
- this allows us to choose the foreign key constraint name when the
  auto-generated one would be too long
2022-10-18 10:25:14 +07:00
Simon Backx
0bb7538cd1
Added feedback events to activity feed (#15639)
fixes https://github.com/TryGhost/Team/issues/2051
fixes https://github.com/TryGhost/Team/issues/2052
2022-10-17 15:44:18 +02:00
Kevin Ansfield
f78f264982
Fixed PromiseObject related errors thrown from members activity list (#15641)
no issue

- the `memberRecord` getter on the members activity controller was
returning the direct result of `store.findRecord()` which in reality is
a `PromiseObject` that is a type of proxy. Although templates handle
this OK, any JS code using the object needs to know that it's not a
typical type of object and has to use `.get()` for all property access
to avoid errors
- switched `memberRecord` from a getter to a resource so we have more
control over the returned object and loading lifecycle
- added a `MemberFetcher` resource class that awaits the result of the
store find and only then sets the value meaning we always have a fully
resolved model object
- being a resource the fetch will only occur when the `member` id
property changes, unlike the getter which performed the fetch every time
it was accessed
2022-10-17 15:28:34 +02:00
Simon Backx
22fe1c01de
Added conversions count and separate analytics page (#15637)
fixes https://github.com/TryGhost/Team/issues/2084

- When audience feedback is enabled, we use a single 'conversions' count instead of having separate ones for signups and paid conversions.
- The analytics component is separated so we can change it without breaking the existing page.
2022-10-17 13:02:39 +02:00
Daniel Lockyer
b6d2d97af2
Merged v5.19.1 into main
v5.19.1
2022-10-17 17:48:02 +07:00
Ghost CI
9a2fcba68a v5.19.1 2022-10-17 11:45:59 +01:00
Naz
66c2d3748a
🐛 Fixed 404 collection links for new tags
closes https://github.com/TryGhost/Ghost/issues/15608
closes https://github.com/TryGhost/Toolbox/issues/437
refs https://github.com/bookshelf/bookshelf/issues/2111
refs https://github.com/knex/knex/issues/1641

- When new tag was attached to the post the tag collection link returned 404 - instead of a collection with one post
- The root cause of the issue and it's flaky behavior (sometimes the collection link was returning correctly) was a race condition between event propagation in routing for "tag.attached" event and the post+tag+relations transaction completion
- The race condition was happening as the bookshelf-transaction-events plugin was emitting the 'committed' event BEFORE the transaction was committed!
2022-10-17 18:21:10 +08:00
renovate[bot]
e9587e02d0
Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
renovate[bot]
f63fef11ed Update dependency util to v0.12.5 2022-10-17 15:37:56 +07:00
Ronald Langeveld
7a0c6de2d7
Added imageUpload function to Lexical Editor (#15634)
no issue

- A basic image upload function for testing the image card of the new Lexical Koenig Editor.
2022-10-17 15:31:55 +07:00
Peter Zimon
378a6f9326 Fixed loading animation for Safari
no refs.

- the size of the loading animation in Safari wasn't set correctly and didn't always start automatically
2022-10-17 10:11:07 +02:00
Daniel Lockyer
eb30e464d3
Added handling for unsuccessful comments API requests
refs https://github.com/TryGhost/Team/issues/2082

- in the event the API doesn't return a 200 OK, we shouldn't be
  processing the response from it, as we can end up doing weird things
  if, for example, an error object is returned
2022-10-17 12:07:18 +07:00
Daniel Lockyer
1dab16c9c1 Added handling for unsuccessful comments API requests
refs https://github.com/TryGhost/Team/issues/2082

- in the event the API doesn't return a 200 OK, we shouldn't be
  processing the response from it, as we can end up doing weird things
  if, for example, an error object is returned
2022-10-17 11:59:32 +07:00
Daniel Lockyer
7ac0fdb23d
Fixed unnecessary requests with loading comment counts
refs https://github.com/TryGhost/Team/issues/2082

- if a site has comments enabled but doesn't use the `comments_count`
  helper, the comments-count.min.js will still be loaded and it'll send
  a POST request to Ghost with an empty array of post IDs to fetch
- this is unnecessary and we should avoid this extra request for pages
  that don't need to show comment counts
- this commit prevents the comment-counts JS from sending the request if
  there are no post IDs to fetch
2022-10-17 11:51:14 +07:00
Daniel Lockyer
fd9401503b Fixed unnecessary requests with loading comment counts
refs https://github.com/TryGhost/Team/issues/2082

- if a site has comments enabled but doesn't use the `comments_count`
  helper, the comments-count.min.js will still be loaded and it'll send
  a POST request to Ghost with an empty array of post IDs to fetch
- this is unnecessary and we should avoid this extra request for pages
  that don't need to show comment counts
- this commit prevents the comment-counts JS from sending the request if
  there are no post IDs to fetch
2022-10-17 11:07:16 +07:00
Ronald Langeveld
6b7088ba20 Bumped kg-lexical-html-renderer version
no issue

- Bumped from 0.0.8 to 0.0.9
2022-10-17 08:44:30 +07:00
Daniel Lockyer
54c143a1b4
Fixed optional syntax style for jsdoc
refs https://jsdoc.app/tags-param.html#optional-parameters-and-default-values

- using an equals sign in the type definition is part of the Google
  Closure syntax but we use the JSDoc syntax in all other places, and
  tsc detects the different syntax
- this commit standardizes the syntax ahead of enforcing a certain style
  down the line
2022-10-16 14:48:05 +07:00
Rishabh
fdff8814b1 Bumped portal package.json to latest version
refs d381ff87b8

- portal was bumped to 2.15 but the version in package json didn't get auto-updated
2022-10-14 22:15:02 +05:30
Elena Baidakova
46141efe05
Updated test snapshot after bumping Portal (#15623) 2022-10-14 20:29:46 +04:00
Elena Baidakova
d381ff87b8
Added ability to handle feedback links from emails (#15622) 2022-10-14 20:11:44 +04:00
Djordje Vlaisavljevic
097b232524
Fix newsletter links (#15621)
Added a button for editing links in newsletters after sending to the
Post analytics page

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-10-14 18:09:42 +02:00
Ghost CI
4e3afadfef v5.19.0 2022-10-14 16:00:45 +01:00
Elena Baidakova
e831be6bc2
Added the feedback buttons in the emails (#15619)
closes TryGhost/Team#2046
closes TryGhost/Team#2045
- Added feedback buttons markup.
- Added feedback links generation.
2022-10-14 18:12:17 +04:00
James Morris
e074676e12 Updated engagement bar metrics so when no link it doesn't hover
no issue
2022-10-14 12:19:29 +01:00
James Morris
60ce10be9f Fixed up more like this and newsletter clicks table at narrower viewports
no issue
2022-10-14 11:18:56 +01:00
Fabien "egg" O'Carroll
370ded5c77 Stored price and currency data on Tiers when creating & editing
refs https://github.com/TryGhost/Team/issues/2029

This will allow us to start decoupling the Stripe side of things once we've got
the core data stored. We've also add some integrity checks on the incoming
monthly_price and yearly_price to ensure they are the same currency.
2022-10-14 16:31:26 +07:00
Fabien 'egg' O'Carroll
8afc6777c0
🐛 Removed redirects from search engine indexing (#15617)
refs https://github.com/TryGhost/Team/issues/2072

Google is indexing our redirects and storign the redirected content
against the redirect URL in search results. This seems to be caused by
us using a 302 redirect rather than 301. We don't want to switch to a
301 however, so that we can support the ability to update redirects in
the future.
2022-10-14 15:51:43 +07:00
Fabien 'egg' O'Carroll
bd0f4b4b8c
Added Tier price and currency data to products table (#15366)
refs https://github.com/TryGhost/Team/issues/1765

In order to better handle deleted objects in Stripe we want to decouple
Members from Stripe.

These changes allow us to have the Tier concept completely independent
of the Stripe tables, such that the Stripe data can be generated as/when
it's needed - which will help to protect against missing data.
2022-10-14 06:40:17 +01:00
Barno
5c361670ce
Replaced Promise.each() with .all() in models/base/bookshelf (#15509)
refs: https://github.com/TryGhost/Ghost/issues/14882

- Removing bluebird specific methods in favour of native promises so we can remove the bluebird dependency.

Co-authored-by: Carol-Barno <cbarno@innovexsolutions.co.ke>
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-10-13 15:24:05 +01:00
renovate[bot]
63f90c2305
Pinned dependencies (#15612)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-13 18:48:09 +07:00
jbenezech
75811f35bc
🐛 Fixed embedded cards for non-utf8 content (#15578)
closes: https://github.com/TryGhost/Ghost/issues/14973

- When fetching content using a non-standard charset, characters were notproperly decoded to utf-8 resulting in mangled text in the editor -> Detect charset and use iconv to decode the page text

- When requesting a non bookmark card, if no oembed data could be foundand we fallback to bookmark, a second network request to fetch the content was issued. This seemed unnecessary -> refactored to avoid that
2022-10-13 12:19:47 +01:00
Kritika Sharma
76e906d498
Added e2e tests for post.tag.detached webhoo (#15610)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.

Co-authored-by: Kritika Sharma <kritikasharma@Kritikas-MacBook-Pro-2.local>
2022-10-13 11:53:18 +01:00
Prathamesh Gawas
3424222597
🐛 Fixed redirects with special characters (#15533)
closes: https://github.com/TryGhost/Ghost/issues/15267

- This was because the URLs were not being encoded and matched correctly - it is solved by encoding the URL before adding to the router.
2022-10-13 11:41:20 +01:00
Shubhadeep Das
e2124314ed
Added e2e tests for page.scheduled webhook (#15609)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-13 11:20:42 +01:00
Halldor Thorhallsson
74f7b7b3ee
Added e2e test for site.changed webhook event (#15595)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-13 11:05:31 +01:00
Rishabh Garg
e05889cd53
🐛 Fixed missing accent color for default content cta (#15611)
refs https://github.com/TryGhost/Casper/issues/901

- the site accent color property on default cta for upgrade link had a typo and was using wrong property
2022-10-13 13:42:21 +05:30
Elena Baidakova
2c7ade78d7
🐛 Fixed color of member alert email links (#15582)
closes TryGhost/Team#2015
- Gmail wraps emails in link and added them custom styles. Was added fix
to reset Gmail styles.
2022-10-13 10:42:04 +04:00
Elena Baidakova
67b65538cf
Added toggle to enable/disable audience feedback in admin (#15601)
closes TryGhost/Team#2043
- Added ability to enable like/dislike buttons for each newsletter.
- Buttons color calculated from accent color.
2022-10-13 10:24:46 +04:00
Daniel Lockyer
bd3add9747
Switched to US spelling of cancelled in schema validation
refs https://github.com/TryGhost/Team/issues/2030

- we tend to use US spellings in the code and this was merged with the
  British spelling
- nothing has been added to this table yet so it's safe to switch
2022-10-13 11:53:07 +07:00
Naz
4db0be603f Added subscriptions table
refs https://github.com/TryGhost/Team/issues/2030

- adds `subscriptions` table to the DB schema
- this new table is aimed to support a native "subscription" primitive in Ghost
  that most resembles previously used `members_stripe_customers_subscriptions` table
2022-10-13 11:19:13 +07:00
Daniel Lockyer
74e1d52d6a Fixed incorrect maximum length definition in schema
refs https://github.com/TryGhost/Toolbox/issues/441

- whilst reviewing another PR, I noticed we were incorrectly using
  `maxLength` instead of `maxlength` in the schema column definition
- it turns out we've already been doing this wrong for a while with
  other columns
- this key is not acted upon, so the maximum column length was not applied
- fixing up the DB to the correct maximum length is something to fix in the
  future but right now, the schema does not reflect the size of the
  column that actually got created
- the fallback when `maxlength` is not provided is currently 191 [0], so
  this commit switches the schema and migrations to using the correct
  key name and column length that they are using when applied

[0]: 24670aa555/ghost/core/core/server/data/schema/commands.js (L27)
2022-10-13 09:58:19 +07:00
Daniel Lockyer
143ae857c9 Removed bool type from schema
refs https://github.com/TryGhost/Toolbox/issues/441

- we tend to have a mix of `bool` and `boolean` in the schema and
  migrations, which has become a real nit for me at this point
- we don't do any special handling between `bool` and `boolean`, it's
  just something we pass to Knex
- `bool` is an alias for `boolean` but `boolean` is actually documented - https://knexjs.org/guide/schema-builder.html#boolean
- this commit switches Ghost to only using `boolean` in the schema and
  migrations, and removes `bool` from the allowlist in tests to prevent
  us from adding it again in the future
- this should make absolutely no difference to the DB because both
  resulted in the same column
2022-10-13 09:37:38 +07:00
renovate[bot]
3917a058a4 Update dependency ember-classic-decorator to v3.0.1 2022-10-13 09:07:30 +07:00
Naz
5b8b18ded1
Moved csv parser utility method
refs https://github.com/TryGhost/Toolbox/issues/430

- The 'readCSV' method was only exposed to be used in the unit tests. To keep the module code to the minimum moved readCSV to the unit test itself - the only place where it's used and belongs to.
2022-10-13 09:53:16 +08:00
Naz
9e20544927
Fixed typo 2022-10-13 09:53:16 +08:00
Naz
71bed4f926
Fixed jsdoc to only mention used parameters
refs https://github.com/TryGhost/Toolbox/issues/430

- It's a minor cleanup while exploring the referenced bug surface area. Fixes distracting "missing parameters" warnings
2022-10-13 09:53:16 +08:00
Daniel Lockyer
24670aa555
Fixed validating numbers as booleans in schema validator
refs https://github.com/TryGhost/Toolbox/issues/441

- I'm currently working on cleaning up our uses of `bool` and `boolean`
  in favor of `boolean`, and I've noticed we only handle converting
  numbers into booleans when the type is `bool`, so validation would
  otherwise fail
- given these can be used interchangeably, we should also support
  converting the numbers into booleans when the type is `boolean`
- this is going to get cleaned up again when I remove `bool` but this
  fixes the validation bug for now
2022-10-13 08:20:31 +07:00
renovate[bot]
f5774fad0c Update dependency postcss to v8.4.18 2022-10-13 08:08:05 +07:00
renovate[bot]
fd2b068e3f
Update dependency cron-validate to v1.4.4 2022-10-12 21:11:14 +00:00
Kritika Sharma
2cb4282fa8
Added e2e tests for post.tag.attached webhook (#15576)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.

Co-authored-by: Kritika Sharma <kritikasharma@Kritikas-MacBook-Pro-2.local>
2022-10-12 21:53:02 +01:00
jennyxchang
0bc31ded1b
Added e2e tests for post.scheduled event (#15561)
refs https://github.com/TryGhost/Ghost/issues/15537

- Added e2e test for post.scheduled event to increase webhook test coverage
2022-10-12 21:18:08 +01:00
Christa
87d21662bc
🐛 fixed error message code for HB translate helper (#15529)
closes: https://github.com/TryGhost/Ghost/issues/15500

- Per the issue, Ghost has a policy to never throw 500 Internal Server errors for theme issues. This change adds a check inside of `ghost\core\core\frontend\helpers\t.js` if `text` or `options` is undefined, to throw an `IncorrectUsageError` error within the function.
- Messaging was borrowed from `ghost\core\core\frontend\web\middleware\error-handler.js`.
2022-10-12 21:14:53 +01:00
Shubhadeep Das
8374c73e52
Added e2e tests for tag.edited webhook (#15555)
refs: https://github.com/TryGhost/Ghost/issues/15537

- this adds an e2e test and test snapshot for the `tag.edited` webhook so we can prevent regressions and bugs in the future

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-10-12 20:00:04 +01:00
Sam Lord
0c18060f61 Added metric for sending transactional email with mailgun
refs: https://github.com/TryGhost/Toolbox/issues/439

This case completes the monitoring of mailgun.js usage within Ghost.
2022-10-12 16:52:51 +01:00
Hannah Wolfe
168fa64395
Updated webhook snapshot for member.deleted
refs: 3ae1e48917
refs: 1221ba5d1d

- We added a new field between the PR being raised and merged, so the snapshot went out-of-date
2022-10-12 16:04:57 +01:00
illiteratewriter
3ae1e48917
Added e2e tests for member.deleted webhook (#15570)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-12 14:35:24 +01:00
Kritika Sharma
2ce0727794
Added e2e tests for post.deleted webhook (#15572)
refs: https://github.com/TryGhost/Ghost/issues/15537

- Added  missing e2e tests for post.deleted webhook to increase coverage 

Co-authored-by: Kritika Sharma <kritikasharma@Kritikas-MacBook-Pro-2.local>
2022-10-12 14:32:01 +01:00
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
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
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
Djordje Vlaisavljevic
f4d5271a1f Updated inactive state
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 15:43:59 +05:30
Djordje Vlaisavljevic
d9b3c1de41 Fixed attribution widget grid
refs https://github.com/TryGhost/Team/issues/1986
2022-10-07 15:43:59 +05:30
Rishabh
ed688f2cd7 Refined source attribution table on dashboard
- added back 2 column design for source attribution table
2022-10-07 15:43:59 +05:30
Daniel Lockyer
9fc830e662
Removed patch from comments-ui version
- we only need to provide the patch if we want to force Ghost to use a
  specific version
- otherwise, we can just use major.minor because we use the tilde
  versioning method
- having the patch version here just encourages you to bump it
  unnecessarily, so removing it cleans up the usage for now
2022-10-07 16:22:16 +07:00
illiteratewriter
a0ec94fbfe
Added e2e test for member.added webhook (#15554)
refs https://github.com/TryGhost/Ghost/issues/15537

- this adds an e2e test and test snapshot for the `member.added` webhook so we can prevent regressions and bugs in the future
2022-10-07 15:54:24 +07:00
Shubhadeep Das
426168f73d
Added e2e test for tag.deleted webhook (#15553)
refs https://github.com/TryGhost/Ghost/issues/15537

- this adds an e2e test and test snapshot for the `tag.deleted` webhook so we can prevent regressions and bugs in the future
2022-10-07 15:50:16 +07:00
Naz
06f6fc11a7
Cleaned up tags e2e webhook test
refs https://github.com/TryGhost/Ghost/issues/15537
refs 4110ffaa2c

- The test had minor formatting issues not worth an extra back-forth during the PR review
2022-10-07 10:20:41 +08:00
Shubhadeep Das
4110ffaa2c Added e2e tests for tag.added webhook (#15537) 2022-10-07 09:46:21 +08:00
renovate[bot]
84549838a4 Update sentry-javascript monorepo to v7.14.2 2022-10-07 08:41:20 +07:00
Daniel Lockyer
be46f8e9a8
Removed eslint-plugin-ghost from Portal package.json
- we don't need it here anymore because it's brought in through the
  top-level repo package.json
2022-10-07 08:36:23 +07:00
renovate[bot]
12801a4574 Update dependency ember-svg-jar to v2.4.0 2022-10-07 08:28:53 +07:00
renovate[bot]
4aa8be2e1c Update dependency @embroider/macros to v1.9.0 2022-10-07 08:25:31 +07:00
Naz
5e9d1d3178 Swapped member limit verification trigger event
closes https://github.com/TryGhost/Toolbox/issues/399

- The MemberCreatedEvent event is more accurate representation of the limit nature - counting the number of members created. The previous MemberSubscribeEvent was slightly hacky solution because a member could be subscribed/unsubscribed multiple times and distorting the limit counts.
2022-10-07 09:20:29 +08:00
renovate[bot]
0370dd258d
Update dependency body-parser to v1.20.1 2022-10-06 21:20:56 +00:00
Djordje Vlaisavljevic
ff4f93f4a5 Updated attribution widget design
refs https://github.com/TryGhost/Team/issues/1986
2022-10-06 22:26:54 +02:00
Djordje Vlaisavljevic
37dd97b5c5 Updated default mock state
refs https://github.com/TryGhost/Team/issues/1986
2022-10-06 22:26:54 +02:00
Djordje Vlaisavljevic
2a09d83023 Added an icon
refs https://github.com/TryGhost/Team/issues/1986
2022-10-06 22:26:54 +02:00
Simon Backx
9d27014aff Reverted change in post email serializer
refs d4540012dc

This was committed by accident
2022-10-06 20:16:02 +02:00
Ozan Uslan
220af3b276
🐛 Fixed timezone issue with min/max dates in datetime picker
fixes #15497

`'now'` option for min/max date used `moment()` function and did not consider the timezone of the site.
2022-10-06 20:09:36 +02:00
James Morris
e871aabb70 Updated the comments to 0.10.2 2022-10-06 16:39:42 +01:00
Kevin Ansfield
fc5f0f7c79 Refactored stripe settings form component with Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to native class syntax and Glimmer component patterns
2022-10-06 16:22:32 +01:00
Kevin Ansfield
c2d8950bd5 Moved and renamed stripe settings form component
no issue

- moved screen-specific component into the `settings/members` folder
- renamed to better reflect the component's purpose
2022-10-06 16:22:32 +01:00
James Morris
4e3380190b Improving the member filters
- Closes dropdown when removing labels
- Larger width to handle multiple labels better
- Subtle focuses when using tabs only
- Bigger close button hitpoints on labels
- Added text ellipis for larger labels in dropdown
- Added some event propagation stops

no issue
2022-10-06 12:21:55 +01:00
Sanne de Vries
a2bfdc7534 Updated error status in post list and the editor
Refs https://github.com/TryGhost/Team/issues/2009
2022-10-06 17:37:08 +07:00
Naz
1880c7c1ec
Updated webhook post.published test
refs https://github.com/TryGhost/Toolbox/issues/320

- Added more complex mobiledoc structure in the post.published test to check for correct transformation of special purpose `__GHOST_URL__`. The snapshot has a correct URL transformation, which gives confidence it works properly
2022-10-06 17:51:14 +08:00
Simon Backx
d4540012dc Added tests for click events in the activity feed
fixes https://github.com/TryGhost/Team/issues/2018

- Includes new test fixtures for redirects and click events
- Tests if post, and links are returned in the click events
2022-10-06 11:43:39 +02:00
Sanne de Vries
08da18e324 Fixed breadcrumbs responsive issues
Refs https://www.notion.so/ghost/Switch-breadcrumb-style-513a624c0e0d490ca39a2fdb97a6971a

- New breadcrumb style broke posts list on smaller screens
- Updated copy to reflect the action taken on the page (e.g. Edit tag)
2022-10-06 16:25:57 +07:00
Daniel Lockyer
7308bb9122
Switched to accessing config loader directly
- I lowered the code coverage on the repo to the point where
  it started failing because I added a new export to the config library
- this wasn't easy to add tests for because the existing config tests
  use the loader directly and not the library export
- instead, I'm just going to make the dev script access the loader, and
  make a note to clean this up in the future when we pull out the config
  module
2022-10-06 16:25:29 +07:00
Simon Backx
aaabf4b103
🎨 Improved email failure handling and retrying (#15504)
fixes https://github.com/TryGhost/Team/issues/2009

- When an email is sent, but it failed there was no way to retry once you left the retry screen
- There was no indication that the email failed to send in the post list and editor
2022-10-06 11:12:11 +02:00
Daniel Lockyer
0bfbee5523
Fixed yarn dev --stripe ignoring HTTPS configured sites
- because the cwd of `.github/dev.js` is not `ghost/core`, it doesn't
  pick up config.local.json files, so any configuration you set in there
  isn't applied
- this meant that developers with HTTPS configured locally couldn't use
  `--stripe` because it wouldn't configure the Stripe listening URL
  correctly
- this adds an exports to the config lib to allow passing options in,
  which I then utilize to pass the directory that config resides in
- this should fix the aforementioned problem with HTTPS
2022-10-06 15:58:51 +07:00