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
* Add base history support
* Add tags and ranking and make it work
* Fix styling
* Add article title and text excerpt to the index
* Add pagination support
* Debounce the search to 300ms
* Show history only to pro users
* Use routing helpers instead of hardcoding
* Raise the page size to 100
* Remove console log
* A bit of regrouping
* init wip react components
* wip add dashboard to listing views
- create a html.erb view to hold listing/dashboard with javascript_pack_tag
- create listingDashboard.jsx in packs
- create listingDashboard component and dashboard folder with smaller components
- added view to controller and routes
* slowly adding some formatting
adjusted styling, info
* remove listing body from dashboard
* add some styling and adjust info
* wip adding org listings
* wip multi org in dashboard
* adjust for multi org
* add styling and better multi org support
* comment out bump and delete -- save for upcoming PR
* reduce lines
* listing form has link to listings dashboard instead of listings
* adjust header boxes flex direction for mobile
* fix organization id query
* WIP testing
needs more rigorous tests
* finalize tests
* Add MVP of notification subscriptions
* Add rate limiting for notification subscriptions
* Show modal for logged out users on subscribe click
* Add enter key functionality for checkbox
* Add relationships for notification subscriptions
* Add model test for notification subscription
* Deprecated article mutes in favor of notification subscriptions
* Deprecated comment mutes in favor of notification subscriptions
* Move comment muting tests and logic over
* Merge comment and article muting into subscriptions
* Remove redundant check
* Use database to check for rate limit instead of cache
* Test for subscriptions handling notifications properly
* Fix notification model spec for subscriptions
* Fix tests for subscriptions
* Remove rate limiting
* Properly handle logged out users getting subscription status
* Fix test for new pattern
* Update reserved words
* Add config column to notification subscriptions
* Add logic for top level config and move tests
* Test for top level subscribers getting notified
* Fix logic mistake oops
* Add index and refactor comment_user_ids
* 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
* 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
* Allow user to have many orgs
* Allow users to handle multi orgs in settings
* Make rounded buttons inline
* Add multi org function to dashboards
* Fix merge conflicts
* Fix mistake in merge conflict fix oops
* Display the correct membership level
* Fix accessibility issues
* Display organizations for article editors
* Handle submitting org id with preact editors
* Make listings work with multiple organizations
* Allow listings to have multiple orgs on create
* Display the correct number of credits for each org
* Move script tag to Webpack
* Allow multi orgs for purchasing and viewing credits
* Use OrganizationMembership as authorization check
* Display multiple organizations for notifications
* Allow dashboard to be viewable under multi-orgs
* Remove unused method
* Add multi-org functionality for article editors
* Show pro dashboard buttons for member+ org levels
* Leave the correct organization
* Allow article API to change org id
* Add left-out authorization method oops
* Make nav buttons a bit more clear
* Fix merge conflict
* Fix adding org id for /api/articles and tests
* Fix tests for org policy
* Use proper logic for displaying org members
* Update org actions with new authorization
* Use correct org when creating a listing
* Remove additional payment charge oops
* Mark org notifications as read with authorization
* Remove deprecated post_as_organization attribute
* Use new org_admin syntax
* Remove deprecated org logic for article create and update
* Default all RSS posts to not belong to any org
* Render org_member page for guest users
* Update org policy spec to work with multi orgs
* Use org_membership for org traits and move identity code
* Use org_member trait
* Update to work with multi-orgs
* Validate article's org_id if param org_id is blank
* Make a let variable
* Remove unnecessary eager load for credits
* Fix HTML structure and org logic for non-org users
* Update credits spec for multi-org
* Add test for failed payment when purchased by org
* Lint listings_spec
* Test that the listing was created under the user
* Add tests for POST /listings multi-org
* Use double quotes for classes
* Fix /manage and a few other multi-org bugs
* Fix test for multi org
* Use correct method SQL exists? not Rails exist?
* Fix reads spec for multi-org
* Fix org_controller actions to work with multi org
* Test only multi org and not old usage and fix leave_org
* Fix org showing user profile img test for multi-org
* Fix org logic for users with no orgs
* Remove switch org functionality
* Update tests and add hidden param for org id
* Redirect to the specific organization
* Test other org button actions
* Use settings_notice instead of legacy notice and refactor
* Fix weird extra end issue prob from merge conflicts
* Test for with new flash key
* Fix user_views_org tests for multi-org
* Test for new flash message
* Update snapshot with new a11y html
* Move styling to stylesheet
* Add site admins functionality
* Move org_member? method in user model and refactor
* Use unspent_credits_count for organizations
* Add tests for /listings/new and minor bug fixes
* Use .present? in case of empty array
* Fix a lingering deprecated method
* Use greater than 1 for random numbers
* Add tests for counting spent and unspent credits
* init
- add reading_time to reactions
- make migration
- add to algolia index in reaction model
- add method in reaction model to define reading time based on reactable reading time
* add time to front end
* Revert "Return errors instead of raising an exception on ArticleCreation (#2922)"
This reverts commit 09a99d93a3.
* Revert "init"
This reverts commit 53650ebcc3c93c54e396977f7c34f7aa35a589c4.
* Revert "Revert "Return errors instead of raising an exception on ArticleCreation (#2922)""
This reverts commit e8cf1f3a290dd06b937247e3ff7593e7c7036553.
* Update reaction.rb
* remove duplicate searchableAttribute
* add prop for message modal method
* clean up comments from open inbox method
* add inbox type to listing model author
* add sample methods for opening message modal in listings and listing modal
* only show for users with open inbox and hide for self
* use contact_via_connect instead of inbox_type
* fix edit listing to include contact via connect attribute
* wip send message method
* adjust message styling
* change id name
* update destination
* remove unused methods
* Add system test to create article from the editor
* Move article creation from API to app controller
* Fix system test to edit posts
* Move article update from API to app controller
* Rewrite create article API using API key
* Add main_image and canonical_url to allowed creation params
* Rewrite update article API using API key
* Fix tests and have Comments API inherit from API
* Simplify article show page reactions
* Clean up styling and adjust zen mode logic
* Remove unused variables
* Update app/views/articles/_actions.html.erb
Co-Authored-By: Nick Taylor <nick@iamdeveloper.com>
* Small style mods
* Slight padding change
* Finalize new show page button design
* Initial work on v2
* Initial changes merger
* Work to finalize v1/v2 editor adjustments
* Clean up styling
* Fiddle with form margins
* Fix some tests
* Change video
* skip a couple tests
* Modify tests to work with new code
* Add proper error handling when creating a listing
* Remove accidentally committed stylesheet
* Make error text
* Preserve input values if the submission is invalid
* Add new line at the bottom of the file
* Fix some linter errors
* Add overlay and links to single listings
* Clean up some code
* Add escape key functionality to quit overlay
* Lint some code
* Add modal functionality
* Update styling for modal
* Fix some linter warnings
* Preserve the correct link all the time