* 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
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
* 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
* 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
* 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
* 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.
* 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.
* 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
* 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