Commit graph

56 commits

Author SHA1 Message Date
Mac Siri
afa73e06e3
Replace Webpacker with Esbuild (#20470)
* Migrate to esbuild WIP

* Add exclude

* Remove redundant file

* Move file

* Move to javascript_include_tag

* Lint fix

* WIP

* WIP

* Add watch mode to esbuild WIP

* Get jest working

* Remove babel

* Revert "Remove babel"

This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73.

* More WIP

* Got image to load

* WIP

* Resolve audit

* Lint fix

* WIP

* Fix jest spec

* [CI] Remove asset-restore for test build stage

* Production compliant

* Temp disable sourcemap

* Update glob

* Add esbuild helper to stimulus

* Import fragment

* Temp disable coverage to see failing tests

* Fix broken spec

* Address lint

* Set proper es6 target

* Use esbuild for everything

* wait what

* Revert "Set proper es6 target"

This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf.

* Revert "Use esbuild for everything"

This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3.

* Replace uglifier with terser

* New compiled assets version

* Remvoe honeybadger-io/webpack

* Remove cypress coverage checks for now

* Update jsconfig.json

* Update docker-compose

* Remove public/packs-test from ci cache
2024-01-25 20:29:21 +00:00
Anna Buianova
321540ec08
Hide low quality comments from an article page (#20541)
* Hide low-score (< -50) comments for signed in users on article page

* Use low quality threshold

* Show deleted message for low-quality for signed-in users + hide if no children

* Remove irrelevant changes

* Skip view test for low-quality

* Removed irrelevant (yet) tests

* Fixed low score threshold in specs descriptions
2024-01-23 20:33:12 +00:00
Ben Halpern
ec7adf56fe
Allow admins to set cover image height configs (#19936)
* Initial basic work

* Bulk of related work, including find/replace on the inputs

* Adjust some tests

* Adjust some specs

* Fix a few more tests

* Clean up tests

* Adjust tests

* Test fiddle

* Adjust crop back to be a param

* Update tests

* Set proper defaults

* Fix some styling

* Adjust enrichment logic and tests

* Adjust form JS

* Update test snapshot

* Clean up formatting

* Fix spec name

* Adjust some css and defaults

* Adjust translation for image provider options

* Switch from fill to fill-down

* Proper fallback image

* Fix tests

* Update app/services/images/optimizer.rb

Co-authored-by: Mac Siri <mac@forem.com>

---------

Co-authored-by: Mac Siri <mac@forem.com>
2023-08-21 13:25:16 -04:00
thejwuscript
9bc0d83130
Fix reply button visibility on locked discussion (#18023)
* Add specs for unlocked discussion

* Add specs for locked discussion

* Edit wording for discussion lock specs

* Set instance variable on CommentsController

* Fix legacy comments index view

* Empty commit - Trigger CI

* Modify test assertions

* Add data-testid attribute to reply button

* Add cypress custom command createComment

* Add cypress specs for locked discussion

* Add cypress specs for unlocked discussion

Co-authored-by: Fernando Valverde <fernando@fdo.cr>
2022-07-27 09:29:55 +01:00
Joshua Wehner
4e17649e15
Remove generated social images, except for articles#show (#18118)
* Prefer main_social_image (except on articles#show)

See https://github.com/forem/forem-internal-eng/issues/485

* Cleanup social media helpers no longer in use
2022-07-18 12:29:21 +02:00
Suzanne Aitchison
2f436731a7
Add markdown toolbar to comments (#18062)
* show the toolbar (WIP - includes some hacks and todos)

* allow calling component to pass additional toolbar elements

* add templates behaviour

* get templates working

* tweaks following mention autocomplete refactor

* remove image upload handler no longer needed

* rename method

* some small refactors

* only comment text area controls visibility of templates area

* fix error in role name

* fix mobile view

* update specs
2022-07-12 09:02:53 +01:00
Suzanne Aitchison
18877f6f1b
Avoid layout funkiness when non-breaking characters are used (#16782)
* Apply overflow-wrap fallback everywhere we use anywhere value

* fix some more non breaking spaces layout issues

* user with org sidebar

* comment index header
2022-03-08 10:37:52 +00:00
Anna Buianova
4cab190285
Hiding comments: an option to hide or keep children (#15178)
* Optional hiding child comments (start)

* Changed confirm button in comments hide form

* Hide children comments if hide_children was passed

* Added a spec for hidden child comment notifications

* Hide only explicitly hidden comments

* Hide comment modal on article page

* Prevent default behaviour for hide comment link

* Improved hide comments modal looks

* Improved hide comments modal looks

* Removed unused code

* Send hide comment form via fetch

* Hide comment descendants when hide_children was passed

* Don't hide hidden comments descendants on permalink

* Removed unnecesary span

* Improved hide comments modal styling

* Removed unused styles and js, improved styling

* Clickable label

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Fixed showing hidden comments spoiler for article author

* Fixed hideArticleComments.spec.js

* Fixed displaying hidden comments text for artice author, added specs

* Target hide comments modal inside the modal when adding a listener

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Replaced hide comment link with a button

* Refactored adding hide_children url param

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Fixed cypress hide comments test

* Removed aria-label for submit on the hide comments modal

* Fixed formatting

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-11-18 11:57:40 +03:00
Akash Srivastava
4cb48768f9
Added collapsed hidden comments to author's article/podcast episode view (#14018)
* Handling hiding/collapsing hidden comments client side

* Updated comment quality text

* Added placeholder for comments against podcast episodes

* Added logic for encompassing co-author-ids in articles

* Removed rspecs validating non-presence of hidden comments in dom

* Fixed hiding flow on comments page for a commentable

* Fixed e2e specs

* Addressed feedback on e2e tests
2021-11-03 11:08:04 +07:00
yheuhtozr
f762acca86
views/comments i18n (#15059)
* views/comments etc i18n

* comments PR fixes

* PR sync with main

* remove ja.yml

* Update _comment_header.html.erb

* Update index.html.erb

* Update _comment_header.html.erb

* Update en.yml

* Update fr.yml

* Update config/locales/views/comments/en.yml

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update _comment_date.erb

* Update en.yml

* Update fr.yml

Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-10-27 17:13:43 +01:00
yheuhtozr
44bddb5a94
views/videos i18n (#15022)
* views/videos i18n

* remove ja.yml
2021-10-14 16:08:11 -06:00
Ben Halpern
b900c8de92
Remove legacy "deleted commentable" view (#15052)
* Remove unneeded extra page

* Update app/views/comments/index.html.erb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/views/comments/index.html.erb

Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-10-13 10:23:25 -04:00
Jamie Gaskins
5d5dbaca95
Eager-load comment user data (#14902)
* Eager-load comment user data

Profiles and user settings are loaded for on each comment author. On
posts with many comments, this invokes a *lot* of DB queries. This
commit replaces 2 queries per comment with 2 queries for all comments.

* Fix where I misunderstood limit's purpose

This implementation is too clever. It looks like it should just be
getting all but the last, but it uses the fact that the default is 0 to
default to getting all of them. This isn't readily understandable to
someone reading the code.

I don't have a suggestion to fix it yet so I'm just going to leave it
as-is for now.
2021-10-05 10:05:01 +02:00
Ben Halpern
036d75aa6e
Admin-configurable display locale (#14620)
* Admin-configurable display locale

* Add i18n-js and namespacing

* Basic tests and clean up

* A few test adjustments

* Update vendor cache

* Fix a few tests

* Fix a few tests

* Update app/views/articles/_actions.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_comments_actions.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_single_story.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_single_story.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/comments/_comment_header.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/layouts/_sidebar_tags.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/listings/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/system/homepage/user_visits_homepage_articles_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/system/user/view_user_index_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Alphabetical locale page

* Add activerecord custom validation error translations

* Add i18n to webpacker

* Fix a few tests

* Adjust error messages

* Add i18n-tasks

* Adjust JS to get working with jest

* Adjust the way translations are pulled in

* Adjust jest tests

* Remove time localization

* Remove superfluous public js

* Add basic tests for i18n application controller

* Remove unnecessary content

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-09-28 11:04:35 -04:00
Mac Siri
94d2261d42
Remove #sanitize_and_decode (#14727) 2021-09-15 11:05:06 -04:00
Suzanne Aitchison
f95841cfbc
[15 min fix] Initialize follow buttons on comment index page (#14416)
* [15 min fix] Initialize follow buttons on comment index page

* add init for newly added comments
2021-08-04 13:05:43 +01:00
Julien Maury
09269ca972
remove use of async attribute on inline scripts (#14297) 2021-07-22 06:45:04 -04:00
Julien Maury
a2677cc0a9
Remove defer attributes from inline scripts - gist embeds (#13407)
* replace inline attribute defer with external js - show.html.erb

* fix typo in filename

* disable no-undef and bail if not defined

* put js on subfolder utilities

* refactor jsx instead of loading chunk with defer

* fix typo in desc

* better name for global gist helper

* use InstantClick

* working script on preview AND single view, not dynamic import, though

* embed only if gists

* combine all approaches to make dynamic import work

* make gist embeds work on submit comment form

* make gist embeds work on preview comment

* refactor - preview comments and submit

* add pack editComment + helper embedGistsInComments

* comment gist helper

* delete useless file utility

* use new syntax for events

* put code in method embedGistsInComments

* delete older pack gist

* handle edge case 'view full discussion'

* resolve conflict with package ibm-openapi-validator

* resolve conflict with package husky

* empty commit to test random error travis

* better name for class dismiss

* handle future events submit

* delete test code on click toggle form

* delete unused file

* rename pack as js file, not jsx

* Added POC using MutationObserver.

* missing case: notification page

* use custom pack notification page

* add e2e test for comment with embed gist

* add e2e test for preview post with embed gist

* add an extra step in tests to check gist is present

Co-authored-by: Nick Taylor <nick@dev.to>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-06-11 08:22:50 +01:00
Suzanne Aitchison
7e322e4f7b
Optimise dropdowns for accessibility - Post comments and share (#13868)
* WIP - basic init of comment dropdowns with open and close on click

* WIP - initialize the share dropdown

* initialize all post dropdowns within packs, init copy to clipboard announcer

* refactor and add JSDocs to helper

* undo changes to base jsx

* update accessible name of post actions button in cypress test

* make sure dropdowns pack loaded on comment index page

* undo prettier changes in base jsx

* undo prettier changes in base jsx

* initialize comment dropdowns in podcasts

* add test for the post actions

* add article comment tests

* add cypress tests for comment dropdowns
2021-06-03 09:13:17 +01:00
Michael Kohl
6dfabd578f
Rename SiteConfig to Settings::General (#13573)
* Rename SiteConfig

* More renaming

* Update spec

* Update mandatory settings mapping

* More renaming

* e2e test fixes

* You have a rename, and you have a rename

* Spec fix

* More changes

* Temporarily disable specs

* After-merge update

* Undo rename for migration

* undo rename of DUS

* Fix DUS

* Fix merge problem

* Remove redundant DUS

* Fix specs

* Remove unused code

* Change wrong class name

* More cleanup

* Re-add missing values to constant

* Fix constant

* Fix spec

* Remove obsolete fields

* Add accidentally removed field

* Update spec

* Move methods from Settings::General to ForemInstance

* Remove unneeded model

* Change mentions of 'site config'
2021-05-21 14:45:37 +02:00
Ben Halpern
9b5e694e9c
Ben/new branch noindex spam comments (#12210)
* noindex google any comment permalinks with negative score

* Add commentable noindex

* Give dummy score to podcast episodes
2021-01-11 16:17:52 -05:00
Julianna Tetreault
ca6ba1af7d
Replace collective_noun with community_name (#11846) [deploy]
* Removes collective_noun and collective_noun_disabled from app

* Config Generalization: replaces community_qualified_name with community_name
  - Generalizes SiteConfig after the removal of collective_noun field
  - Updates copy where necessary to be readable with community_name
  - Makes the community_name SiteConfig description more explicit
  - Adds flexibility for Admins by removing appended "community"

* Adds a data_update script to remove collective_noun and collective_noun_disabled

* Removes appended community from stories_controller.rb

* Removes unnecessary quotation marks around SiteConfig.community_name.to_s

* Makes SiteConfig community_name description more explicit

* Removes topic from #email_from and replaces arg with _

* Removes argument from #email_from (facepalm)

* Reverts changes to application_mailer and notify_mailer_spec

* Removes default "Community" topic from application_mailer and makes topic optional

* Refactors #prepopulate_new_form to resolve Code Climate failures

* Refactors #email_from even further by use of a ternary operator per review suggestion

* Simplifies the data_update script used to remove collective_noun per review request

* Adds a data_update script to append community to community_name

* Updates data_update script to correctly append Community to community_name

* Removes RemoveCollectiveNounFromConfig and updates other script

* Removes superfluous false from data_update script

* Updates data_update script to be more idiomatic
2020-12-28 09:34:17 -07:00
ludwiczakpawel
70706d0a62
Comments UI update (#11283)
* tooltips 1.0.1

* tooltips 1.0.1

* init

* .

* drop not needed files

* .

* init

* init

* .

* comments

* border

* missing bits

* build comment JS

* .

* .

* specs

* sloan avatar fix

* bunch of fixes

* specs and fixes

* specs

* .

* swap order of links

* contrast

* js for dropdown

* icons

* op-author

* three dots icon

* reverts

* test: capybara- make sure that we click the dropdown before clicking on edit

* permalink --> link

* tiny fixes

* aria-label on form

* proper alt on user's avatar

* aria has popup

* use UL > LI instead of DIV

* add aria-labels to dropdown items

* another aria-label

* better links: nav

* contrast

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
2020-11-18 18:21:19 -05:00
Ivan
3ad0e27f8c
fix for code fullscreen action on comment page (#11224) 2020-11-02 10:57:45 +01:00
Rafal Trojanowski
4bc8b80a90
Introduce tweet_timeline liquid tag (#7605) (#10825) 2020-10-30 11:03:40 +01:00
Vaidehi Joshi
c4efee10bf
Do not require meta_keywords to be set (#10721)
* Remove extra character from meta_keywords in /listings/index.html.erb

* Remove meta_keywords from MANDATORY_CONFIGS

* Add and use meta_keywords_tag helper

* Use modern tag syntax instead of deprecated syntax

* Add and use meta_keywords_default helper

* Add and use meta_keywords_article helper

* Remove * from meta_keywords_field.label

* Update meta_keyword specs to account for no keywords being set
2020-10-08 10:51:25 -04:00
ludwiczakpawel
3e9b56a7dd
[deploy] Frontend cleanups (#10416) 2020-09-24 08:15:12 -05:00
Ben Halpern
dda6422e22
[deploy] Use fragment for linking to comments for SEO (#8882) 2020-06-24 10:09:41 -04:00
Raphael Noriode
463cd07597
modify meta tag according to the twitter doc to return large images (#8858) 2020-06-23 13:03:28 -04:00
Ben Halpern
c1dca335c7
[deploy] Allow users to set a payment pointer for their content (#8304)
* Initial user payment pointer work

* Finalize functionality and tests

* Fix schema

* Update app/views/shared/_payment_pointer.html.erb

* Add function to list
2020-06-09 16:28:16 -04:00
benhalpern
cca7729198 Add page view tracking to comment permalinks 2020-05-23 14:08:28 -04:00
cyrillefr
8bb865b10b
[deploy] Fixes some html_safe in Articles (#6500) 2020-05-13 09:22:52 -05:00
Anna Buianova
346ce44169
[deploy] Configurable meta keywords (#7591)
* Added configurable meta keywords

* Replaced hardcoded meta-keywords with the configurable ones

* Added tests for configurable meta_keywords

* Improve info for configuring meta-keywords
2020-04-29 09:40:06 -04:00
Molly Struve
8eb4612166
[deploy] fix podcast episode comment rendering and write a spec for it (#7547) 2020-04-27 14:56:03 -05:00
Molly Struve
527c98fa01
[deploy] remove no longer used index! and check for main_image method in view (#7526) 2020-04-27 10:16:49 -05:00
Andy Zhao
f5ec83653c
[deploy] Finalize and add response templates feature (#7068) 2020-04-16 15:53:29 -04:00
Ridhwana
c627f4e98a
Replace DEV with the community name... almost everywhere (#7211)
* chore: search and replace carefully

* fix: small updates

* fix: spec contains DEV hardcoded

* chore: update on badges

* feat: upcase
2020-04-10 17:03:16 +02:00
Ridhwana
e626cfa933
[deploy] Split out social media options (Important: post deployment task to be run) (#7173)
* feat: define the different social media handles

* feat: dynamically render all the social media fields

* feat: ensure that the social media handles are permitter and dealt in a separate path from the rest

* test: update  social_networks_handle to social_media_handles

* feat: update the sidebar to use different social media

* feat: update the twitter:site meta handle to be  SiteConfig.social_media_handles["twitter"]

* feat: update the a links to tweets

* feat: make the links dynamic and only show those that there is a value for

* refactor: make @ThePracticalDev dynamic

* refactor: make @ThePracticalDev dynamic

* feat: add dynamic social media handles

* chore: rename values

* chore: remove extra social handles

* chore: some spacing

* chore: remove lines

* rafector: user rails-settings-cached type: :hash to set the type and the defaults

* feat: use nil and blank instead of "" and empty

* chore: move the social media handles into the right box

* refactor: rearrange model placement based on the UI

* chore: code climate

* refactor: comments from PR

* chore: rename the ff

* chore: amended twitter username

* chore: add a temporary rake task

* feat: update names

* chore: why am i using the old syntax :(

* chore: revert dynamic erb variable in offline.html
2020-04-09 19:51:11 +02:00
Ridhwana
e74890680a
Generalize meta content and copyright year (#6887)
* chore: remove the description

* feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently

* refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>

* refactor: update the path to be dynamic

* refactor: change some other meta properties to be dynamic

* refactor: update the index

* refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community

* feat: copyright year should be dynamic

* feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url

* feat: space

* refactor: move the copyright notice to a helper

* refactor: use the community_qualified_name helper!

* refactor: start year is already a string

* refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere

* chore:oops

* refactor: Change  <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently.

* refactor: Replace  `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with `  <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />`

* chore: update some other meta's

* feat: replace 'The Practical DEV' with 'DEV Community' and

* test: remove The :)

* test: copyright_notice

* fix: syntax error

* feat: name of community

* refactor: use app url

* fix: template strings

* fix: tag

* feat: update the app url parameters

* feat: add a community_name helper so we don't have to refer to an environment variable in the templates

* feat: take into account the case when the start year is a blank string

* feat: single quotes to double quotes

* test: add a test for the #community_name

* chore: update or codeclimate

* chore: amend the community helper

* refactor: use the community_name helper in here

* feat: update ApplicationConfig["COMMUNITY_NAME"]  with community_name

* fix: Time.current.year needs to be a string :(

* chore: extra space

* chore: change to use community_qualified_name
2020-03-31 16:15:57 +02:00
cyrillefr
fe57053c44
Fixe html_safe issues from comment domain (#6422) 2020-03-03 15:38:15 -05:00
cyrillefr
dea823b6ec
Excludes some files from linting and deletes redundancies (#6275) 2020-03-02 12:50:36 -05:00
Michael Kohl
728a05c476 Move from env variables to SiteConfig (#5385) [deploy]
* Move from env variables to SiteConfig

Related to #5384

This PR only deals with the first remaining part outlined in the issue, starting to use existing SiteConfig keys instead of the env variables.

* Restore Envfile to original version for now
2020-01-07 16:36:24 -05:00
Andy Zhao
71157c993e Hide comment feature (#4944)
* Add MVP of hide comment feature

* Slight copy adjustments

* Remove unused file oops

* Fix strange styling issues

* Add hide/unhide comment specs

* Authenticate user for hide/unhide

* Add tests for hide/unhide functionality

* Remove opacity CSS for hidden comments

* Fix hidden comment explanation logic

* Fix some styling issues

* Fix hiding top level comment logic

* Show only hidden comments in permalink and not thread

* Hide subtree properly if hidden comment

* Fix weird CSS issue

* Properly hide comments for permalink view

* Show children comments in permalink view

* Add tests for comment hiding visibility

* Remove superfluous code and adjust copy

* Remove some more logical duplication

* Add dedicated article column for any comments hidden

* Add reload in test
2019-12-10 15:09:47 -05:00
Regina Alyssa
8b4f7faf6b Comment Social Preview (#4260)
* Add route for comment social preview

* Add method comment to social_previews_controller

* Add view for comment social preview

* Fix spacing in meta keywords

* Update comments page keywords

* Create helper for comment social media image

* Use comment social image, add published condition for article social image

* Add tests for comment social preview

* Remove not_found fallback for social previews controller

* Remove cached_tag_list

* Update typos of word 'image' in spec
2019-10-07 10:03:03 -04:00
rhymes
808b8f285c Comments: remove double stripping undoing escaping (#3270) 2019-06-24 12:00:36 -04:00
Ben Halpern
d48ad63aea
Add comment context for notifications and comment pages (#3262)
* Add comment context for notifications and comment pages

* Fix comment spec and adjust css
2019-06-22 14:50:15 -04:00
Andy Zhao
4ca7197696 Delete a comment's title if it is deleted (#3249)
* Remove cursor pointer for notification cards

* Delete the comment title if deleted

* Update title to use comment's title
2019-06-20 15:48:21 -04:00
Ben Halpern
456931f208
Further generalize pages and site Twitter handle (#3177)
* Further generalize pages and site Twitter handle

* Add footer mod change

* Remove giveaways dead code
2019-06-16 00:59:11 -04:00
rhymes
6a626e819d Refactor: fix issues raised by bullet (#2965)
* Preload organization, not user

* Preload users only when needed

* Pre-load podcasts for podcast episodes in API

* Avoid eager loading error by loading rating votes separately

* Preload associations for moderation

* Preload user comments in trees

* Preload organization for non org dashboard and cleanup queries

* Optimize ArticleSuggester to only load N articles at need

* Remove eager loading and pass variables to partials for easier debug

* Reorganize tags validation code and ignore actsastaggableon eager loading issues

* Remove unused eager loading and bring up comments relation

* Preload podcasts when loading podcast episodes

* Fix views specs

* Make sure ArticleSuggester never returns duplicates

* Remove commented code

* Re-trigger build

* Move suggested articles back to view to respect fragment caching
2019-05-28 17:32:53 -04:00
Mike Coutermarsh
4c9959f0ff Social Cards Part 2 (#2188)
* Social Cards Part 2

This is a follow up to part 1: https://github.com/thepracticaldev/dev.to/pull/2090.

This PR updates the og:image URLs to use the new social_preview.png urls
added in Part 1.

So that the already generated/cached images do not need to be recreated,
this sets a MIGRATION_DATETIME. Any object that has been updated after
that date will generate a new image

Objects from before that date will not. They will use the new url.

* Fix weird change made by rubocop autocorrect

* Handle organizations + users

* Run CI

* Use time with zone to be explicit about timezone

* Simplify branching in user_social_image_url method

* Fix param alignment + bump migration date
2019-05-01 11:07:25 -04:00