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
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
refs https://github.com/TryGhost/Team/issues/1891
- cleans up mock stats data from hardcoded values for each period to instead have the global stats format with date
- the value for each period is calculated dynamically based on selected option
- is in line with how API data is expected to be returned, allowing it to easily fit in when added
refs https://github.com/TryGhost/Team/issues/1673
When a user switches plan, the paid subscribers delta chart on the dashboard displays the change as a cancellation plus a new subscription. This display is misleading and confusing - instead, plan changes should be excluded from the paid subscribers delta chart.
refs https://github.com/TryGhost/Team/issues/1650
- Some places only checked for Stripe being connected via the 'connect' method and ignored the 'direct' method
- Updated (where possible) admin to use the new calculated `paid_members_enabled` setting
refs: https://github.com/TryGhost/Team/issues/1145
- this should allow us to remove the /products endpoint in v5
It avoids:
- `kg-product-card`, that really is meant to say product
- `product-cadence` on offers
Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
- set 30 days to show every other gridline
- set 90 days to show every 3rd gridline
Note that this required to add an extra day to the displayed number of days.
refs https://ghost.slack.com/archives/C02G9E68C/p1651773627838629?thread_ts=1651771893.729649&cid=C02G9E68C
The chart was not reloading when the fake data toggle was changed. This code is only used when using mocked data. So if you loaded the page without mocked data, everything was working fine and the chart did show the right data. If you then enabled fake data, the chart just won’t reload and would keep showing the initial data (so it wasn’t always showing mocked data, just the initial data).
The exit clause of the mergeDates function should return an array rather
than an object, to ensure that an array is always returned. Because we
are using the concat method when recursing, this continues to work for
longer lists.
We want to return an empty array if list is empty, this protects against
returning [undefined]
refs https://github.com/TryGhost/Team/issues/1512
Adds the new endpoint `/stats/subscriptions/` which provides data for
the paid mix and paid breakdown charts.
Made the filledMissingDates function more generic by passing in a
`copyData` function which is used to populate a date from the previous
days data, if the data for that date is missing.
refs: https://github.com/TryGhost/Team/issues/1531
- broke apart the combined chart
- added back in the paid mix chart
- separated out the mini charts into separate components
- made top chart work with total, paid and free
- added in an overview section back at the top for total, paid, free
- made metric labels and values larger and easier to parse
Co-authored-by: Simon Backx <simon@ghost.org>
refs https://github.com/TryGhost/Team/issues/1510
- Fixes site status not loading (https://github.com/TryGhost/Team/issues/1510) for mocked data because of tasks were already pending (reloadAll now cancels them first)
- Reload no longer required when switching anchor chart type
- Removed paidOptionSelected (fixes bug when swiching)
- Moved did-insert of anchor chart to topmost element
- Renamed chartDisplay values
no issue
- When using 'all time' in the past, the start date of the total members/paid members chart would differ from the MRR chart. They are now synced.
- The start date is always the earliest date we have data for (MRR or member counts)
- The all time chart is minimum 90 days long
* Basic work to combine the three line graphs for the new dashboard
refs: https://github.com/TryGhost/Team/issues/1467
- combined three line graphs into one main one at the top
- still working on this, so some code is a little rough
* Tidying up a few bits of consolidated graph in new dashboard
refs: https://github.com/TryGhost/Team/issues/1467
* Updated chart anchor component for removed member counts
no issue
* Updated chart paid members to not reload on days change
no refs
* Moved did-insert to top element in chart-anchor
* Fixed chart anchor to use filled member data
* Replaced chart anchor divs with buttons
* Tweaking up the paid graphs below anchor to improve visuals
refs: https://github.com/TryGhost/Team/issues/1467
* Fixed missing type attributes on buttons in chart anchor
* Updated MMR to MRR for the new consolidated graph
refs: https://github.com/TryGhost/Team/issues/1467
* Added real MRR to chart anchor
* Added open rate percentage data to chart email
Co-authored-by: Simon Backx <simon@ghost.org>
refs https://github.com/TryGhost/Team/issues/1468
- Implemented loadSiteStatus with real data
- Replaced unused stripeEnabled with hasMultipleTiers
- hasMultipleTiers=false hides the tiers paid mix chart
- Improved loading and updating fake state
- Removed deprecated loadMembersCounts method in dashboard stats service
refs https://github.com/TryGhost/Team/issues/1443
- Includes support for 'all' data in member count charts
- Fixed reloading of MRR data when switching between days
- Loading data now always returns a 'promise' instead of just dropping it
- Tiers and cadence paid mix chart added
- Defaults to mocked data = off (required to prevent loading paid mix tiers on page load)
- Note that there is still some discussion about the correctness of the tiers paid mix data, refs Slack https://ghost.slack.com/archives/C02G9E68C/p1648717224956659
no issue
- Replaced custom member counting queries with the MembersCountCacheService
- Results are reused if they were already fetched less then 60 seconds ago
- Fixed logic in MembersCountCacheService to only return old results (> 60) instead of new results (<= 60)
refs https://github.com/TryGhost/Team/issues/1443
- Fetch member counts from 30 days ago
- Added Percentage component to show +1%, -1% or = changes
- Fixed: emails sent number was not formatted
- Fixed: wrong dates were used for some stats
refs https://github.com/TryGhost/Team/issues/1443
- Now fetches email models instead of posts
- Fetches up to 8 emails
- Autofills missing emails, so we always have 8 emails
- Changed data structure of emailOpenRateStats variable in dashboard stats service
refs https://github.com/TryGhost/Team/issues/1443
- Also moved loading of charts outside of constructors to avoid infinite update loops in Ember
- Random loading delay when using fake states
refs https://github.com/TryGhost/Team/issues/1444
- Moved control panel to separate component
- Moved storage of amount of graph days to load to dashboard stats service
- Moved storage of engagement filtered status to dashboard stats service
- Dropdown state selector
- Save state in localstorage
- SiteStatus object and loadStatus methods in dashboard stats service and mock service