Currently, we don't allow users to remove the `main_image` of an article once it has been set. It can be changed, but never removed.
This change allows the `main_image` to be removed by checking for the `cover_image` key in the frontmatter that is sent along in the article's markdown. This means that a user should be able to remove the image associated with an article by removing the value of `cover_image:` from their frontmatter.
* Do not render or link to empty rss feeds
* s
* Move calculation to worker
* remove xit test
* Also allow implicit rating votes in comments
* Fix alignment issue
* Remove comment logic
* Modernize index test
* Hide comments body_html and user info if the comment is either deleted or hidden
* Shorten lines a bit
* Freeze repeated strings
* Document all /comments
* Document /comments/{id}
* Changed shecoded preview template
* Added a test for social preview template with multiple campaign tags
* feat: update some css properties to make it closer to the design (i think)
* Update to relative units
* Update spec
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* Add a mascot_user_id to SiteConfig
Also allow it to be updated from /internal/config pages.
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Add spec for updating mascot_user_id
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Remove Algolia from comments
* Remove more references to ordered_comments index
* Remove more references to Comments Algolia index
* Fix index_worker_spec
* Access only unpublished listings if they belong to the user when authenticated
* Make sure we never send unpublished listings in the index
* Update API docs
* oops
* Remove unused preloading as this loads a single item
* Fix articles index state param values
* Update Articles API docs
* Fix ClassifiedListing.cost_by_category with invalid category
* Add docs for GET|POST /listings and fix bugs
* Document PUT /api/listings/:id
* Add docs for /listings/category/{category}
* One variable down
* Improve listings update error handling
* Add /search/classified_listings route
* Add classified_listings search controller action
* Add spec for /search/classified_listings request
* Begin implementing frontend code
* Add debounce to classified_listings search
* before_action to format page & per_page as Integer
* Use new fetchSearch helper to fix codeclimate
* Refactor to reduce listingSearch function length
* Refactor into separate updateListings function
* Move updateListings function outside class
* Move page size to constant
* Add brackets to conditionals
* Add comment for tags param
* Add JS doc
* Move params logic/cleanup to search_controller
* Move listingIDs to const
* Rename remove_blank_params & move to before_action
* Initial field test spec work
* Clean up specs
* Fix codeclimage
* Cleanups
* Update names
* Rename and remove need to pass logged in status
* Leadup to prod: two experiments
* Move test logic to controller and add tests
Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
* Add published field to ClassifiedListing
* Add back query_conditions conditional
* Don't allow searches for unpublished listings
* Fix comment typo...oops!
When an article is updated the associated collection is touched along with all its articles. This creates a deadlock where two transaction(nested) lock the article that was updated.
With this commit the collection wll be touched after the article updates transaction has been commited. Doing so we have two sequential transactions.
* 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>