Commit graph

18 commits

Author SHA1 Message Date
Takuya N
c3c33aa9cd
Show friendly error message on API fetch failure on stats (#17570)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-05-18 16:12:42 +02:00
Takuya N
275cdadb60
Pass options correctly to chart.js on articles#stats (#17435)
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2022-05-04 09:42:55 +01:00
Miguel Nieto A
6cc341e70e
Remove dots from chart when time range is Infinity (#16720)
* Remove dots from chart when time range is Infinity

* refactor: 🐛 Remove dots using the chart options

* refactor: ♻️ Improve params of drawChart func

* refactor: ♻️ Use a variable showPoints
2022-03-02 15:20:36 +00:00
Suzanne Aitchison
783fb6fa24
Accessibility enhancements to navigation tabs (#13559)
* update storybook example and docs

* update desktop home feed tabs with a11y enhancements

* update storybook to reflect buttons usage, update post editor buttons

* update admin html variants tabs

* update admin sponsorships tabs

* re-add flex to the crayons-tab class to prevent regression in tab components not updated

* Revert "update admin sponsorships tabs"

This reverts commit d9e4a5e4b0d362e38a11c795b35ceb4442bc4d90.

* Revert "update admin html variants tabs"

This reverts commit 3d9f119e88dc2f2f102d664c57a1f56413490a36.

* update search tabs

* update v2 form erb html

* update tag index tabs

* update notifications tabs

* label the notifications nav

* update mod sidebar tabs

* update main analytics page tabs

* add cypress tests for home feed tabs

* add tab tests for the post editor

* add cypress tests for tags index navigation

* fix UI issue with search tabs, add search cypress tests

* add tests for the analytics dashboard tabs

* add mod nav tests

* add notifications navigation tests

* get new handles after view switch

* replace hardcoded mod paths

* apply review suggestions
2021-05-07 15:24:34 +01:00
Suzanne Aitchison
2e9ba2334a
15 min fix for chart js errors (#13598) 2021-04-30 13:28:20 +01:00
Fernando Valverde
8b4e6ba91b
[Small fix] Makes stats page responsive (#13345)
* Small UI refactor that makes the stats page resonsive (to some degree)

* Add import to scss file

* Whoops

* Implement feedback from review

* Extract flex value into variable

* Update app/javascript/analytics/dashboard.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-14 14:57:35 -06:00
Michael Kohl
5406b0576e
Split Settings::Authentication from SiteConfig (#13095)
* Split Settings::Authentication from SiteConfig

* Move specs

* Sort fields

* Update settings usages

* Update recaptcha usages

* Add data update script

* Update spec

* Rename SiteConfigParams concern

* Fixes, new route, new controller

* Controller and service refactoring

* More controller and service updates

* Spec updates

* More spec fixes

* Move file

* Fix FeedbackMessagesController

* Update admin/configs_spec

* Fix remaining specs in admin/configs_spec

* Fix configs API

* Formatting

* Clean up old service object

* Various fixes

* Update DUS

* Add model argument to admin_config_label

* Fix key name

* Fix specs

* Add distinct request caches for settings classes

* Fix e2e tests

* Fix remaining system spec

* Make DUS idempotent

* Move routes block

* Cleanup

* Switch to ActiveSupport::CurrentAttributes

* Pinned rails-settings-cached

* Update e2e test

* Update lib/data_update_scripts/20210316091354_move_authentication_settings.rb

Co-authored-by: rhymes <rhymes@hey.com>

* Add guard to DUS

* Temporarily re-add two SiteConfig fields

* Fix config show view

Co-authored-by: rhymes <rhymes@hey.com>
2021-04-12 09:41:09 +02:00
dependabot[bot]
1522b6d41e
Bump chart.js from 2.9.4 to 3.0.2 (#13244)
* Bump chart.js from 2.9.4 to 3.0.2

Bumps [chart.js](https://github.com/chartjs/Chart.js) from 2.9.4 to 3.0.2.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v2.9.4...v3.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

* fix issues in migration to 3x of chart.js

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-08 10:46:32 +02:00
Jamie Gaskins
c2b7f0b096
Use 2-digit month and day for JS Date class (#13257)
Single-digit months and days are not compliant with the ECMAScript
standard for date strings.

See: https://262.ecma-international.org/11.0/#sec-date-time-string-format
2021-04-07 14:25:39 -04:00
Andrew Bone
6aae404c54
Update Analytics Dashboard time navigation to tabs (#13270)
* Move to crayons-tabs

* Update js logic to use crayon-tabs

* Remove toggle and add tab

The added code moved the tabs to the right hand side of the container (until mobile styles kick in then it will fill the container).
2021-04-07 14:11:15 +01:00
Katie Davis
76453b41fb
Updates ESLint rules to error on default imports (#12512)
* add rule

* add named imports

* more missed files

* so many files
2021-02-02 10:24:03 -05:00
Nick Taylor
bf7780cd2c
Ran prettier on *.js, *.jsx and *.md files. (#11586) 2020-11-23 20:45:50 -05:00
Nick Taylor
03ff779ca3
Moved src/utils out of src/ folder to utilities/ folder. (#7875) 2020-05-15 10:07:42 -04:00
Ben Halpern
24246015bc
Move Chart.js to dynamic import (#5576) [deploy] 2020-01-18 20:46:35 -05:00
rhymes
7da7a16d8d Pro: add referrers to dashboard and single article stats (#3295)
* Reorganize PageViewsController

* Add domain and path to PageView model

* Add before_create callback to populate domain and path

* Add list of referrers to AnalyticsService

* Add referrers to the UI

* Remove useless referrers card and tweak table line height

* Add referrer stats to article stats page

* Add not null and empty default to domain and path

* Refactor JS analytics client

* create_list is a step back here

* Revert "Add not null and empty default to domain and path"

This reverts commit bc02440076047a887c65d300bccd4661ecc8ffd0.

* Add index on domain concurrently

* Make the script more robust
2019-06-25 13:58:09 -04:00
rhymes
55634ad68f Display stats for organization article (#3232)
There was a bug where the frontend was not passing the organization id to the backend, and thus the fetching of the stats failed for organization articles.

This also adds a bit of error handling for `fetch` API
2019-06-19 09:17:35 -04:00
rhymes
7f2045b250 Pro Analytics: stats for a single article (#3120)
* Add /stats endpoint for articles, opened only to Pro users

* Add analytics to article stats page

* Add stats button to the article page and test stats page
2019-06-13 19:02:09 -04:00
rhymes
6960b89f28 Dashboard Pro: support InstantClick and show org analytics (#3102)
* Fix JS lint issues

* Do not rely on globals

* Use InstantClick to make transitions work in the pro dashboard

* Fix eager loadings and remove unused queries

* Refactor drawChart

* More consistency in naming

* Display correct analytics for organization
2019-06-12 09:40:42 -04:00