Commit Graph

29713 Commits

Author SHA1 Message Date
Naz
4528cba1b9 Changed Content API caching to public
refs https://github.com/TryGhost/Toolbox/issues/410

- Private cache control was preventing browser or shared caches from storing Content APIs response. The type of data served through the Content API is very much of a "public" nature, so should be cacheable.
- Right now the 'max-age' value of 'cache-control' header is hardcoded to '0', without 'must-revalidate' value, to allow browsers to cache content slightly more aggressively. In the future the 'max-age' value will most-likely become configurable to allow even more aggressive HTTP caching.
2022-09-26 14:54:50 +08:00
Naz
7b009bf1fe Enabled shared caching of 404 error responses
refs https://github.com/TryGhost/Toolbox/issues/410

- The 'private' value in 'Cache-Control' response header for all errors made it impossible for shared caches (e.g.: Fastly, Cloudflare) to cache 404 responses efficiently.
- The change substitutes 'max-age=0' which should not effect the browser cache behavior but would allow shared caches to process such requests efficiently.
- A more loose caching logic only applies to 404 responses from GET requests that are not user-specific (non-authenticated, non-cookie containing requests)
2022-09-26 14:54:50 +08:00
Naz
2acb0fca74 Refactored error cache control logic to middleware
refs https://github.com/TryGhost/Toolbox/issues/410

- This is groundwork for split cache-control rules for Admin app endpoints and the rest of Ghost apps.
2022-09-26 14:54:50 +08:00
Rishabh
190031f38c Added modal for showing all attribution sources
refs https://github.com/TryGhost/Team/issues/1941

- limits the source attribution list to top 5 on dashboard, and shows all sources on clicking on `Other` link

Fixed lint
2022-09-26 10:43:05 +05:30
Rishabh
baaf64405a Refined details toggle on member subscription box
refs https://github.com/TryGhost/Team/issues/1904
2022-09-26 10:43:05 +05:30
Rishabh
f4e6f00077 Refined attribution chart to show custom tooltips
refs https://github.com/TryGhost/Team/issues/1905
2022-09-26 10:43:05 +05:30
Rishabh
e76f082884 Moved mrr data to dashboard anchor chart
refs https://github.com/TryGhost/Team/issues/1932

- moves MRR data to main dashboard anchor chart behind source attribution flag
2022-09-26 10:43:05 +05:30
Rishabh
6137f9d3d5 Refined attribution chart legends to match table
refs https://github.com/TryGhost/Team/issues/1941
2022-09-26 10:43:05 +05:30
Rishabh
ec5f09edeb Refined member subscription detail box design
refs https://github.com/TryGhost/Team/issues/1904
2022-09-26 10:43:05 +05:30
Djordje Vlaisavljevic
50100a7c8d Capitalized subscription page
refs https://github.com/TryGhost/Team/issues/1904
2022-09-26 10:43:05 +05:30
Djordje Vlaisavljevic
bdce8f21cc Updated font weights
refs https://github.com/TryGhost/Team/issues/1904
2022-09-26 10:43:05 +05:30
Djordje Vlaisavljevic
4a8c9a530b Updated embedded MRR metric design
refs https://github.com/TryGhost/Team/issues/1932
2022-09-26 10:43:05 +05:30
Djordje Vlaisavljevic
0be2191726 Updated attribution dashboard widget design
refs https://github.com/TryGhost/Team/issues/1941

Updated attribution dashboard widget design

