* Adds image URL validation to image URLs in configs_controller.rb
* Adds additional image URLs to #valid_image_url in configs_controller.rb
* Adds tests around valid image URLs to configs_spec.rb
* WIP: sets strict conditions for before_action
* WIP: comments out unused code for draft PR
* WIP: cleans up configs_controller.rb for draft PR review
* Renames constant to more explicit IMAGE_FIELDS in configs_controller.rb
* Removes unnecessary comments from admin/configs_spec.rb
* Checks for matching keys in params and IMAGE_FIELDS in configs_controller
* Refactors #valid_image_urls and #valid_image_url in ConfigsController (THANK U, ANDY)
* Refactors image-related code and error messages in Admin::ConfigsController
* Renames expected_image_url to invalid_image_url and removes useless test
* Fix: update the tests to contain valid image urls so that they pass the validation.
* Adjusts tests & VALID_URL regex to validate images rather than image-specific URL
* Replaces $ with \z per Rhymes suggestion and feedback
* Adds accidentally removed code
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
* Let dev/test blow up if current_user is used erroneously
* Fix logic
* Fix click-to-edit permissions
* Change test to check for new behavior
* linting
* Edit tests
* Change test
* Clean up implementation
* Update comment
* Fix instance vars
* Update app/controllers/concerns/caching_headers.rb
* Merge origin and add request_store gem
* Added Copy Permalink Functionality to Comment Dropdown
Copy functionality is similar to the way 'copy article link' is implemented. It checks for the android bridge first, then the navigator, then fallsback to the default document copy command
Since the codes were really similar, I moved the copy functionality to a function of its own with callbacks and fallbacks as lambdas, and triggered it with the copyArticleLink and the copyPermalink
* Replaced Copy Permalink Callbacks with Promises
* Keep anchor tags instead of buttons (#1)
* copy permalink using anchor tag
* Missing closing button tag
* Adds 'Copied to Clipboard' Snackbar Message
* Patches bug introduced in #10323
Patch suggested in following comment: https://github.com/forem/forem/pull/8311\#pullrequestreview-492011202
* Removes import statement for addSnackbarItem and Suppresses ESLint Error
Initializer runs in global scope
* Unhandles exception when copying permalink so Honeybadger can handle it
* Replaces ButtonListener suffix for copyPermalink method with Listener
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
* Let dev/test blow up if current_user is used erroneously
* Replace old assets with new ones if cached page mismatch
* Remove wrong code
* Remove wrong code
* Adjust code and add test
* Fix spec
* Clarify comment
* Update app/views/layouts/_styles.html.erb
* Change up partial location
* Remove js
* Remove console log
* Move meta tag around
* Remove js id
* Do not run in test because it messes with stuff
* Remove head div
* Remove head div
* Fix test
* Show canonical URL on article even after it has been updated
* Refactor canonical URL fix
* Clean up canonical URL code
* Clean up canonical URL code
* Update shell version when admin action taken
* Update app/controllers/admin/application_controller.rb
Co-authored-by: Alex <alexandersmith223@gmail.com>
Co-authored-by: Alex <alexandersmith223@gmail.com>