Commit graph

19 commits

Author SHA1 Message Date
Andy Zhao
fded16b8dc
[deploy] Add a more helpful msg for response templates (#7543) 2020-04-27 13:28:28 -04:00
Andy Zhao
f5ec83653c
[deploy] Finalize and add response templates feature (#7068) 2020-04-16 15:53:29 -04:00
rhymes
32694a22ef
Add rel noopener to links opening in a separate tab (#7235)
* Add rel noopener to links opening in a separate tab

* Trigger Travis!
2020-04-12 17:04:07 +02:00
Michael Kohl
eeed7f6c54
Introduce URL.sanitized_referer helper (#7122) [deploy]
* Introduce URL.sanitized_referer helper

* Make service worker path a constant

* Simplify redirect logic

* Actually use helper

* Remove random file
2020-04-07 17:57:13 +02:00
Alex
bc8c126497
Validate file uploads client-side (#6737)
* JavaScript MVP

- First round of linting
- Use for testing

* Add some default UI error handling

* Add file validation to updating profile image

* Add type validation and fix size bug

* Refactor and add file validation to article cover

* Add file validation to body images

* Add accept field to profile image form

* Add parseInt to maxFileSizeMb

* Add accept and max-file-size-mb to article images

* Change parseInt to Number

* Add file validations to podcast form

* Add accept image to podcasts

* Add file validation and accept field to org form

* Use appendChild for error message

* Add file validation to comment form

* Add JS Docs comments

* Remove redundant format check

* Add documentation to override default values

* Update documention (spelling, formatting, etc.)

* Update max-file-size-mb to 25

* Bump default max file size for images to 25

* Change appendChild to append

* Refactor remove error message

* Refactor JS, remove console logs, update error msg

* Remove video from permitted file types

* Update error messaging

* Update docs for funciton params...oops 🙈

* Fix file size check logic

- Allow for 0 maxFileSizeMb
- Use JSON.parse() for permittedFileTypes to get an Array

* Add specs

* Change blackbox to black box

* Remove wait_for_javascript

* Remove comments from spec
2020-03-24 09:21:49 +01:00
Ben Halpern
77f0581673
Remove flash notice to avoid cache leak (#6570) [deploy] 2020-03-10 13:22:46 -04:00
Spencer
010c61a44a
Allow comments without a commentable to be edited and destroyed (#5945) 2020-02-25 13:45:50 -05:00
Maja Komel
3412af977f Don't raise StandardError for invalid liquid tags when updating comment (#5694)
* Don't raise StandardError for invalid liquid tags when updating comment

* remove text-align styling for alert error
2020-01-24 11:26:55 -05:00
rhymes
879864a9bb Improve accessibility score on homepage and article show page (#2740) [ci skip]
* Increase loader text opacity

Low contrast text is not great in general, this also brings Lighthouse score from 88 to 96

* Add some alternative text to images

* Add some aria labels to controls
2019-05-07 09:56:34 -04:00
rhymes
f17d0f34e1 Update framework defaults to match those in Rails 5.1 (#2309)
* Enable all Rails 5.0 defaults, except for CSRF mitigations

* Enable all Rails 5.1 defaults

* Enable per_form_csrf_tokens

* Enable forgery_protection_origin_check

* Avoid replacing the CSRF in the comment form

Each form now has its own CSRF in addition to the global one.
I've left in place the setInterval

* Restore per_form_csrf_tokens to false
2019-04-17 12:21:15 -04:00
Glenn Carremans
d9ee35a421 Fix linting issues in app/views/comments (#1853) [ci skip] 2019-02-25 13:03:31 -05:00
Ben Halpern
d7665fcc3f
Add comment template to post (#1692)
* add myself to the core contributors

* add comment template

* merge upstream

* make sure the template re-appears for top level comments after submission

* make interface admin only

* Adjust comment template form

* Fix merge conflicts

* Remove unnecessary comment template from json
2019-01-30 13:32:34 -05:00
Anna Buianova
8f348f9831 Fix comment cancel button url (#1508) 2019-01-10 12:25:11 -05:00
Ben Halpern
9af401ad09
Remove user signed in difference in article show comment form (#1468) 2019-01-05 22:27:34 -05:00
Jasmeet Singh Saini
908e82cf9e Implement cancel button comment edit (#331) 2018-11-05 13:48:56 -05:00
Nick Karnik
a3649b8d09 Added the ability to press Ctrl+Enter Or Command+Enter to submit comments. (#885)
* Resolves #245
    * This is applied to root level comments as well as nested replies.
    * We are ensuring that user has commented at least once which means
      they have accepted the code of conduct before

Style changes as per suggestions in code review
2018-10-13 14:24:53 -04:00
Mac Siri
4bc9020956 Implement comment preview feature (#223)
* Create #preview endpoint for CommentController

* Create comment preview button WIP

* Implement preview feature for reply comment W

* Style preview button CSS WIP

* Style preview button CSS WIP

* Tweak markdown toggle logic and add styling

* Update comment feature spec

* Add error handling for comment preview & fix lint

* Extract handleCommentPreview into it's own file

* Adjust functionality for comment preview [WIP]

* Modify comment preview functionality and CSS

* Adjust code style based on linter
2018-04-24 14:30:52 -04:00
Mac Siri
18f0003187 Use JSON instead of FormData for comment-creation (#216)
* Use JSON instead of FormData for comment-creation

* Fix lint
2018-04-17 17:32:45 -07:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00