Commit graph

156 commits

Author SHA1 Message Date
Ben Halpern
0b64407b81
Ensure anonymization of IP in GA (#3734) 2019-08-16 14:06:02 -04:00
Ben Halpern
5d380f93cb
Track success of DEV Shop ads (#3589)
* Add basic display ad event tracking

* Finalize client-side eventlistening functionality
2019-07-31 13:44:47 -04:00
Ali Spittel
52c60ce37e Feature/refactored onboarding (#3333)
* set up refactored onboarding

* create onboarding page

* add in first slide and change slide functionality

* fix test suite

* profile refactor

* profile refactor

* refactor to api

* add checkbox fields

* add checkbox fields

* remove puts

* add basic css

* add styling

* add redirect

* hide back and next at first and last slides

* test refactored onboarding

* test refactored onboarding

* remove article edits

* Fix schema

* Add deleted file back in

* Add default value for checked_t&c column

* Adjust HTML structure to keep nav buttons in place

* Fix ESLint issues on Onboarding.jsx file

* Handling for undefined or empty followedTags on getUserTags

* Fix codeclimate issues

* Fix codeclimate issues

* Fix more codeclimate issues

* Fix more codeclimate issues

* Update Onboarding snapshots

* Uncheck the CoC and T&C checkboxes on render

* Update snapshots

* Return false instead of raising error

* Update spec to use new onboarding

* Redirect to onboarding if haven't seen it yet

* Prevent redirect to onboarding from /signout_confirm

* Use assign_attributes instead of saving twice

* Move COC and T&C checkbox page to second slide

* Add 'go back to original page' functionality

* Reuse ready prototype logic

* Keep track of the last visited onboarding page

* Fix email subscription bug

* Fix overflow issue for tags page

* Remove height to prevent page container scrolling

* Check for CoC and T&C for displaying onboarding

* Add InstantClick redirect and preserve referrer in client

* Fix async update + check by using localStorage

* Turn off onboarding for tests

* Finalize design for onboarding

* Finalize design for onboarding

* Make bulk follows during onboarding

* Fix bulk follow test
2019-07-26 15:53:32 -04:00
Anna Buianova
445bb0952c Open a page in a new tab w/o warning when playing a podcast #2958 (#3499) 2019-07-18 09:51:08 -04:00
Mac Siri
e28aaecca4
Make xhr request's method dynamic for archiving. (#3335) 2019-07-15 14:40:01 -04:00
rhymes
1f97669e66 Credits ledger (#3395)
* Add #purchase to Credit

* Assigns spent credits to the listing

* Add Credits::Ledger and use it

* Localize ledger datetimes

* Add organization to the ledger

* Add tests for ledger

* Remove unused class

* Fix scope error

* Compare UTC times

* Fix broken specs

* Wrap listing create in a transaction

* Wrap listings bump into a transaction

* Avoid microseconds issue with datetimes in tests

* Use .detect instead of .select.first

* Fix spec description
2019-07-09 10:11:18 -04:00
Nick Taylor
4edf4a646f JS: Refactor & Fix Lint (#3082) 2019-07-01 14:04:25 -04:00
rhymes
2bf54edb9c Pro: History (#3220)
* 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
2019-06-18 14:58:24 -04:00
Ben Halpern
456931f208
Further generalize pages and site Twitter handle (#3177)
* Further generalize pages and site Twitter handle

* Add footer mod change

* Remove giveaways dead code
2019-06-16 00:59:11 -04:00
Andy Zhao
b953f17d0c New Feature: Subscribe to posts! (#3149)
* 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
2019-06-14 12:03:43 -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
Mac Siri
f62bc7faa8 Fix js-breaking webcomponent (#3087)
* Remove webcomponents-loader

* Add unpkg webcomponent-loader

* Update clipboard-copy-element to include @githubscope

* Make WebComponent loading async

* Simplify clipboardCopy
2019-06-10 11:23:42 -04:00
Ben Halpern
a3a9f51103
Fix improper archive redirect (#3064) 2019-06-06 17:03:59 -04:00
Ben Halpern
80f42a544a
Add noopener to external target blank links (#2923)
* Add noopener to external target blank links

* Add noopener to external target blank links properly

* Fix schema mistake
2019-05-21 13:56:25 -04:00
Ben Halpern
97125dfd6a
Add PWA target blank functionality (#2921) 2019-05-21 13:15:36 -04:00
Ben Halpern
c08d140b36
Remove some dead code for very minor perf improvements and code quality (#2905) 2019-05-20 13:40:02 -04:00
Ben Halpern
70580d0265
[WIP] Connect misc improvements/debugs (#2880)
* WIP Connect misc improvements/debugs

* Modify tests and update snapshots

* Change GitHub sidecar copy
2019-05-20 10:08:51 -04:00
Ben Halpern
1ddbea31f5
Fiddle with padding and adjust colors on show page (#2845) 2019-05-15 12:44:19 -04:00
Ben Halpern
2f69ca91ed
Folllow on for show page adjustments and fix uglifier issue (#2841)
* 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

* Remove uncompileable JS and small css changes
2019-05-15 11:29:46 -04:00
Ben Halpern
dd20e70f12
Simplify article show page reactions (#2827)
* 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
2019-05-15 10:32:36 -04:00
Ben Halpern
166e26bdf9
Move webcomponents-loader to lib and clean out some dead code (unrelated) (#2838) 2019-05-14 22:00:46 -04:00
Benny Powers
5f9a8a7501 Add click-to-copy to article share dropdown (#1579) 2019-05-14 17:45:40 -04:00
rhymes
571c907ee4 Fix save article button action (#2823) 2019-05-13 20:31:22 -04:00
Ben Halpern
b2110d2d85
Add JS guard (#2819) 2019-05-13 16:33:58 -04:00
Dana Scheider
b2a8f69f83 Allow archiving of posts (#2798)
* This commit adds the "archived" attribute to the Article model, which will
enable users to automatically filter archived articles/drafts from appearing
on their dashboard. It also adds an ellipsis menu with a link to archive the
article. I've also moved the Mute Notifications button into the ellipsis menu
as well.

* Add ellipsis menu and make it work

* Fix logic error

* Hide ellipsis menus when you click elsewhere on the body

* Extract function to remove duplication

* Ensure that menu is hidden when the ellipsis button is clicked on an open menu

* Ensure that archiving post button works and that 'archived' param is accepted by the controller

* Enable link to toggle showing/hiding archived articles

* Make 'mute' and 'archive' buttons in ellipsis dropdown list work

* Refactor to make Code Climate happy

* Minor JS refactors
2019-05-13 15:40:52 -04:00
Ben Halpern
e4f6e00e29
Fix issue where user was not present on home page sometimes (#2793) 2019-05-10 19:42:18 -04:00
Bolarinwa Balogun
d4b882753c Add Fetch Now to RSS Settings (#2770)
* Add Fetch Now to RSS Settings

* Resolve issues raised
2019-05-10 15:47:32 -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
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
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
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
rhymes
df2621a8c0 Implement image upload's error handling (#2018) 2019-03-21 12:31:51 -04:00
Mario See
d8709c0334 Implement open inbox for dev-connect (#1563) 2019-03-15 14:39:57 -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