Commit graph

1078 commits

Author SHA1 Message Date
Ben Halpern
df796f7e07
Cache data on /mod (#5315) [deploy] 2019-12-31 10:18:55 -05:00
Ben Halpern
a716cf2756
Create UX Customization tab in settings (#5307) [deploy]
* Create UX Customization tab in settings

* Add variable import

* Change from UX Customization to just UX
2019-12-31 09:35:15 -05:00
John Curcio
9973d5a7fc Add theme selector to user settings (#5121) 2019-12-30 10:53:47 -05:00
Mac Siri
2b16f07d9e Revert "#5226 Unescape page title. (#5246)" (#5267)
This reverts commit 2312d2e301.
2019-12-27 15:48:33 -05:00
Ben Halpern
7a867d6133
Add canonical url to posts even if internal nav (#5227) [deploy]
* Add canonical url to posts even if internal nav

* Render to meta if not internal
2019-12-27 10:58:23 -05:00
Temuri Takalandze
2312d2e301 #5226 Unescape page title. (#5246)
* #5226 Unescape page title.

* #5226 Unescape or statement in title.
2019-12-27 10:57:31 -05:00
rhymes
b45f35d044 Ignore delayed job and sidekiq dashboards (#5262) 2019-12-27 10:48:51 -05:00
Dinesh
420b42e656 Added title attribute for Badges (#5201) 2019-12-27 10:40:29 -05:00
Ben Halpern
771fa5b782
Final fixes to /mod (#5234) [deploy] 2019-12-23 20:12:14 -05:00
Dan Silcox
e98d3cb7be Fix check for whether shell has changed (#5176)
Previously shell_top was being checked twice - now we check top + bottom :)
2019-12-23 18:19:50 -05:00
Ben Halpern
03c2404b13
Redo /mod for performance and usability (#5230) [deploy] 2019-12-23 18:10:25 -05:00
Mike Coutermarsh
3128c17fab Improve twitter card caching (#5206) [deploy]
* update test so it fails from badge randomness

* Better caching

This removes the randomness from the views. Which means the cache keys
won't get regenerated every request.

The badges will still be in random positions, but it will change per
user/article rather than every render.
2019-12-23 12:22:38 -05:00
Ben Halpern
5812ecc383
Open /connect sidecar links in iframe (#5203) [deploy]
* Use iframe for connect sidecar

* Modify css of lefthand sidebar

* Add proper sidecar markup

* Update tests
2019-12-21 15:46:36 -05:00
Sarthak Sharma
b602b7b91f 🚀Feature/ability to edit messages (#5139) [deploy]
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* Refactoring🔩: Refactoring for edit messages

* Refactoring🔩: Refactoring:2 for edit messages

* Refactoring🔩: Refactoring:2 for edit messages

* Test Cases📝 : Test Cases for edit message added

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* Refactoring🔩: Refactoring for edit messages

* Refactoring🔩: Refactoring:2 for edit messages

* Refactoring🔩: Refactoring:2 for edit messages

* Bug Fix 🐞: Added space between edited and timestamp

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2019-12-20 10:19:00 -05:00
Jared Harbison
07fd2281cd Implement GitPitchTag (#4942) 2019-12-19 19:59:15 -05:00
Ben Halpern
c5d4f293e6
Don't serviceworker cache ?preview= requests (#5181) [deploy] 2019-12-19 15:28:00 -05:00
Molly Struve
36aed0458e create social preview for comment that is missing commentable (#5171) [deploy] 2019-12-19 11:14:37 -05:00
Matheus Azzi
662a99ade3 Remove unnecessary reaction call (#5122) [deploy]
Clicking the button to follow people on search page was erroneously
triggering a reaction request, thus not having the reactable_id.

We've updated the handlers not to trigger it.
2019-12-19 11:03:34 -05:00
Jacob Herrington
00dd84f9e1 Add a default message to badge award action (#5160)
* Add a default message to badge award action

Because:
 - The only badges routinely awarded manually use the same message
 - Right now, unfriendly/unsafe UI can result in an error notification

The only badges that are currently awarded manually (afaik) have the
message "Congrats!!!" so for the time being, if a message is not
supplied to the UI, it will simply use the "Congrats!!!" message as a
default.

That being said, I'm not totally convinced this message won't work for
the long term. Generally, if we are awarding badges by hand, I'd imagine
we'd want a specific message explaining why we are doing that, or just
be okay with "Congrats!"

After talking with Peter about it, the longer term goal should be to
move badge messages into the database so they can be modified in the app
and not hardcoded. That also make sense regarding the effort to
genericize the app eventually.

* Test Badge notifications
2019-12-19 10:38:57 -05:00
Ben Halpern
63f228c57c
Skip serviceworker logic for Twitter iOS referrals (#5159) [deploy] 2019-12-17 15:21:17 -05:00
Jacob Herrington
d98f8237bd Add view for managing organizations (#5149) [deploy]
* Add view for managing organizations

This adds only an index and show action for the internal/organizations
page. Eventually we'll flesh this out with features to automate the more
mechanical org management tasks.

* Use instance variable for search query

* Convert multiple expects into one

* Add pagination to organizations

* Add search spec for organizations

* Use size over count
2019-12-17 12:07:11 -05:00
Ben Halpern
4349843c05
Frontend bug fixes (#5158) [deploy]
* Frontend bug fixes

* One line fix
2019-12-17 10:56:51 -05:00
Ben Halpern
4eb0477223
Fix feedback_messages styling (#5147) [deploy] 2019-12-16 19:00:21 -05:00
Ben Halpern
3d0ae601fb
Remove unnecessary catch (#5144) [deploy] 2019-12-16 15:28:11 -05:00
Abner Soares Alves Junior
536c62da89 Refactor all has_enough_credits to enough_credits (#5119) 2019-12-16 15:00:59 -05:00
Ben Halpern
1e34a2d8f9
Move navbar rendering JS inline (#5141) [deploy] 2019-12-16 14:48:02 -05:00
Ben Halpern
500ec5d3b0
Guard for presence of page-content in JS (#5138) [deploy]
* Guard for presence of page-content in JS

* Modify offline states sw

* Change from skipping . to skipping .js and .css

* Bump static cache version
2019-12-16 14:02:59 -05:00
Ben Halpern
630c1b7425
Migrate to streaming app shell via serviceworkers (#5020) [deploy]
* Initial work for streaming app shell way of using serviceworkers

* Close in on serviceworker adjustment finalization

* Add docs and loading indicator

* Remove useless code

* Don't run on API

* Update app/javascript/contentDisplayPolicy/hideBlockedContent.js

* Fix small details

* Don't run serviceworker.js code in test env

* Fix JS in serviceworker

* Move private keyword to proper place in async controller

* Change shell_version to HEROKU_SLUG_COMMIT

* Update caching config

* Add test for async_info/shell_version
2019-12-16 12:21:33 -05:00
Jacob Herrington
35ede32be7 Internal bulk badge awarder (#5110) [deploy]
* Move admin specs

These tests should probably be grouped together, so I moved them into a
directory called "internal"

This also encourages some additional internal tests.

* Add an internal badges controller

* Add internal view for running BadgeRewarder task

Because:
  - Peter is currently running this rake task from Heroku and this is
  going to make his workflow easier
  - It's a step towards having a decent tool under internal for managing
  badges (though I'd hesitate to call this decent)

This change adds a view and controller action to award badges in
batches, it's an improvment over the current workflow that Peter is
using, but it's still very rough around the edges.

We could definitely improve this with some error handling around the way
the BadgeRewarder works, but for now this is a net gain over how Peter
has been doing this task. I think it's worth merging as is and future
work to improve the experience and reliability of this tool can be
prioritized against other tasks.
2019-12-16 11:31:37 -05:00
John Curcio
145c76bc08 Fix fullscreen button issue by allowing popups (#5115) [deploy] 2019-12-16 08:26:07 -05:00
Ben Halpern
b599b66ce1
Cosmetic adjustment + code cleanup for article/mod page (#5105) [deploy]
* Cosmetic adjustment + code cleanup for article/mod page

* Remove br tags and clean up css
2019-12-15 17:43:24 -05:00
Molly Struve
cc808251ee Remove unused aggregation reaction cache (#5104) 2019-12-13 13:18:44 -05:00
Spencer
82f5bb9cdd Mod tooling: add tags via /mod refactor (#5017)
* mod view form changes

* add error validation for removal tag

* add error validation to tag_list count

* re-render tag_adjustment form errors

* refactor admin delete adjusted tags form

* add prompt to tag adjustment form select

* front end validations to add/remove tag_adjustment

* allow tag_mod to undo own tag adjustment

* update/add specs

* update send spec

* update tag adjustment spec
2019-12-13 13:02:45 -05:00
Nick Schwaderer
b7bb7b473c Respond to xml request with error on Articles#feed (#5077) 2019-12-13 12:30:26 -05:00
Ben Halpern
9682394831
Remove unnecessary notifications fragment cache (#5083) [deploy] 2019-12-13 11:37:55 -05:00
Molly Struve
c8e712b6c8 remove caches for html that contains no external requests (#5098) 2019-12-13 08:22:27 -05:00
Jacob Herrington
b34ae9b7d9 Remove dead code (#5090) [deploy] 2019-12-12 12:19:55 -06:00
Andrew Sverdrup
2af033fca9 Add Next Tech Liquid Tag (#4958) [deploy]
* Add liquid tag for Next Tech

* Add liquid tag for Next Tech

* Use project share URL in liquid tag.

* Update docs and specs with share token URL.
2019-12-10 15:19:30 -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
James Turner
b4507f21d4 Update itemprop to use mainEntity (#5060) 2019-12-10 14:43:24 -05:00
Sarthak Sharma
4db5399ee8 Feature🚀: Ability to Delete Messages realtime (#5056)
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added
2019-12-10 13:58:34 -05:00
Molly Struve
90712f61c6
Remove memcache dalli gem and setup code (#5057) [deploy] 2019-12-09 11:37:53 -06:00
Ben Halpern
7285b55aaf
Add under-article article boxes (#5031) [deploy] 2019-12-06 18:15:43 -05:00
Ben Halpern
19990b0ce0
Add additional content back in (#5030) [deploy] 2019-12-06 17:52:41 -05:00
Ben Halpern
538f3cd29d
Temporarily remove extra cache-oriented content (#5028) [deploy] 2019-12-06 16:33:47 -05:00
Terence Eden
390192afba Add SRI Support (#4658) [deploy] 2019-12-06 08:35:37 -05:00
Molly Struve
834eb51e98
Replace Airbrake with Honeybadger (#5007) [deploy] 2019-12-05 11:29:51 -06:00
John Curcio
02c2a0808f Add publication date to medium liquid tag (#4961) (#5002) [deploy]
* Add publication date to medium liquid tag

* Add time tag to publication date and fix timezone issue
2019-12-05 11:19:10 -05:00
Ben Halpern
585d672742
Replace serviceworker-rails gem with custome implementation (#4987) [deploy]
* Customize UserContext in Timber logs

* Replace serviceworker-rails gem with custome implementation
2019-12-03 08:50:56 -05:00
Molly Struve
247833a952 Remove unused giveaways code (#4989) [deploy] 2019-12-02 15:23:28 -05:00