Commit graph

173 commits

Author SHA1 Message Date
Ben Halpern
b645942dd2
Add loading='lazy' attribute to some images (#2776) 2019-05-09 16:37:06 -04:00
Ben Halpern
995d4eb1e2
Add pagination to listings (#2775) 2019-05-09 14:58:26 -04:00
rhymes
e626002260 Add alternative texts to images (#2771) [ci skip] 2019-05-09 11:16:03 -04:00
rhymes
4e591fea1c Show localized date/time on hover for articles/comments (#2722)
* Add article decorator published_timestamp

* Use time HTML5 element and refactor date in partial

* Add published_timestamp to Article

Adding `published_timestamp` to the homepage we can then use JS to render the full timestamp localized for the user.

We've also added the timestamp to the index and the API

* Display article published timestamp on hover

* Use time also in the article show page

* Add timestamp to bottom articles as well

* Remove published_timestamp from index because it is not used

* Fix broken specs

* Add more article dates specs

* Refactor date initializers
2019-05-09 11:05:17 -04:00
rhymes
f2a0314298 Make reading list button hover effect compatible with a11y (#2759) [ci skip] 2019-05-08 12:46:39 -04:00
rhymes
879864a9bb Improve accessibility score on homepage and article show page (#2740) [ci skip]
* Increase loader text opacity

Low contrast text is not great in general, this also brings Lighthouse score from 88 to 96

* Add some alternative text to images

* Add some aria labels to controls
2019-05-07 09:56:34 -04:00
Ben Halpern
35fe810b51
Add default tags for listings dropdown and misc other changes (#2719) 2019-05-06 14:52:52 -04:00
Ben Halpern
1ddef633cc
Improve reading list (#2695)
* Initial readinglist adjustments

* Improve readinglist

* Finalize new reading list

* Fix indexing and final finalizations

* Fix tests

* fix tests
2019-05-05 19:19:30 -04:00
Ben Halpern
c76abbbdb3
Allow users to follow podcasts (#2690)
* Allow users to follow podcasts

* Only display podcasts user follows

* Add main_color_hex to factory

* Fix podcast test and modify styles

* Fix tests

* Remove weird test
2019-05-04 15:30:40 -04:00
rhymes
c621d9b7e3 Add localized visible short comment date (#2437) 2019-05-03 13:31:00 -04:00
Kobe Raypole
bb16b36ca7 Add policy for article manage action (#2643)
* Add policy for article manage action

This commit adds a policy for the articles#manage method. This will
prevent the error that is stopping article owners from managing their
articles.

* Hide manage button if article isnt published

* account for no current_user

* Move button logic to javascript
2019-05-02 19:31:26 -04:00
Ben Halpern
5e64ae874e
Remove includes user from stories query to reduce num queries and memory (#2662)
* Add profile_image_90 to serialized data on article

* Remove includes user from stories query
2019-05-02 15:58:58 -04:00
Kobe Raypole
116ddc7089 Add hover to article save button (#2597) 2019-05-01 10:29:09 -04:00
Ben Halpern
158f56bc9d
Add page for users to "manage" their posts after publication (distribution, etc.) (#2627)
* Set up basic /manage route

* Add basic article manage page

* Add tips and finalize permissions for /manage

* Add final test and add manage button to article show

* Update failing specs
2019-05-01 09:00:09 -04:00
rhymes
158c398df4 Remove unused timeString statements (#2568) [ci skip] 2019-04-26 12:42:49 -04:00
Mario See
c1456ee9d6 Fix reading list comments reaction (#2493)
* just opening PR

* add comments-container id to comment-trees

- allows initializeCommentsPage() to attach event listeners to heart reaction buttons
- reactions are created now when clicked
- page still needs to properly render reactions in its "reacted" state and proper reaction count/tally

* reactions, counts, and reacted state are accurate

adds readinglist ids to comment container parent, initializeCommentsPage handles lists of ids now instead of just one id, /reactions?... get request is now synchronous to handle multiple ids

* catch styling for reading list comments

* make xmlhttprequest async
2019-04-25 14:33:19 -04:00
Ben Halpern
012b2a482c
Fix video image on scroll (#2551) 2019-04-25 10:17:44 -04:00
Ben Halpern
78138532c8
Classified Listings (#2545)
* Initial classified listings work

* More work on tags

* Additional work finalizing stripe and getting the listings page along

* Finalize-ish listings 🤞
2019-04-24 16:17:01 -04:00
Ben Halpern
4319d86c06
Remove extra param and add message for prefill (#2487)
* Remove extra param and add message for prefill

* Fix test for /new non-logged-in

* Fix /new test
2019-04-18 15:34:50 -04:00
Ben Halpern
308f7a74e7
Add nav buttons to pwa desktop (#2484) 2019-04-18 11:35:00 -04:00
Ben Halpern
583a772d52
Add inbox guidelines to users (#2473) 2019-04-17 15:49:48 -04:00
Mario See
c6ee9fe3b4 Add Console message ascii art (#2392) [ci skip] 2019-04-16 16:47:27 -04:00
rhymes
53381b9c0d Delete jquery.highlighttextarea (#2462) 2019-04-15 16:22:59 -04:00
Andrew Brown
1168b926c7 be able to sort dashboard articles (#1837) (#2337)
* be able to sort dashboard articles (#1837)

* remember to escape order clause is arel (#1837)

* add back in missing character for created_at (#1837)

* use case statement to avoid threat of injection (#1837)

* write specs to ensure sorting works for dashboard articles (#1837)

* add publish sort options, refactor sort options into articles helper (#1837)

* refactor to use model scope (#1837)
2019-04-15 08:30:09 -04:00
Ben Halpern
bd95c6a8bf
Fix human language detection (#2338)
* Update language detection

* Modify feed to account for languages
2019-04-08 15:47:29 -04:00
Jess Lee
175569fb97 "/videos" (#2291)
* set up video route

* add video index

* update styling

* fix mobile full width styling

* bust cache when new video is created

* add unlimited scrolling
2019-04-05 14:02:03 -04:00
Ben Halpern
b0ad7f8c74
Some night theme code, other style adjustments, and extracted app name into ENV var (#2289)
* Style, theme adjustments, plus generalization work

* Modify login cta style on home page

* Modify text
2019-04-02 13:10:28 -04:00
Ben Halpern
c90be27677
Ignore unnecessary airbrake notices (#2283) 2019-04-01 17:40:50 -04:00
Ben Halpern
d1e73dceba
Clean up new chat channel functionality and add tests (#2220) 2019-03-26 13:35:32 -04:00
Mario See
91968e3860 block/report abuse in dev-connect (#2074)
* block chat method

* block and report buttons

* styling

* more styling

* add id redirect

* remove whitespace

* authorize channel in block_chat method

* remove trailing whitespace

* make variable local

* validate using policy

* check channel direct

* fix comparison in chat_channel model

* fix channel variable
2019-03-26 11:53:30 -04:00
Andrew Bone
e96bf2e329 Add discernible text for organization link (#2168) 2019-03-22 13:54:46 -04:00
rhymes
6435785017 Add alternative text for organization logo (#2148) [ci skip] 2019-03-21 12:52:22 -04:00
rhymes
df2621a8c0 Implement image upload's error handling (#2018) 2019-03-21 12:31:51 -04:00
Ben Halpern
f70852d547
Make pull to refresh night theme, plus invert icons in night theme (#2135)
* Add night theme to pulltorefresh

* Adjust opacity of pulltorefresh for style

* Invert certain images
2019-03-20 18:42:52 -04:00
Mario See
d8709c0334 Implement open inbox for dev-connect (#1563) 2019-03-15 14:39:57 -04:00
Ben Halpern
d6ab255a45
Allow users to configure to use night mode (beta) and sans-serif article body (#2072)
* Initial work for config

* Add config for users

* Fix schema
2019-03-15 13:11:53 -04:00
Keshav Biswa
bc5fa55d90 Fixed time ago bug. (#2015)
* changed the element[i] to element[0]

* Added comments

* repositioned comments
2019-03-13 08:15:01 -07:00
rhymes
3c6a7d4574 Display comment published timestamp according to user's locale (#1970) 2019-03-08 15:19:37 -05:00
HKrogstie
060c82aa32 Fix timeAgo's edge-case (#2002) 2019-03-08 13:07:23 -05:00
Ben Halpern
825aa9be91
Add page_view model (#1985)
* Add page_view model

* Uncomment DJ routes

* Add time on site max and don't update article page views every time
2019-03-07 11:53:33 -08:00
Ben Halpern
a17cfe7d33
Add time ago to recent posts in feed (#1981)
* Add time ago to recent posts in feed

* Modify time details
2019-03-05 13:40:27 -08:00
Ben Halpern
f280d9e266
Fix a couple things and modify dev digest logic (#1954) 2019-03-03 18:25:39 -08:00
Anna Buianova
b1995fd980 Update reading button states after articles loaded (#1927) 2019-03-01 06:11:13 -08:00
Glenn Carremans
281330fe16 Fix linting issues in app/views/articles (#1848) 2019-02-28 17:23:06 -05:00
Ben Halpern
b2e3320ea4
Slight modification in /mod for exp level stuff (#1929) 2019-02-28 10:22:30 -08:00
Ben Halpern
532903c688
Add experience level averaging to articles (#1922)
* Add experience level averaging to articles

* Adjust copy on /mod ratings page
2019-02-28 08:17:29 -08:00
Andy Zhao
5ace9a5fc9 Organization Notifications (#1762)
* Add spec for org reaction notification

* Add organization_id to notifications

* Add validations for user and org IDs

* Move comment json_data out of loop

* Use actual column names instead

* Add organization filters

* Remove extra text-align

* Add organization filtering

* Refactor to reduce complexity

* Add receiver argument to handle orgs

* Add has_many notifications for orgs

* Add follow notifications for orgs

* Add comment notifications for orgs

* Rename some tests for specificity

* Add mark org notifications as read functionality

* Add radix to parseInt

* Define json_data outside of loop

* Notify org followers of a new post as well

* Move test to proper location

* Add test for aggregated method

* Make send org reaction notification more readable

* Test the rest of the notification model

* Refactor tag adjustment spec

* Fix extra html
2019-02-25 14:25:37 -08:00
Arnelle Balane
e6420800ce Fix mobile sidebar scrolling issue (#1787) 2019-02-21 15:52:21 -05:00
Ben Halpern
bce0b4fff6
Remove harsh video restriction and add video duration (#1811)
* Remove harsh video restriction and add video duration

* Fix video meta data and tests

* Modify video tests

* Rescue video duration fetch error

* Change log to puts in test
2019-02-16 17:42:44 -04:00
Ben Halpern
4bff494adc
Ping comments to pre-warm new comment trees (#1755) 2019-02-06 21:45:24 -04:00