* 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
* 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>
* 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
* Apply overflow-wrap fallback everywhere we use anywhere value
* fix some more non breaking spaces layout issues
* user with org sidebar
* comment index header
* 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
* 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.
* 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>
* 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>
* 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
* 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'
* 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
* 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>
* 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
* Initial user payment pointer work
* Finalize functionality and tests
* Fix schema
* Update app/views/shared/_payment_pointer.html.erb
* Add function to list
* Added configurable meta keywords
* Replaced hardcoded meta-keywords with the configurable ones
* Added tests for configurable meta_keywords
* Improve info for configuring meta-keywords
* 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
* 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
* 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
* 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
* 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
* 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