Commit graph

49 commits

Author SHA1 Message Date
Rafi
eab507604d
Removing data-testid from Article component (#10249) 2020-11-16 10:23:44 -05:00
Robin Gagnon
27a3df7d73
A11y: Add keyboard navigation to article feed (#10468)
Co-authored-by: Andrew Bone <AndrewB05@gmail.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2020-11-10 22:38:15 -05:00
Robin Gagnon
10d7da2878
feat: Add shortcut to bookmark an article (#11116) 2020-10-27 12:44:03 -04:00
Akshay Mahajan
ff918daa20
Remove flare tag from title and hightlight it within the tags row (#10528)
* Remove flare tag from title and hightlight it within the tags row

* wrap flare tag # in a span with class crayons-tag__prefix

* updated buildArticleHTML.js to show flare tag in the tags row

* updated _single_story.html.erb to show flare tag in the tags row

* fixed missing opening tag

* removed crayons-story__flare-tag class and containers

* added .crayons-story__flare-tag back to stories.scss for search results

* added check for undefined tagList in buildArticleHTML.js
2020-10-15 16:09:14 +02:00
Rafi
327fe14ccb
Fixing id and class of non featured article (#10247)
* Fixing id and class of non featured article

* Adding id

* Removing extra space

* Fixing broken rspec test
2020-09-08 18:38:49 -04:00
Nick Taylor
08269fb704
Fixed accessibilty issue with empty link on featured post. (#10005) 2020-08-26 09:17:32 -04:00
ludwiczakpawel
503b1e3be6
Remove dimmed buttons on feed (#9894)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* fix
2020-08-26 08:08:31 +02:00
Molly Struve
b23374e737
[deploy] Revert "Refactor:Move RssReader Fetch Article task to Sidekiq (#9976)" (#9998) 2020-08-25 14:57:33 -05:00
Molly Struve
ff06454151
[deploy] Refactor:Move RssReader Fetch Article task to Sidekiq (#9976) 2020-08-25 13:47:13 -05:00
Michael Odusanya
5f45f5ed0e
Fixed save button behavior (#9238)
* Fixed save button, but it's slow to update when clicking unsave

* Update app/javascript/articles/components/SaveButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/articles/components/SaveButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/articles/components/SaveButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* I added the suggested changes but the issue still persists

* Added tests.

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Nick Taylor <nick@dev.to>
2020-08-25 11:23:30 -04:00
ludwiczakpawel
46acac17dc
Updating design of Feed Card (#9918)
* .

* resposniveness

* tags
2020-08-22 09:59:28 +02:00
Emma Goto
977e8aec45
Bump storybook to version 6 (#9766)
* Bump storybook to version 6

* Remove storybook addon-docs and revert back to storybook/addon-notes

Co-authored-by: Nick Taylor <nick@dev.to>
2020-08-17 10:34:43 +02:00
ludwiczakpawel
dbbe158d21
Buttons: Ghost Dimmed (#9626)
* flare tag line height

* .

* dropdown fix + actions bar fix

* actions bar on mob

* ghost dimmed

* add to page/crayons
2020-08-06 11:03:06 +02:00
Ben Halpern
01827a7653
[deploy] Fix double render of home feed (#9438) 2020-07-22 10:49:32 -04:00
A.D. Faris
ab1afd94b0
Fix listing card view reactions formatting (#8988)
* Fix the listing card view reactions format

* Update test to reflect change made in the code base
2020-06-30 16:39:10 -04:00
Nick Taylor
30bfe1adfd
More frontend lint fixes (#8931) 2020-06-29 08:19:13 -04:00
Nick Taylor
a7938ed287
Fixed a bunch of linting issues in components (#8921) 2020-06-26 10:26:02 -04:00
Nick Taylor
63b4d9fdc0
More frontend test cleanup (#8919) 2020-06-25 18:04:01 -04:00
Nick Taylor
5bdbc0480d
Some frontend testing cleanup. (#8902) 2020-06-25 09:07:34 -04:00
Nick Taylor
09bb730f9d
Added a11y tests to frontend tests that were missing them (#8873) 2020-06-24 14:38:39 -04:00
Ben Halpern
cfa5e882ce
[deploy] Add SiteConfig for feed style (#8721)
* Add SiteConfig for feed style

* Merge master

* Merge master

* Fix typo
2020-06-24 12:14:33 -04:00
Ben Halpern
4aa3240fde
[deploy] Fix comment/reaction count hiding issue on small screens (#8786) 2020-06-18 21:37:27 -04:00
Nick Taylor
653ec12300
Upgrade to Preact 10.4.4 (#8739)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-06-18 10:07:17 -04:00
Rafi
6f3e89f4ed
Rendering html entity in home feed (#8472) 2020-06-16 13:39:07 -04:00
Ben Halpern
3c840610a1
[deploy] Remove unnecessary bulk from image assets (#8306)
* Remove unnecessary bulk from image assets

* Swap background-image

* Fix test

* Fix test
2020-06-05 17:51:06 -04:00
Nick Taylor
c83cad6fb6
Sorting Storybook stories (#8058)
* Added story sorting to Storybook.

* Added design system guidelines.

* Made Base in Storybook tree 2nd in the tree view.

* Now Components are 3rd in the treeview of Storybook.

* Now App Components are 4th in the treeview of Storybook.

* Froze node version to 12.16.0

* Revert "Froze node version to 12.16.0"

This reverts commit 093b119c7d7ca05ecb4e1c0234b24bcf8e7b10a4.
2020-05-27 13:10:16 -04:00
Andy Zhao
c42fd3461e
[deploy] Rename positive_reactions_count to public_reactions_count in logic (#7926)
* Rename positive_reactions_count to public_reactions_count

* Add positive reactions count back in so we can remove it

* Use public_category method for reactions

* Add positive_reactions_count in case any old caches rely on it

* Add positive_rxn_count to account for API endpoints

* Remove unused method

* One more spot...

* Add method back in because of caches

* Update specs to match new functionality

* Fix typo

* Remove unused methods
2020-05-26 12:36:28 -04:00
Nick Taylor
8f81d8ce52
Fixed article stories in Storybook (#7884) 2020-05-15 13:08:02 -04:00
Ben Halpern
0ae835c73f
Open in new window properly on ctrl+click etc (#7814)
* Open in new window properly on ctrl+click etc

* Trigger meta click for comment area too
2020-05-15 14:02:11 +02:00
Nick Taylor
be5f80a04b
Moved common-prop-types out of src/ folder (#7871) 2020-05-14 16:58:29 -04:00
Nick Taylor
f21f4958bd
Added tests. (#7823) 2020-05-13 11:02:56 -04:00
ludwiczakpawel
3110743e36
Video cover (#7821)
* flare tag line height

* .

* .
2020-05-13 16:17:59 +02:00
Mac Siri
19056dc9ed
Remove hard-coded published_at_int (#7809) 2020-05-12 17:31:28 -04:00
Vaidehi Joshi
4133efbd20
Update Article snapshots (#7807) [deploy] 2020-05-12 14:01:07 -07:00
Ben Halpern
49a438f4ec
[deploy] Adjust overflow in comments and revert inline css (#7799)
* Adjust overflow in comments and revert inline css

* Fix color
2020-05-12 12:42:49 -04:00
Josh Puetz
2abe830377
[deploy] Home Page Feed redesign + top comments (#7579)
* feed cards

* frontend

* preactify

* preactify

* .

* fix

* fixing things and adding dropdown

* whoops.

* whoops 2.

* revert body bg color change

* search snippet

* search snippet

* get rid of featured article

* get rid of featured article...

* cover to its own component

* videos

* videos

* reading time

* small-save-filled asset

* author adjustments

* adjustments

* Author --> Meta

* whoops.

* loader

* logged out state

* .

* dropping what's not needed for now

* better name for cover

* get rid of nav overflow

* bringin comments placeholder back

* bringing comments placeholder back

* publish date

* fix

* date

* .

* save button icon

* ghost button

* lets skip the icon for saving for now

* more buttons

* counting logic

* Display top comments on homepage feed

* Comment list and item components

* Remove 'Top Comments' title

* Remove subscribe button, add reading time

* Update snapshots and tests

* Fix article and follower scrolling

* Added reading time

* (Try) to do flare tags

* Button component from Pawel

* More button styles from Pawel

* Comment count style from Pawel

* Handle empty parens for age on older articles

* Dont show 'more comment' button for more than 2 comments

* cover ratio

* flare tag

* cover fix

* fix buttons

* more button fixes

* tags fix

* responsiveness fix

* reading time  + a bit of responsiveness

* Reading time in more places

* snapshots

* default color for flare tag

* Update CommentsList test snapshot with new styles

* fixing search results

* fixing buttons

* Fix podcast card tests by updating snapshots

* Line clamping for top comments

* Reflect save button state after click before mouseout

* Now the entire feed card is clickable. (#7638)

* Now pointer cursor is only on feed posts. (#7727)

* Revert podcast card styling

* Update test snapshot

* merge

* Fix rspec on feed page

* Reduce complexity of class check for feed card clicking

* PR feedback/fixes

* Fix featured article test and snapshot

* Last minute test tweaks

* clean up crayons

* padding issue + empty div

* Correct merge error

* Fix search results tests

* Test fixes and snapshot updates

* themes

* podcasts colors

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-12 07:57:57 -05:00
Molly Struve
2c99424205
[deploy] Execute Feed Searches through Elasticsearch (Round 2) (#7231) 2020-04-17 08:38:07 -05:00
Molly Struve
d1fc988ed0
[deploy] Revert "Serve Feed Content From Elasticsearch (#6847)" (#6983)
This reverts commit d7cc1da280.
2020-03-31 16:25:48 -05:00
Molly Struve
d7cc1da280
[deploy] Serve Feed Content From Elasticsearch (#6847)
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-03-31 13:30:36 -05:00
Nick Taylor
52c2f40256
Upgrade Storybook to 5.3.17 (#6754)
* Renabled building Storybook.

* Explicitly added webpack style loaders for Storybook custom webpack config.

* Upgraded Storybook configuration.

* Added mixin/function to handle SASS compilation for Sprockets and Storybook's webpack.

* Readded stylesheets/js required for crayons to run.

* Added a custom title to Storybook.

* Fixed custom Storybook CSS.

* Migrated Search storybook stories.

* Migrated crayons' box stories.

* Migrated crayons' modal stories.

* Migrated crayons' button stories.

* Changed title a bit until we get a logo.

* Migrated crayons' notice stories.

* Migrated crayons' dropdown stories.

* Migrated crayons' indicator stories.

* Migrated crayons' typography stories.

* Migrated crayons' form element stories.

* Migrated crayons' navigation stories.

* Migrated crayons' avatar & logo stories.

* Migrated fatured article stories.

* Migrated article loading stories.

* Migrated today's podcast episodes stories.

* Migrated podcast episode stories.

* Migrated rest of article stories.

* Update app/javascript/.storybook/manager.js

Co-Authored-By: rhymes <rhymesete@gmail.com>

* Commented new SASS function and mixin.

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-23 09:46:50 -04:00
Nick Taylor
ccf7e6e5bf
Upgrade to webpacker/webpack 4 and Babel 7 (#6664)
Upgraded to webpacker 4/webpack 4 and Babel 7
2020-03-17 08:20:36 -04:00
Nick Taylor
da89b9854e
Nickytonline/changed grouping of components in storybook (#6613) [deploy]
* Renamed Components Storybook grouping to App Components.

* Design system components are now grouped under Components in Storybook.

* Split up Typography stories.
2020-03-12 17:42:24 -04:00
Faruk Talha Özbek
063efff5f6
fixed some eslint errors (#6476) 2020-03-06 20:03:49 +01:00
Alex
c3cc395809
Now reactions count are always shown. (#6456) [deploy] 2020-03-04 10:43:57 -08:00
Michel
f875f9b4b2
Fix invalid ERB in featured author link. (#6428) [deploy] 2020-03-03 14:43:19 -05:00
Ben Halpern
3875f38b26
Remove console log (#6424) 2020-03-03 19:39:51 +01:00
Ben Halpern
ec50515810
Remove parentheses when time ago not present (#6379) [deploy] 2020-02-29 14:05:45 -05:00
Nick Taylor
f6e99dec8b
Nickytonline/homepage main feed component (#6164) [deploy]
* wip

* Removed reference to cached_tag_list as the feed enpoint only returns tag_list now.

* Removed reference to cached_properties.

* Updated <CommentsCount /> and <TagList /> to support additinal className

* wip

* wip

* Undid init scrolling for Algolia articles

* Converted homePageFeed.jsx to an ERB template to access Sprockets.

* Now the homePageFeed.jsx files is an ERB so it can load Sprockets assets.

* wip

* Removed accidental commit of debugger statement in ERB.

* Now different feed time frames are loaded based on the homepage feed tab clicked.

* Prevent default Algolia paging when on the homepage.

* Added a tiny comment about feed time frame.

* Now feed loads properly for each time frame on home page.

* prop name refactor.

* Reneabled default Algolia scrolling.

* On the homepage, we no longer overwrite article HTML with Algolia data for initial articles.

* Assumption is the proper URL for main_image of featured article will be sent in the feed.

* Fixed Google Analytics for featured article.

* No longer need the new-feed ID for checking if we're on the homepage.

* Trying to make codeclimate happy.

* wip

* Removed reference to cached_tag_list as the feed enpoint only returns tag_list now.

* Removed reference to cached_properties.

* Updated <CommentsCount /> and <TagList /> to support additinal className

* wip

* wip

* Undid init scrolling for Algolia articles

* Converted homePageFeed.jsx to an ERB template to access Sprockets.

* Now the homePageFeed.jsx files is an ERB so it can load Sprockets assets.

* wip

* Removed accidental commit of debugger statement in ERB.

* Now different feed time frames are loaded based on the homepage feed tab clicked.

* Prevent default Algolia paging when on the homepage.

* Added a tiny comment about feed time frame.

* Now feed loads properly for each time frame on home page.

* prop name refactor.

* Reneabled default Algolia scrolling.

* On the homepage, we no longer overwrite article HTML with Algolia data for initial articles.

* Assumption is the proper URL for main_image of featured article will be sent in the feed.

* Fixed Google Analytics for featured article.

* No longer need the new-feed ID for checking if we're on the homepage.

* Added postcst episodes to <Feed /> state.

* Breaking up Article.jsx to make codeclimate happy.

* wip

* Created the <TodaysPodcastEpisodes /> and <PodcastEpisode /> components.

* Fixed issues with some components that were updated for the <FeaturedArticle />

* Added tests for <FeaturedArticle />

* Barreled up <FeaturedArticle />

* Added Storybook stories for <FeaturedArticle />

* Featured articles don't display org, so removed that test.

* Added proper today's podcasts components to feed.

* Converted some leftover ERB + removed pro checkmark as it doesn't exist yet.

* Now logic is same as master for feed timeframe.

* Updated <FeaturedArticle /> snapshots.

* On frontpage, bookmark button state is managed by Preact components now.

* bookmarkedFeedItems is now a prop on <Feed />.

* Fixed logic check for initializing reading list icons.

* Now <Article /> and <FeaturedArticle /> receive a bookmarkClick prop.

* Removed beginnings of scroll handler in <Feed /> as we're using what's there already for now.

* Removed logic to not show main image on other time frame feeds as it was not correct.

* Fixed issue with 0 rendering when no podcast episodes in feed.

* Converted <SaveButton /> to a stateful component.

* wip - <Feed /> render prop now passes bookmarked feed item ID set and a click event.

* Moved FEED_ICONS to an export so it's easier to use JSX/JS in <Feed />

* Moved <Feed /> into article components.

* Now reading list save buttons work properly in Preact components.

* Fixed issue with Save buttons in Algolia paging/<Feed />

* Updated snapshots.

* Took <Feed /> out of articles barrel file as jest was trying to import FEED_ICONs which is an ERB template.

* Now the Preact feed is dynamically imported.

* Now the Preact <Feed /> only loads for a logged on user.

* Fixed <FeaturedArticle /> so that the save button behaves properly now.

* Updated article stories for Storybook.

* Putting this back to the order it was because I've removed my code changes for this block.

* Fixed when renderFeed is imported for a logged on user.

* Add podcasts to feed and render home from server

* Add padding to feature laoding div

* Update tests

* Add more loading articles

* Fix conflicts

* Add readinglist javascript to initscrolling

* Ensure first article is one with image

* Organize feed items outside of feed instead of in it

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
2020-02-28 14:14:47 -05:00
Nick Taylor
5e677daac1
Homepage feed components (#6052)
* wip - <PodcastArticle /> component.

* Added filler user avatar for other article types.

* Added <LoadingArticle /> component.

* wip

* wip on <Article /> component.

* Added <Article /> component to barrel file.

* Deleted assets from dummy storybook assets folder.

* Updated podcast article story avatar.

* More work on <Article /> component.

* Refactoring Storybook stories.

* Refactored so main component is just the <Article /> component.

* Added a missing video article property.

* Some refactoring of <Article /> component.

* Added Storybook knobs addon.

* Now <Article /> component supports an isBookmarked prop.

* Fixed podcast Storybook story.

* Made the knobs Storybook addon the first tab

* Added more <Article /> Storybook stories.

* More <Article /> component tweaks.

* Added publish time to <Article /> component stories.

* Made the timeAgo function compatible with Preact.

* Added loading="lazy" attribute to <img /> in <Article /> component.

* Added <Article /> Storybook story for past published date.

* Fixed publish date for <Article /> story data.

* Scrapped random avatars.

* Added snapshots for <Article /> component.

* Added snapshots for <LoadingArticle /> component.

* Now test article entities are shared.

* Fixed some wording of Storybook stories.

* Breaking up Article.jsx to make codeclimate happy.

* Now <Article /> component receives icon props.

* Added knobs for <Article /> icon props.

* Added *.stories.jsx to codeclimate exclusion list.

* Added **/*.stories.jsx to codeclimate exclusion list.

* Alright now we have the good glob for excluding Storybook from codeclimate 😆

* Added org headline changes from low hanging fruit PR.

* Updated <Article /> snapshot for org headline.
2020-02-19 11:39:13 -06:00