Commit graph

76 commits

Author SHA1 Message Date
Mac Siri
e98b00b45f
Update search result rendering for Organization (#19740) 2023-07-12 11:53:08 -04:00
Lawrence
d2bcb55365
Date Time Helper Initializer Migration to PAck (#19381)
* migration init

* remove date initializer
2023-04-25 09:58:27 -05:00
Lawrence
3186f7ae2d
CommentDate Migration to Pack tag (#19025)
* migration init

* create an initializers directory

* remove console log

* migrate localDateTime functions and remove comment date from asset pipeline

* add unit test

* add one more

* year test
2023-02-03 13:40:17 -06:00
Ridhwana
9dee48dbc2
Add tracking for the registration flow - "Clicked on Create Account" (#18459)
* refactor: move trackEvents to a utilities folder so that it can be re-used

* feat: add a function called trackCommentClicks and use it on the articlePage

* feat: update the auth widget to take the correct properties

* feat: add create account tracking method for hamburger

* feat: add create account tracking method for sidebar left

* feat: whoops, sidebar tracking info added

* feat: add the feed card create account tracking

* feat: whoops add the id to the dom

* feat: add top nav create account tracking

* feat: create account tracking for the registration modal

* fix: callback instead of invoking + rename class

* fix: js-prepend

* feat: some showLogin event tracking

* use the tracking propert

* x - feed.jsx

* fix: oops I removed hidden

* track from the search login

* feat: add tracking for follow button

* fix: main_stories is only being called in view/articles and both are including the FollowButtons pack

* comments track

* feat: remove punc (.)

* chore: cahnge working

* chore: remove tracking-id from modal

* feat: remove ecmascript features

* refactor: rename some events

* feat: referrer page

* feat: add a secondary source for the follow buttons

* feat: remove file that is not used

* chore: rename key

* feat: use @utilities

* feat: add spec for create account clicks

* feat: add key referrer

* fix: tests

* fix: oops

* chore: add commented test

* test for tracking

* feat: update the change by 1

* feat: aggregate_failures

* feat: add data-no-instant back

* feat: try a different way of testing

* refactor: change secondary_source to referring_souce

* feat: change ahoy event test

* feat: add a version number to ahoy tracking

* feat: change the href to pathname

* feat: reply comment tracking

* fix: to be present syntax

* feat: use href instead of pathname

* chore: do not track tags and podcasts follow and remove referrer

* feat: add readinglist

* fix: remove referrer from test

* feat: fail gracefully in instances where there is no tracking data
2022-09-22 16:03:49 +02:00
Josh Puetz
519632cffb
Jump to comments button (#18457)
Co-authored-by: Fernando Valverde <fernando@visualcosita.com>
2022-09-22 08:58:20 -05:00
thejwuscript
fea90d2e84
Fix inconsistent published date of Article and Comment (#18412)
* Revise system specs for viewing a comment

* Add system specs for viewing comment date

* Add conditional to SetTimeZone middleware

* Revise comment_date partial

* Refactor viewing a comment system specs

* Add more system specs for viewing a comment

* Fix format of comment date with short year

* Fix edited comment date

* Fix comment date when posting new comments
2022-09-09 14:12:15 -06:00
Suzanne Aitchison
fd690982cf
Hide like text if no likes on comment (#18322)
* set label to empty if no likes

* update spec

* fix styling issues when text is removed

* fix missed test text
2022-08-12 15:19:53 +01:00
Suzanne Aitchison
817db3e6f8
keyboard shortcuts in comment text area (#18117) 2022-07-18 12:01:48 -04: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
be64f43c1a
Refactor runtime to webpacker JS (#17142)
* add runtime utilities in webpack land, refactor webpack JS using old class

* access Runtime in legacy JS code via window.Forem namespace

* refactor

* make sure data-runtime added only after page does initial load
2022-04-07 15:39:38 +01:00
Daniel Uber
39c5bcd518
remove activex fallback for internet explorer (#16453)
* remove IE6 XHR support

IE7 and later support XMLHttpRequest natively, and most of the rest of
the code base uses fetch() which may not work in any version of IE

Drop the conditional here in the assumption that this would only be
the first of many problems for a user with an unsupported browser.
2022-02-08 08:36:04 -06: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
Daniel Uber
dc35f8ed24
Remove optional chaining syntax from comments page initializer (#15277)
* Remove questionable syntax from comments initializer

Not sure what ?. is, changing to . to placate the asset precompiler

* Restore conditional access

Rather than changing the ?. to ., wrap the chained access in a guard
clause.

* Fix error in logic

First pass had wrapped this in an "if currentUser" which caused the
else block only to hide comments when no user was logged in, however
the actual behavior should have been to hide comments unless current
user was an article author.
2021-11-03 12:04:28 -05: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
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
Angel Barros
bb8b32bdf2
Zappat0n/add rate limit model everywhere 11500 (#14609)
* Create showModalAfterError function

* Show modal when comments rate limit is reached

* Show modal when article reaction rate limit is reached

* Show modal when follow user rate limit is reached

* Show form error when listing creation rate limit is reached

* Show form error when feedback messages rate limit is reached

* Rename functions for listings rate limit checks

* Show modal when notifications reaction rate limit is reached

* Show modal when picture upload rate limit reached

* Show modal for reactable objects when rate limit reached

* Add and modify tests

* empty commit

* Match modal messages to tests

* Fix error updating Modals

Co-authored-by: Dan Uber <dan@forem.com>
2021-09-23 10:49:19 +01:00
Jamie Gaskins
4b640077e7
Fix readline key bindings for comments on macOS (#14423)
* Fix readline key bindings for comments on macOS

* Extract OS-specific modifier key check to Runtime

* Add the *actual* OS-specific modifier check

* Only operate on the event if it's a KeyboardEvent

It's the only type of event we care about here.

This commit also changes the `!= -1` to `>= 0` to be more clear about
intent. The `index != -1` is a double negative - it means the substring
"is not not found". Instead, the `>= 0` means "is found".
2021-08-10 12:42:27 -04:00
Keshav Biswa
b58fdd013b
Comment reaction button accessibility (#14256)
* added aria-pressed to comment buttons

* Added accessibility title

* updated set attribute and text content of aria-title

* removed 'x likes' from svg titles

* Added e2e tests to test behaviour of like toggle button

* changed reaction button's description to save instead of Saved

* Fixed cypress test
2021-08-10 10:20:14 +01:00
zeotuan
9900d40521
Add error handling and UI feedback when submitting comment resulting in a 503 error (#14233)
* add catch to response.json promise to handle 503 service unavailable error

* fix typo in error message

* make error message more generic

* add test for comment when server response with 503
2021-07-15 10:24:32 +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
Olawale Oyeyipo
5107844251
Make comment box shrink on submit (#13686)
* Make comment box shrink on submit

* Add missing semicolon

* Reset height on both comment textboxes
2021-05-10 09:06:49 +01:00
Rafi
8ef1313e71
Fixing preview button text in comment section (#13627) 2021-05-07 10:48:33 -05:00
Andrew Bone
2a05955092
🐛 Fix new comment dropdown issue (#13661) 2021-05-06 09:06:30 -04:00
Andrew Bone
c9e4227c59
crayons-notice accessibility improvements (#13273)
* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Add roles to crayons-notice

* Update app/assets/javascripts/initializers/initializeCommentsPage.js.erb

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

* Update app/views/admin/badge_achievements/award.html.erb

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

* Update app/views/admin/broadcasts/index.html.erb

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

* Update app/views/admin/configs/_apple_auth_provider_settings.html.erb

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

* Update app/views/admin/configs/_form_submission.html.erb

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

* Update app/views/pages/sponsors.html.erb

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

* Update app/views/shared/authentication/_email_registration_form.html.erb

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

* Update app/views/users/_account.html.erb

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

* Update app/views/shared/authentication/_initial_account_wizard.html.erb

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

* Update app/views/users/edit.html.erb

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

* Update app/views/admin/configs/show.html.erb

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

* Update app/views/admin/configs/show.html.erb

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

* Update app/views/admin/feedback_messages/_feedback_message.html.erb

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

* Update app/views/admin/html_variants/show.html.erb

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

* Update app/views/admin/pages/index.html.erb

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

* Update app/views/admin/pages/index.html.erb

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

* Update app/views/liquids/_user_subscription.html.erb

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

* Update app/views/admin/profile_fields/index.html.erb

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

* Update app/views/admin/tags/edit.html.erb

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

* Update app/views/admin/users/gdpr_delete_requests/index.html.erb

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Update app/views/admin/users/_notes.html.erb

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

* Update app/views/dashboards/following_tags.html.erb

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

* Update app/views/devise/invitations/edit.html.erb

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

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

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

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

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

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

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

* Update app/views/pages/_editor_frontmatter_help.html.erb

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

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2021-04-14 13:32:57 +01:00
Nick Taylor
871650053c
[15 minute fix] Fixed bug with templates not being inserted for comments. (#13149)
* Fixed bug with templates not being inserted for comments.

* Removed some trailing white space from a heading.

* Added custom Cypress command to create an article.

* Added E2E tests for creating comments on an article.

* Fixed adding a comment issue caused by mention auto-complete.

* Fixed a selector for the E2E tests.

* Removed some unnecessary white space and also making code climate happy.

* Updated E2E test.

* Added a bit more to the E2E tests.

* Now validation for comment doesn't need to loop through textareas.

* Merge remote-tracking branch 'origin/master' into nickytonline/fix-comment-template-insertion-bug

* Removed a similar spec file and added tests to the other file.

* wip

* Fixed bug where a response template could not be submitted.

* Added/updated E2E tests.

* Reverted a small change to condition for showing the combobox popover.

* Undoing some white space changes as not related to PR.

* Trigger Build

* Put back article seed data as it's used in tests outside of comment tests.
2021-03-30 13:02:54 +02:00
Suzanne Aitchison
45a291047d
Re-add mention autocomplete to comments, fixing bugs (#13126)
* Revert "Revert "Add (updated) mention autocomplete to post comments (#13061)" (#13116)"

This reverts commit e28bde043c.

* Fix issues with editing comments and arrow key navigation, update tests

* Update app/javascript/crayons/MentionAutocompleteTextArea/MentionAutocompleteTextArea.jsx

Co-authored-by: Nick Taylor <nick@forem.com>

* refactor adding of attributes

* destructure

Co-authored-by: Nick Taylor <nick@forem.com>
2021-03-26 13:43:05 +00:00
Nick Taylor
e28bde043c
Revert "Add (updated) mention autocomplete to post comments (#13061)" (#13116)
This reverts commit a23caead07.
2021-03-25 10:33:51 -04:00
Suzanne Aitchison
a23caead07
Add (updated) mention autocomplete to post comments (#13061)
* add mention autocomplete functionality to article and notification comments

* add cypress tests

* make sure entry transitions dont replay

* undo change to async useeffect covered in other pr

* move search into dynamic import

* exit search if enter pressed in middle of search term

* refactor button activation code

* add a space after a mention is selected

* tweak cypress test for reply to ensure it awaits combobox

* small refactor
2021-03-22 09:18:13 +00:00
Suzanne Aitchison
5bed8f56d4
improve keyboard accessibility of modals 12427 10610 (#12511)
* adds focusTrap wrapper to preact Modal component

* add view specific code for focus trap in admin add nav link

* add script to return a focustrap toggle, use in add nav link modal partial

* add trap to edit nav link modal

* add handlers for sign up modal

* update modal controller for admin section, update nav link modals to use

* update other admin modals with new data values for trap

* remove unneeded erb script file

* remove unneeded target

* refactor to remove extra unneeded param

* remove duplicate code, store getFocusTrapToggle in window

* trap focus in comment and bookmark showModal instances for not logged in user

* remove need for activator id

* clean up id refs no longer needed

* remove custom code and re-use focsu-trap lib

* update storybook docs

* update default export in focusTrap

* prevent close button click triggering a modal toggle twice

* ensure if user navigates from a modal the trap is deactivated

* add jsdoc comments and add dynamic import

* ensure admin controller modal traps are cleaned up on disconnect

* update sign up modal to use crayons

* update modal controller and admin nav links modals to use preact modal

* update profile fields modals for new controller

* tweak styling of sign up and admin modals to match previous

* update listings modal to use crayons modal, adapt focus trap to work with click outside

* memoize deactivate callback to ensure modal can be presented on first page load

* add missed focustrap changes

* fix focus trap issues in onboarding flow

* refactor onboarding focus trap, remove getFocusTrapToggle

* tweaks for styling and article modal toggle

* add click outside tests to modal

* add cypress tests for the login modal

* update liquid tag tests affected by change

* refactors to address review comments

* fix issue with login modal presented twice on comment add

* change ids to selectors in admin modals

* small pr comment refactors

* add listings e2e tests

* add nav link modal tests

* fix issue with help modal

* tweak to fix ui bug from merge

* remove context from showLoginModal

* rename toggleModal

* rename state property for clarity

Co-authored-by: Nick Taylor <nick@dev.to>
2021-02-24 16:01:10 +00:00
Nandan Kumar
30bf47a445
feature added : add-discussion-length-in-brackets #12324 (#12518)
* feature added  add-discussion-length-in-brackets #12324

* changed class name from comments-count to js-comments-count
2021-02-02 15:14:01 +00:00
Ben Halpern
d7732499b9
Improve cumulative layout shift on comment reactions + optimizations (#12309)
* Improve content layout shift on comment reactions + optimizations

* Clean ups, tests, and docs

* Fix test typo

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

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update docs/technical-overview/architecture.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/technical-overview/architecture.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Update docs/technical-overview/architecture.md

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Refactor and add jsdoc

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2021-01-18 19:29:44 -05:00
Josh Puetz
8c5b7bacb4
Show comment posting errors (#12184) 2021-01-08 14:29:01 -06:00
ludwiczakpawel
6f65aff143
Turn off "preview" mode after adding comment (#12127)
* tooltips 1.0.1

* tooltips 1.0.1

* .
2021-01-05 15:23:45 +01: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
rhymes
f9506affb5
Use faster JS selection methods (#11409)
* Add JS tips section to frontend documentation

* Replace document.getElementsByTagName('body') with document.body

* Replace querySelectorAll with faster selecting methods where appropriate

* Replace querySelector with faster selecting methods where appropriate

* Fix typo

* Fix forEach and getElementsByClassName

* Change querySelector* to faster methods in erb files

* Change querySelector* to faster methods in ruby files

* Fix runkit tag

* Various fixes

* Update app/assets/javascripts/initializers/initializeEllipsisMenu.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Update app/assets/javascripts/utilities/slideSidebar.js

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>

* Commenting out flaky spec

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-11-16 17:35:50 +01:00
Josh Puetz
542ee58ab8
Rate Limit Modal - Comments (#11102)
* Non-preact modal

* Some cleanup

* Toggle modal on navigation

* Use rate limit modal on comments page

* Added JSdocs

* Remove explanation link

* Comment rate limit test

* Tests and method renaming
2020-11-03 15:49:20 -06:00
ludwiczakpawel
5d3691bcc5
Notifications redesign (#11084)
* notifications

* fix

* .

* REVERT

* .

* drop ccss

* REVERT

* specs

* drop colons

* fixse

* fix

* spec 1

* eh

* Fix notification specs

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-29 20:38:17 +01:00
ludwiczakpawel
1636bdf4c8
Autoresize on comment textarea + comment submit on CMD/CTRL+Return (#11115)
* .

* whoops

* revert typo

* Handle glitches and edge cases.

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-10-29 09:33:11 +01:00
Ben Halpern
c60566b8a5
[deploy] Modify code to deal with flaky tests (#10616)
* Modify code to deal with flaky tests

* Remove uneeded x
2020-10-05 14:54:11 -04:00
ludwiczakpawel
1375e8a4df
[deploy] Redesigned Comment Form (#10355)
* init

* .

* .

* better

* last bits

* specs

* merge

* fix response templates for replies

* copy

* active inactive buttons + cleanup

* labels

* specs

* specs

* response templates fix

* ....

* wtf

* .
2020-10-05 12:01:48 +02:00
Ben Halpern
3e09a7768f
[deploy] Remove need for ENV vars during asset precompile (#10349)
* Remove need for ENV vars during asset precompile

* Add open-search test
2020-09-16 13:57:05 -04:00
Ben Halpern
b51647c59a
[deploy] Remove unnecessary comment links and clean up logic (#8686)
* Remove unnecessary comment links and clean up logic

* Fix links
2020-06-15 17:40:21 -04:00
icncsx
d86b9d9ce5
Replace querySelector and getElementsByTagName when selecting for head and body (#8315)
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-06-08 20:08:40 -04:00
Molly Struve
38634e5316
[deploy] Optimization: Remove Comment Count From Aysnc user_data (#8174) 2020-06-01 10:38:57 -05:00
Andy Zhao
c42fd3461e
[deploy] Rename positive_reactions_count to public_reactions_count in logic (#7926)
* Rename positive_reactions_count to public_reactions_count

* Add positive reactions count back in so we can remove it

* Use public_category method for reactions

* Add positive_reactions_count in case any old caches rely on it

* Add positive_rxn_count to account for API endpoints

* Remove unused method

* One more spot...

* Add method back in because of caches

* Update specs to match new functionality

* Fix typo

* Remove unused methods
2020-05-26 12:36:28 -04:00
Dmitry Maksyoma
f63c7f9289
Fix Runkit tags not being activated when comment is added (#6767)
* Fix Runkit tags not being activated when comment is added

* Runkit tag activation was ran once, on page load. I've changed it to
  run on on comment preview and submit.
* It was necessary to add a check to skip already activated Runkit
  tags. The code didn't take into account that a tag could be already
  processed, and would just crash.

* Fix Runkit tags and add tests

* Add test for previewing article with Runkit tag

* "Fix CodeClimate not finding waitForRunkitAndActivateTags()

* Refactor a test for readability

* Make Rubocop happy

* Improve test for previewing article with Runkit tag

* Use one method for determining active Runkit tags

* Defer loading of JS from embed.runkit.com

* Add utility function dynamicallyLoadScript(url)

* Switch to dynamic loading of Runkit

* parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads.

* Fix Runkit test

* Remove Runkit script caching in v2 form

* Use <%== instead of .html_safe in v2 form

* Update app/assets/javascripts/utilities/dynamicallyLoadScript.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-15 14:27:46 +02:00
Mac Siri
3cdac45deb
Create notification page spec (#7702) 2020-05-11 12:15:07 -04:00
rhymes
d87c3dbb18
[deploy] Improve comment posting error handling (#7519)
* Improve comment posting error handling

* Incorporate PR suggestions
2020-04-27 16:54:59 +02:00
Ridhwana
a2f1a0049f
Removal of morrrre hardcoded dev.to links (#7390)
* feat: remove 90% of hardcoded dev.to links now

* chore: update tests

* chore: implement suggested changes

* chore: update url

* chore: update to use URL helper
2020-04-21 11:50:18 +02:00
Ridhwana
6dbc838bae
[deploy] Update our mailers to be generalized (#7359)
* feat: make the from in the email to be dynamic

* feat: hardcoded mailer dev.to

* feat: oops hardcoded email addresses in the terms

* chore: remove some whitespace

* update editor guide

* feat: new reply email

* feat: new message mailer

* feat: new follower email

* feat: capitalize the button

* feat: rename the link

* feat: capitalize the button

* feat: generalize the urls

* feat: generalise the url

* feat: dynamic DEV

* feat: update the specs

* feat: DEV digest generalisation part 1

* fix: the method is accessed by tag_url and so the default parameter needs to be set at this level and not at self.tag

* fix: use the tag model instance instead of passing through just the tag name (so that we can use tag_url)

* chore: make code climate happy

* chore: more robocop

* feat: add a default url back for self.tag

* test: fix the feedback helper spec

* fix: spec to be general

* fix: oops :(

* refactor: user_settings_path

* chore: use code_of_conduct_path

* chore: robocop

* chore: use connect path

* chore; use the notifications symbol

* chore: misc path

* feat: simplify url

* feat/fix: change the order of the helpers and use user_url

* chore: user_url

* capitalise

* chore: update article path
2020-04-17 15:35:35 -04:00