* JavaScript MVP
- First round of linting
- Use for testing
* Add some default UI error handling
* Add file validation to updating profile image
* Add type validation and fix size bug
* Refactor and add file validation to article cover
* Add file validation to body images
* Add accept field to profile image form
* Add parseInt to maxFileSizeMb
* Add accept and max-file-size-mb to article images
* Change parseInt to Number
* Add file validations to podcast form
* Add accept image to podcasts
* Add file validation and accept field to org form
* Use appendChild for error message
* Add file validation to comment form
* Add JS Docs comments
* Remove redundant format check
* Add documentation to override default values
* Update documention (spelling, formatting, etc.)
* Update max-file-size-mb to 25
* Bump default max file size for images to 25
* Change appendChild to append
* Refactor remove error message
* Refactor JS, remove console logs, update error msg
* Remove video from permitted file types
* Update error messaging
* Update docs for funciton params...oops 🙈
* Fix file size check logic
- Allow for 0 maxFileSizeMb
- Use JSON.parse() for permittedFileTypes to get an Array
* Add specs
* Change blackbox to black box
* Remove wait_for_javascript
* Remove comments from spec
* Adds Podcast Episode metadata as JSON to avoid scraping the HTML
* Uses app_url helper instead of app_protocol_and_domain string interpolation for podcastImageUrl
* Adds podcast_episode#mobile_player_metadata, cleans eslint/codeclimate mess I made & adds tests
* Removes an extra line to fix codeclimate
* Removes unnecessary return
* Add UI to vomit on a user from /mod
Co-authored-by: MichaelaHunter <michaela1234@gmail.com>
* Add backend tweaks for vomitting on users
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
* Validate that users can't moderate articles
* Add system spec for article mod page
* Satisfy rubocop after rebase
* Fix typo and formatting
* Use reactable_id instead of user_id
Co-authored-by: Michaela Hunter <60361569+MichaelaHunter@users.noreply.github.com>
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
* de-emphasizing right sidebar: mostly colors & spacing
* adding a bit more love to typography in sidebar
* changing language on LISTINGS widget header
* hiding profile widget from left sidebar
* cards shadow now looks like a bit less random and annoying
* actually doing the same with all shadows! YOLO
* some spacing cleanups around sidebars
* this time some typography love
* im committing but not really sure what exactly
* adding a bit more love to feed card
* looks like i broke some other views.. time to fix em all
* cleaning up typography a bit more
* .
* separating empty search results styling
* created a card styling mixing to reduce some code.. also moved cheese around a bit
* several more cleanups
* improving responsiveness
* i fixed what i broke
* more cleanups
* org badge
* .
* ...
* responsiveness
* .
* some adjustments
* bring back profile card
* tiny logo adjustment
* bunch of further refainments
* typography
* a bit more refainments
* whoops
* bringing back CTAs styling to loggedout sidebar
* fixes to left tags in left sidebar after merge
* buttons fix
* fixing border-color
* Update app/assets/stylesheets/articles.scss
Typo!
Co-Authored-By: Nick Taylor <nick@iamdeveloper.com>
* .
* css cleanup + double border on article page
* removing unnecessary comments
* get rid of loading glitch
* static vs fixed header
* Update system specs
* Update client test snapshots
* Further modify homepage specs
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* Consolidate `.decorate` calls
* Move Activerecord finders out of main stories feed partial
* Add back in decorates to sticky_articles partial
* Combine top and new articles returned from StoriesController
* Extract feed construction logic to a service
* Some PR tweaks (naming)
* Quick test fix
* SASS formatting in action.
* Unnested .sidebar-nav-element in SASS
* Created the <TagsFollowed /> component.
* Mini refactor.
* Left side bar uses <TagsFollowed /> component now.
* Accomodating InstantClick
* Small refactor and added some comments.
* The homepage webpacker pack only needs to be loaded once.
* Added tests for the <TagsFollowed /> component.
* Modified the receive InstantClick callback as per their docs.
* Reverted the data-no-instant on he homepage bundle. It seems to cause issues in certain scenarios.
* Just some tweaks to <TagsFollowed /> component.
* Removed CSS for general img tag in context of sidebar as it does not appear to be used.
* Fixed copy paste error from JSX to HTML.
* Fixed <img /> styles for arbitrary sponsorship widget.
* Fixed a regression that a Capybara test caught.
* Fixed user followed tags on home page tests.
* Fixed logic for loading user data on homepage.
* Fix logging for dev and test environments
We had some unused code for Timber in our config files for development and test.
However, this was completely clobbering Rails' default behavior of logging out to log/development.log and log/test.log. We should allow for logging in these environments in particular, and since we're not using Timber there, we can just revert to using the Rails default debugging log levels.
* Add Timber logger to specs that explicitly require it
* Restore default Rails.logger in specs using Timber logger
* Explicitly use Rails.logger in OmniauthCallbacksController
We seem to have different logger classes leaking into this controller in tests.
I'm not entirely sure why this is/haven't been able to investigate yet, but I do think we should be using the Rails.logger explicitly until we can figure that out.
* Improve dropdown UX for internal/badges
Add a "blank" option to the dropdown to list of badges on internal/badges route.
Also add some checks to handle if an admin accidentally tries to award a "blank" badge.
* Ensure error is surfaced as flash message
* Add organizations to user profile
* Add user organization info updated at column and cache key
* Remove default value for users organization_info_updated_at column
* Update organization_memberships factory
* Remove schema organization_info_updated_at default value
Co-authored-by: rhymes <rhymesete@gmail.com>
* Prepare factories and associations for Users::DeleteActivity specs
* Altered user associations, delete the needed associations in Users::DeleteActivity
* Moved and refined user deletion spec
* Removed useless commented user associations
* Refactored BackupData factory
* Refactored ProfilePin factory
* Refactored Reaction factory
* Fixed specs: Keep default _type in factories or specify it in tests
* Ok, notes shouldn't be deleted on user deletion
* Fixed creating reactable for specs
* Specify commentable/commentable_type explicitly when creating data for tests
* Fixed typo in the comments spec
* Removed unnneeded space
* Added aggregate_failures for testing user associations deletion
* Keep feedback_messages while deleting user activities
* Add gem Ransack 2.3.0
* Add sorting and search to internal/reports
The UI here should probably be revisited sooner or later, I feel like
the vomit reactions might even need to be moved to their own view.
* Add system spec for internal reports search
* Remove filter for report_type
* Add a default message to badge award action
Because:
- The only badges routinely awarded manually use the same message
- Right now, unfriendly/unsafe UI can result in an error notification
The only badges that are currently awarded manually (afaik) have the
message "Congrats!!!" so for the time being, if a message is not
supplied to the UI, it will simply use the "Congrats!!!" message as a
default.
That being said, I'm not totally convinced this message won't work for
the long term. Generally, if we are awarding badges by hand, I'd imagine
we'd want a specific message explaining why we are doing that, or just
be okay with "Congrats!"
After talking with Peter about it, the longer term goal should be to
move badge messages into the database so they can be modified in the app
and not hardcoded. That also make sense regarding the effort to
genericize the app eventually.
* Test Badge notifications
* Add view for managing organizations
This adds only an index and show action for the internal/organizations
page. Eventually we'll flesh this out with features to automate the more
mechanical org management tasks.
* Use instance variable for search query
* Convert multiple expects into one
* Add pagination to organizations
* Add search spec for organizations
* Use size over count
* Initial work for streaming app shell way of using serviceworkers
* Close in on serviceworker adjustment finalization
* Add docs and loading indicator
* Remove useless code
* Don't run on API
* Update app/javascript/contentDisplayPolicy/hideBlockedContent.js
* Fix small details
* Don't run serviceworker.js code in test env
* Fix JS in serviceworker
* Move private keyword to proper place in async controller
* Change shell_version to HEROKU_SLUG_COMMIT
* Update caching config
* Add test for async_info/shell_version
* Move admin specs
These tests should probably be grouped together, so I moved them into a
directory called "internal"
This also encourages some additional internal tests.
* Add an internal badges controller
* Add internal view for running BadgeRewarder task
Because:
- Peter is currently running this rake task from Heroku and this is
going to make his workflow easier
- It's a step towards having a decent tool under internal for managing
badges (though I'd hesitate to call this decent)
This change adds a view and controller action to award badges in
batches, it's an improvment over the current workflow that Peter is
using, but it's still very rough around the edges.
We could definitely improve this with some error handling around the way
the BadgeRewarder works, but for now this is a net gain over how Peter
has been doing this task. I think it's worth merging as is and future
work to improve the experience and reliability of this tool can be
prioritized against other tasks.
* Remove comment spec with no examples
* Delete commented out spec
This test could be refactored to a green state, but I'm not sure it's
worth the effort.
I started down that path, but it was time consuming. It might be more
effective to rewrite this test from scratch.
For the time being, since it has not been running, I think it should be
removed from the codebase.
* Enable pending system spec
* Remove pending and useless tests
There is a pending test for functionality that does not exist, so I
removed it.
I removed some expect blocks that were essentially testing if Rspec
works / if Rails routing works. That's probably not necessary for us to
do and leaving the code in a spec encourages future contributors to
write similar specs.
* Action to request account deletion by email
* Confirmation page for user destroy
* Remove some of the old destroy user code
* System tests for user destroy
* Moved user destroy tokens to redis
* Change tests according to the new user destroy token storage (in redis)
* Added info about the link to user delete confirmation email
* Remove blank like from schema.rb
* Delete user destroy token on user delete
* Update confirm user destroy js
This test was commented out, but I don't see much information in the
commit message as to why. The Pull Request which this commit was merged
from seems to be lost as well.
This test does seem to pass when it's not commented out, but there must
have been a reason it was commented out.
That being said, the test isn't really *testing* much functionality.
Essentially, it just asserts that a page with the word "settings" on it
renders from several different approaches. This might be problematic
because a false positive would be quite easy.
In light of those things, it makes sense to me that this test should be
removed.
* Add infinite scroll to followers list (#258)
* Refactor fetchNext function for clarity (#258)
* Sepparate following tab into multiple tabs to support infinite scroll (#258)
* Add infinite scroll to following pages (#258)
* Add tests to infinite scroll api
* Refactor dashboard loading text
* Refactor infine scroll function
* Fix duplicated entries problem in infinite scrolling
* Switch randomized attributes to sequential to avoid InvalidRecord error
* Add acceptance tests for infinite scroll
* Remove unused following method
* parameterize limit per page for followers and followings
* Split follows endpoint into followers and followings
* Authenticate user with api key in followers and followings
* Split followers endpoint into users and organizations
* Add redundant html to sublist partial
* Speed up infinite scroll tests
* Refactor api json responses to use partials
* Authenticate api user before follows create
* Resolve conflicts on scrolling js
* Improve partials organization and fix organization username bug
* Improve readability of unauthorized test
* Use let! to create scrolling test data
* Fix not working podcasts link
* Refactor initScrolling to remove linting errors
* Fix codeclimate coding style issue
* Test tags forms and podcasts hyperlinks
* Fix eslint issue with double equals
* Improve before_action usage and readability
* Start with self deleting account
* Moved deleting user content and activity out of moderator hierarchy
* Added tests for the users delete services
* Tests for Users::DeleteComments
* User self-deletion (start)
* Some tests for user self-delete
* Specs for user self-deletion
* Test flash settings on users delete
* Added basic specs for the Users::DeleteJob
* Send notification when a user was destroyed
* Rename Users::DeleteJob to SelfDelete
* Change texts about self-deletion
* Fix users delete job spec
* Rescue and log exceptions while self-deleting user
* Added visible flash notices after deleting user
* Remove unneeded css for flash notice
* Fix link to a ghost account
* Remove redundant css
* Added github and twitter oauth apps links