Commit graph

55 commits

Author SHA1 Message Date
rhymes
209b0ba607 History and reading list refactoring (#3338)
* Make readingList testable

* Make history and readingList more similar

* Extract ItemListTags component

* Simplify load next page logic

* History and reading list load more should be the same

* Extract ItemListLoadMoreButton component

* Use the same exact CSS for both

* Use empty instead of 0

* Extract ItemListItem component

* Remove unnecessary else

* Same search function

* Use a common module to group related functionality

* Extract loadNextPage and fix load more button presence logic

* Extract toggleTag

* Refactor toggleStatusView and pass page

* Added additional tests
2019-07-02 09:22:21 -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
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
rhymes
36ad407c1d Fix zen mode's global key bug (#2969) 2019-05-31 13:33:29 -04:00
Ben Halpern
37fabd08b1
Fix some connect bugs with wrong url and remove some dead code (#2953) 2019-05-24 12:19:59 -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
Tim Lange
2837e5430a Refactor Onboardings (#2475) 2019-05-15 17:51:19 -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
c7d7d55460
[WIP] Move both v1 and v2 editor to v2 preact-driven editor (#2797)
* 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
2019-05-13 12:27:36 -04:00
rhymes
e626002260 Add alternative texts to images (#2771) [ci skip] 2019-05-09 11:16:03 -04:00
Nick Taylor
1ca5177044 Disabled no-console for where we currently log an error. (#2502) 2019-04-20 09:20:08 -04:00
Nick Taylor
27ea00e152 Fix some frontend linting issues (#2495) [ci skip] 2019-04-19 10:58:21 -04:00
Tim Lange
bf68782374 REF: React eslint (#2432) 2019-04-16 17:28:19 -04:00
Ben Halpern
0c910baae1
Move file-level imports to dynamic imports to reduce initial bundle size (#1379) 2018-12-20 12:58:20 -05:00
Francisco Delgado
2d4d469e86 Refactor/onboarding (#1083)
* Refactor Onboarding

- use ternary for simple if-else cases (to reduce lines of code)
- remove unecessary trailing else clause
- destructure state variables
- add a consistent return eg null when nothing is rendered
- use prevState callback when new state depends on previous state
- use switch case when toggling onboarding screens, constants easier to read imo.

* Add rest of refactor

* Remove destructure to meet 25 line minumum from codeclimate.

* Remove duplicate calls to indexOf.

* Remove duplicate calls to indexOf in handleSaveArticle.

* Refactor handleCheckUser

* Update snapshot

* Address PR review comments.

* Revert "Update snapshot"

This reverts commit e17e915286fb621ffca745b28193b7ba63dbc498.

* Update snapshot

* Add back if clause

* Update refactor
2018-11-28 10:21:26 -05:00
Ben Halpern
b34ee48c1f
Fix hanging /connect notification issue (#1174)
* Adjust channel opened check to mitigate race conditions maybe

* Add fix to jump user straight to apporpriate unopened channel
2018-11-21 12:08:09 -05:00
Mac Siri
4ab0a070ea
Improve Onboarding's spec & Update snapshots (#1111) [ci skip] 2018-11-14 16:18:02 -05:00
Mac Siri
fb231339e5
Addresses similar blocks of lint (#1054) 2018-11-02 14:14:10 -04:00
Sheldon Nunes
8c70c95cea Fix on-boarding typo (#892) 2018-10-12 09:06:44 -04:00
Ben Halpern
b13c09583f
Adjust modal to not interfere with pull-to-refresh (#888)
* Remove unnecessary code from onboarding

* Adjust pull-to-refresh button to account for open modal scenario
2018-10-11 16:45:43 -04:00
Ben Halpern
991458d1c3
Adjust onboarding slides (#882)
* Modify onboarding slides

* Remove user controller changes

* Modify onboarding slide font size

* Adjust small onboarding issues

* Modify onboarding styling

* Remove flash unstyles content
2018-10-10 16:00:20 -04:00
Ali Spittel
6ae540cafd add alt text to sidebar images (#842)
* add alt text to sidebar images

* add alt text to emoji heart

* add alt text to sponsor logos

* add aria-label to search bar

* update snapshot for Search
2018-10-07 10:39:57 -04:00
Jess Lee
fa3e582973 add ga tracking to onboarding (#653)
* add ga tracking

* Add ga availability check
2018-09-17 12:09:03 -04:00
Nick Taylor
9a387660a9 Fixed bug where + in querystring didn't decode to a space. (#623) 2018-07-25 11:06:00 -07:00
Nick Taylor
18980034d3 Nick/feature/search to preact (#532)
* Works, but lots of cleanup/questions.

* Fixed comment.

* Only want the search script to load once with InstantClick active.

* Removed unnecessary DOMContentLoaded from copy paste.

* 🔧 Enabled (P)React Devtools.

* Updated comment about reactToEvent.

* Removed unnecessary server-side generated JS for search.

* <Search /> component now has component state.

* Search functions are in there own module now.

* 👷Refactor

* Render propped it up.

* Fixed issue with encoding of search term.

* Removed data-no-instant attr from script.

* 👷Refactor

* Now flash of search loading is avoided..

* Moved search under components folder.

* Tests

* fixedEncodeURIComponent does not need to be exported.

* Tests

* Folders to ignore from the VS Code Local History extension.

* Tests

* Snapshot test for <Search /> component.

* Tests

* Now the <SearchContainer /> handles the '/' key shortcut.

* Made the search box ID a prop defaulting to 'nav-search'

* Excluded barrel files from code coverage.

* Componentized search CSS.

* Storybook stories for <Search /> component.

* Removed extension folders to ignore.

* Fixed logic for "/" key triggering search.

* updated jest snapshot for <Search /> component.

* updated package.json lock file.

* Disabled the import/prefer-default-export rule.

* Now search term clears if not on a non-search results page.

* removed comment that is no longer valid.

* No longer using render prop for Search. Doesn't make sense as it's not stuff that is reused.

* Added preact-render-spy do dev deps.
2018-07-19 17:02:48 -04:00
Ben Halpern
5194c9828c
Add proper pagination and fix small issues with /connect (#503)
* Add proper pagination and fix small issues with /connect
2018-06-27 16:06:15 -04:00
Ben Halpern
74d098f580 Fix bugs and add video 2018-06-18 12:53:43 -04:00
Ben Halpern
ad733aa9fe
Add top bar Connect icon 😱 (#443) 2018-06-14 13:50:55 -04:00
Ben Halpern
115ed2e7f7
Make code work more properly and bind pusher states (#440) 2018-06-14 12:50:50 -04:00
Ben Halpern
87c6a758bb
Add top bar indicator and other Connect features (#424)
* Add algolia public search key

* Add status to chat_channels
2018-06-12 18:24:57 -04:00
Ben Halpern
75c912c593
Auto create channels for mutual follows (#419) 2018-06-11 17:54:30 -04:00
Ben Halpern
cfb0bff881
Fix /live and codemirror stuff (#417) 2018-06-11 14:56:52 -04:00
Ben Halpern
fb20b8adf7
Add content sidecar for chat (#413)
* Rearchitect chat channel subscriptions

* Add browser push notifications (attempt)

* Add content sidecar for chat

* Add live code basics

* Add content features to chat

* Fix chat_channels test
2018-06-11 11:00:51 -04:00
Ben Halpern
7bc3e60283
Add browser push notifications (attempt) (#412) 2018-06-09 17:33:58 -04:00
Ben Halpern
1a85bddd2c
Make pusher channels private (#410) 2018-06-08 18:49:59 -04:00
Ben Halpern
645de032df
Rearchitect chat channel subscriptions (#409)
* Update chat and add precompilation paths

* Update chat and add precompilation paths

* Adjust assets.rb

* Remove inconsistent test

* Fix check for pathname in chat

* Rearchitect chat channel subscriptions
2018-06-08 18:38:53 -04:00
Ben Halpern
6e6a1f9f28
Remove inconsistent test (#407)
* Remove inconsistent test

* Fix check for pathname in chat
2018-06-08 16:09:42 -04:00
Ben Halpern
98d84d2456
Update chat and add precompilation paths (#406)
* Update chat and add precompilation paths

* Update chat and add precompilation paths

* Adjust assets.rb
2018-06-08 15:31:48 -04:00
Ben Halpern
ab85216621
Update chat and modify article score calc indexing (#395) 2018-06-06 16:08:12 -04:00
Nick Taylor
851bb4e336 Nick/task/onboarding article stories (#392)
* Updated lock file.

* Added an assets folder for Storybook.

* 👷Refactor

* Added some standard prop types for dev.to.

* Extracted onboarding article as it's own component.

* 👷Refactor

* Added Storybook stories for onboarding articles.
2018-06-06 10:29:46 -04:00
Nick Taylor
261b6683b3 Onboarding welcome Storybook stories (#385) 2018-06-05 14:50:30 -04:00
Zhao-Andy
8aef7a4cc5 Add optimistic rendering for follow buttons 2018-04-25 21:14:59 -04:00
Zhao-Andy
d7d76a2506 More prettier lint 2018-04-25 13:56:05 -04:00
Zhao-Andy
2f0edd1149 Prettier linted stuff 2018-04-25 13:56:05 -04:00
Zhao-Andy
be14ed029d MVP of follow sidebar 2018-04-25 13:56:04 -04:00
Andy Zhao
deb63ab643 Add Save Articles Page to Onboarding (#182)
* Add MVP of onboarding articles

* Lint and fix unfollow all button bug

* Update onboarding tests

* Fix typo and adjust when saveAll request gets sent

* Set default to always save all articles

* Fix when request is sent for follows/saves

* Check for article length when for initial request

* Add a loading indicator for follows page

* Prevent multiple follow/save requests

* Update tests

* Add some hover and click effects

* Adjust onboarding test and suggested articles
2018-04-05 11:41:28 -07:00
Andy Zhao
7c843ba354 Prevent Less than 1 day old accounts from Following Other Users (#159)
* Show empty array of users for potential spammers

* Use user columns for better accuracy and perf

* Use user instead of identity for flagging

* Fix boolean

* Add page skipping logic for young accounts

* Fix test and show team to follow for spammers

* Fix broken link

* Remove page skip logic for back button
2018-03-29 17:12:30 -04:00
Ben Halpern
297e031fe7
Adjust minor onboarding detail (#138) 2018-03-23 16:48:15 -04:00
Ben Halpern
cc0ffe1c5d
Add thread indicator for flat comments (#134) 2018-03-23 14:38:06 -04:00
Ben Halpern
833b9f25d6
Adjust what shows up in onboarding (#127) 2018-03-22 20:02:07 -04:00