* Add proper frontend for Algolia search
* Update app/models/concerns/algolia_searchable/searchable_comment.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/models/concerns/algolia_searchable/searchable_article.rb
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix formatting
* Fix: copy to clipboard message (#20898)
* fix: copy to clipboard message
* chore: deletion of unused imports
* Pick winner in header field test (#20911)
* Updated the twitter icon to X icon - solved icon issue #20356 (#20910)
* changed the twitter icon to X icon in assets/images/twitter.svg
* Changed the twitter icon to X in assets/images/twitter.svg
* Add field test for Digest article list design (#20912)
* Add field test for Digest article list design
* Add check for cached user
* Include cached user in select (#20913)
* Include cached user in select
* Add tags
* update style for new follower email (#20908)
* Fix#19037 (#20917)
* Add alternate returns for html
* Remove console log
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Iasmim Pereira <100351576+IasmimCristina@users.noreply.github.com>
Co-authored-by: Darshan Padia <darshanpadia5@gmail.com>
Co-authored-by: Philip How <philip.j.how@gmail.com>
* getting started: model setup
* basic controller action & spec
* somewhat working click events
* pick up on impressions
* there was an attempt at batching without duplicates
* (better) bulk upsert service
* fix specs?
* touch up feed events JS
* end-to-end specs??
* workers wip
* fix failing user delete spec
* Revert "(Temporarily) Remove multiple reactions from #index (#19142)"
This reverts commit a45d300639.
* Clean up reaction category count mechanism for #index
* Remove, unnecessary
* Expose reaction categories in JSON response
* Update test with new categories
* Fix flaky sample / minimum floor
* buildArticle (infinite scroll) with multiple reactions
* If we're doing #index front-end, we aren't feature-flag'd
* nbsp
* react (home feed) has multiple_reactions
* Update app/assets/javascripts/utilities/buildArticleHTML.js
Co-authored-by: Rajat Talesra <rajat@forem.com>
* Clean up Reactable#reaction_categories
* Use 'multiple_reactions_icons_container'
* Try adding a ReactionCount test
* Adapt memory fix from 76dd53d
* Try adding categories to fixture
* Attempt to eager-load distinct public categories
* Setting dependent to the default for rubocop
* Try making image assets more public?
* Revert "Fix flaky sample / minimum floor"
---------
Co-authored-by: Rajat Talesra <rajat@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
* Added tag search to nav menu
* Added tag search
* Improved tags search results view
* Removed commented lines from the controller
* Fix specs for Search::Tag
* Prepare for tags search pagination
* Fixed Search::Tag specs
* styling
Co-authored-by: Paweł Ludwiczak <ludwiczakpawel@gmail.com>
Prior to this commit, we were somewhat naively rendering Hash style data
attributes in our ERB templates. By rendering each hash attribute
separately, we were rendering characters that could break the
javascript (e.g. double hack or backslash `"` or `\`).
By moving to this view_object rendering, we leverage Rails's `to_json`
behavior to ensure properly escaped values. As part of this exercise, I
generalized the method to allow for other places to benefit from this
behavior.
This generalization also helps ensure that we have a more conformant
rendering (e.g. we should always have an :id, :className, and :name
value in our data-info hash).
_Note: I've updated the user's names for Cypress tests as they are more
likely to catch the particular issue than anything else. I assume that
I'm going to break some cypress tests and will need some help fixing
them._
Closes#15916, #14704
Supersedes #15983
How to test locally:
Assuming you have seeded database (e.g. `rails db:seed`), checkout the
"main" branch. Then in `rails console` find a user that's written articles:
```ruby
user = Article.last.user
user.update(name: "\\: #{user.name}")
user.articles.each(&:save)
```
Now, again on the "main" branch, start your application (e.g.,
`bin/startup`).
Then get a logged in and a logged out browser session going. Open your
web inspector and open console. Then go to the local instances homepage
(e.g., http://localhost:3000) and look for JS errors.
On the main branch, you should see an exception around
`JSON.parse(button.data.info)` (assuming that the `user`'s article is
rendered on the homepage).
Then go to the user's page (e.g. https://localhost:3000/:user-slug) and
look for JS parse errors.
On this PR's branch (e.g.,
`jeremyf/take-two-at-resolving-gh-15916`)
you shouldn't see those console errors.
More importantly, the Follow buttons should work.
* fix: accessibility issue with feeds comment section
* fix: comments section name for logged out scenario and search results
* fix: review changes for logged in scenario
* fix: updated comments section aria label
* Add the preview card to logged out feed initial content
* initialise the initial dropdowns added on the logged out feed
* minor tweak to selector
* flip the follow button and the summary
* add minimal preview card to build article HTML
* WIP: data fetched an inserted into card on logged out feed
* WIP: cards added to logged in feed
* create separate profile preview card component
* small style tweak, import pack on each page that shows feed cards
* rename
* tweak some styling issues
* make sure follow buttons init in cards
* populate all matching metadata placeholders after fetch
* don't render full preview card upfront on logged out feed
* refactors from PR comments
* fix issue in person search results
* remove check for article author link that will be superseded by cypress test for preview card
* Revert "remove check for article author link that will be superseded by cypress test for preview card"
This reverts commit 9b42804ffd0f051891c87293d0b791ed2bb0367f.
* Revert "fix issue in person search results"
This reverts commit 04941e3520c0895212141193b60f2933faed5ca1.
* only show the preview cards on story cards for Posts (not users etc in search results)
* correct display on collections view
* remove link check that will be replaced by cypress test
* tweaks to small issues, add a test for the logged out feed
* add tests for logged in home feed, logged out tag index
* add search test and tag index logged in test
* fixes to preview profile spec
* tweak to followauthor spec
* add cypress test for preview on series page
* use a unique test user for series test
* correct the jsdoc comments
* tweaks following PR review
* allow feed preview cards to reposition
* move to separate file from pack
* Adjust heading order
No skipping levels, adding an h1 for the homepage
* Add missing image alt text
* Update after PR review
* Update test snapshot
Co-authored-by: rhymes <rhymes@hey.com>
* 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
* Replace old query style with crayons link block
* Add Crayons layout
* Rename nav file and refactor how it's referenced in parent file
* Rename sidebar file
* style updates
* more changes
* podcasts
* .
* code format
Co-authored-by: Lisa Sy <lisasyis@gmail.com>