refs https://github.com/TryGhost/Team/issues/1941
2022-09-26 10:43:05 +05:30
Djordje Vlaisavljevic
7c23e721f1 Updated attribution sources table design
refs https://github.com/TryGhost/Team/issues/1941
2022-09-26 10:43:05 +05:30
Djordje Vlaisavljevic
5785f2b9bd Reorganized dashboard layout
refs https://github.com/TryGhost/Team/issues/1932
2022-09-26 10:43:05 +05:30
Sanne de Vries
663b9ffe02 Updated post list stats
Refs https://github.com/TryGhost/Team/issues/1895
2022-09-26 10:39:37 +07:00
Kevin Ansfield
508119244c
Switched delete snippet modal to new modal pattern (#15468)
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-25 10:54:07 +01:00
renovate[bot]
7045eef930
Update dependency ember-css-transitions to v4.2.0 (#15453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-24 18:20:57 +02:00
Kevin Ansfield
ac67475605
Switched delete member modal to new modal pattern (#15467)
refs https://github.com/TryGhost/Team/issues/1734
refs https://github.com/TryGhost/Team/issues/559
refs https://github.com/TryGhost/Ghost/issues/14101

- switches to newer modal patterns ready for later Ember upgrades
2022-09-24 18:18:34 +02:00
Kevin Ansfield
63b1e4e8ad
Resolved power-select related deprecation warnings for loading components by string (#15466)
no issue

- in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable
- switched to passing a component explicitly with `{{component}}`
- https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
2022-09-24 17:00:05 +02:00
renovate[bot]
8aa4308866
Update ember-basic-dropdown addons to v6 (major) (#15159)
Update ember-basic-dropdown addons to v6

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-24 15:37:06 +02:00
renovate[bot]
65a74f41c8
Update dependency ember-power-select to v4.1.7 (#15157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-09-24 15:08:42 +02:00
Rishabh
e5fb7b805f Wired referrer information on member detail page
refs https://github.com/TryGhost/Ghost/pull/15463
2022-09-24 17:46:57 +05:30
Rishabh
6c85c75b86 Added referrer attribution data to member api
refs https://github.com/TryGhost/Team/issues/1961

- includes referrer source and medium information in member api
2022-09-24 17:46:57 +05:30
Kevin Ansfield
6fffe5468d Fixed linter error
refs fa84808048

- code copied from `ember-power-calendar-moment` did not comply with our linter rules
2022-09-24 13:36:47 +02:00
Kevin Ansfield
a934481f45 Fixed @sentry/browser imports
no issue

- needed for embroider compatibility
- the package we have installed is `@sentry/ember` not `@sentry/browser` so the imports fail when built by webpack
2022-09-24 13:28:35 +02:00
Kevin Ansfield
bfd7ace721 Fixed invalid shortcuts imports
no issue

- `utils/shortcuts.js` does not have a default export but we were using it as if it did, this isn't valid and breaks when transpiled via webpack via embroider
- switched to the valid `import * as shortcuts` import syntax
2022-09-24 13:28:30 +02:00
Kevin Ansfield
fa84808048 Dropped ember-cli-moment-shim dependency
no issue

Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling.

- dropped `ember-cli-moment-shim` dependency
- added `moment-timezone` dependency and updated all imports to reflect the different package
- worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency
  - added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package
  - added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
2022-09-24 13:28:23 +02:00
Kevin Ansfield
9bbafc3ccf Deleted unused files
no issue

- files were left over from earlier development and not being used anywhere
2022-09-24 13:27:54 +02:00
Simon Backx
bba6a4dc84 Fixed cleaned URLs in link table on analytics page
fixes https://github.com/TryGhost/Team/issues/1963
2022-09-23 17:42:51 +02:00
James Morris
87a242bada Removed the full width for posts with the member attribution flag
- Full width was  part of the member attribution flag
- It's messing with email clicks flag
- Removing for both to make things easier

refs https://github.com/TryGhost/Team/issues/1960
2022-09-23 16:19:35 +01:00
Ghost CI
c6865ffe6c v5.16.0 2022-09-23 16:00:34 +01:00
James Morris
6c527cfe78 Made the margins event between elements in the new post rows
refs https://github.com/TryGhost/Team/issues/1957
2022-09-23 15:55:20 +01:00
James Morris
80eaa567b5 Added target blank to links in the link table on post analytics
refs https://github.com/TryGhost/Team/issues/1955
2022-09-23 15:23:59 +01:00
renovate[bot]
f0a37a36ba Update actions/stale action to v6 2022-09-23 15:21:51 +01:00
Simon Backx
e658f7622a
Added LinkClickTrackingService unit tests and renamed wrapper (#15462)
refs https://github.com/TryGhost/Team/issues/1958

- Renamed wrapper service link-click-tracking to link-tracking to be consistent with the package name
- Added unit tests for LinkClickTrackingService
- Added DomainEvents dependency to LinkClickTrackingService
- Fixes dependencies in link-tracking package
2022-09-23 16:19:16 +02:00
Daniel Lockyer
2bff2a22e0
Extracted dev tooling to separate script
refs https://github.com/TryGhost/Toolbox/issues/426

- we're going to need to support more complex combinations of dev
  commands soon, with other packages optionally running and env
  variables being altered
- this command pulls out a lot of the dev env scripting into a single
  scripts
- also cleans up the use of grunt-shell so we can remove the dependency
2022-09-23 15:02:35 +02:00
Simon Backx
3056e3cb51 Fixed subdirectories saved in the link_redirects table
refs https://github.com/TryGhost/Team/issues/1954

- Subdir should be removed before storing it as the 'from' URL
- Should be removed before checking a URL
2022-09-23 14:41:26 +02:00
Simon Backx
239d93a725 Cleaned up LinkRedirectsService
no issue
2022-09-23 13:32:44 +02:00
Simon Backx
1290477d71
Added member last seen update on link click (#15459)
fixes https://github.com/TryGhost/Team/issues/1952

Adds a new MemberLinkClickEvent event that is fired when a member clicks a link. This code has been added to the `linkClickRepository` because that is the only place that has access to the member model (and the event requires the id and current last seen at value). The LastSeenAtUpdater listens for this event and updates the timestamp if required.
2022-09-23 10:34:33 +02:00
Naz
225a046bb8
Made Admin assets aggressively cacheable
closes https://github.com/TryGhost/Toolbox/issues/372

- The admin assets are served with a unique hash depending on the build with a year-long "max-age" value in the response cache-control header. The client browsers still do send 'If-None-Match' requests when there is a hard-refresh on the client side. There's no need for 'If-None-Match' requests though!
- With 'immutable' value in the cache-control header, the browser caches are treating responses as "hard-fresh" without sending redundant requests.
- For more about 'immutable' value read https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#immutable
2022-09-23 13:46:49 +08:00
Rishabh
fe90dde0e1 Updated referrer attribution for empty history
- empty history means attribution script is not loaded, which should be only when its behind the flag
2022-09-22 23:47:24 +05:30
James Morris
eb7547ea3c Added a new click icon for the member attribution flag
- Adds a new SVG icon when the members attribution flag is on only
- Fixes up some dark mode issues for the URL scrollable in events

refs https://github.com/TryGhost/Team/issues/1951
2022-09-22 18:00:48 +01:00
James Morris
729935eca7 Tidied up the page a bit more with the source attribution included
- Has the source attribution chart and table with some basic styles
- Added in a edit button to the analytics page

refs https://github.com/TryGhost/Team/issues/1920
2022-09-22 17:20:15 +01:00
James Morris
0541dbc79b Moved the empty links into it's own box in the post analytics page
- Not ideal, yet, but this is better than what it was before
- Now links empty state is inside it's box rather than just plain text

refs https://github.com/TryGhost/Team/issues/1920
2022-09-22 17:18:51 +01:00
Djordje Vlaisavljevic
a0c6fafba1
Refined source attribution dashboard design (#15457)
refs https://github.com/TryGhost/Team/issues/1932
refs https://github.com/TryGhost/Team/issues/1941
refs https://github.com/TryGhost/Team/issues/1904
refs https://github.com/TryGhost/Team/issues/1932

- updates attribution sources table design
- updates member profile page design
2022-09-22 21:46:42 +05:30
Rishabh
e93f6071cd Handled null sources for attribution chart and table
refs https://github.com/TryGhost/Team/issues/1932

- removes null sources from attribution chart
- moves null sources count to bottom of attribution table
2022-09-22 21:04:46 +05:30
Rishabh Garg
45a301277d
Updated empty referrer source to null (#15456)
refs https://github.com/TryGhost/Team/issues/1939

- changes empty referrer source to null instead of explicit `Unavailable` in API
- makes it easier for clients/frontend to ignore empty referrers
2022-09-22 20:58:45 +05:30
Kevin Ansfield
c59ea73a80 🐛 Fixed distorted images in newsletters for product cards
refs https://github.com/TryGhost/Team/issues/1949

- bumps `@tryghost/kg-default-cards` which updates the rendered output for emails
- added `height: auto` style to the img element so clients don't render the image at the fixed image height retrieved from the `height="x"` attribute
2022-09-22 16:02:04 +02:00
Simon Backx
7581b8726e Added basic post table and analytics page conditionals
refs https://github.com/TryGhost/Team/issues/1947
2022-09-22 15:40:37 +02:00