Commit graph

1134 commits

Author SHA1 Message Date
rhymes
c41d66e900
Replace ban/banned with suspend/suspended in user facing text (#5816) [deploy] 2020-02-10 10:12:53 -05:00
Anna Buianova
1c94ffb38e
Added template select to the pages admin form (#5952) [deploy] 2020-02-07 14:59:05 -05:00
Ben Halpern
2c07b08514
Add low-value landing pages to robots.txt disallow (#5944) [deploy]
* Add low-value landing pages to robots.txt disallow

* Update app/views/pages/robots.text.erb

* Update app/views/pages/robots.text.erb
2020-02-07 14:04:36 -05:00
ludwiczakpawel
45f2a6b542
removing border-box from shecoded landing page (#5949) 2020-02-07 11:08:46 -05:00
Sebastien
665f5aac0f
Refactor ProfileImage (#5803) 2020-02-07 08:56:16 -05:00
Michael Kohl
4872422373
Remove extra whitespace from text inputs in Buffer share (#5924) [deploy] 2020-02-06 15:18:58 -05:00
Andy Zhao
975a716e5e
Use simpler messaging for ghost account deletion (#5906)
* Use simpler messaging for ghost account deletion

* Add 'have questions' section

* Use same language for confirm destroy page
2020-02-06 14:31:18 -05:00
Deepu K Sasidharan
5194c009ce
Style: update height of speakerdeck tag to be avoid scaling (#5818)
* style: update height of speackerdeck tag to be avoid scaling

* style: remove incorrect padding and margin from speackerdeck tag

* add a comment
2020-02-06 14:29:34 -05:00
rhymes
fd5643bc9d
Improve API controllers efficiency by selecting only columns needed for serialization (#5805) [deploy] 2020-02-06 07:36:56 -05:00
rhymes
a95877e8ff
Use cleverer patterns to fetch/iterate AR objects when checking presence (#5833) [deploy] 2020-02-05 08:21:20 -05:00
Vaidehi Joshi
a396d024de
Remove quotes from broadcast options in internal form (#5904) [deploy] 2020-02-04 12:37:28 -08:00
Michael Kohl
9e6a363cfc
Add readonly ApplicationConfig to /internal/config (#5662) [deploy]
* Add readonly ApplicationConfig to /internal/config

* Incorporate PR feedback

* Remove spurious div
2020-02-04 15:13:34 -05:00
Vaidehi Joshi
267e08f6f0
Improve dropdown UX for internal/badges (#5880) [deploy]
* Improve dropdown UX for internal/badges

Add a "blank" option to the dropdown to list of badges on internal/badges route.
Also add some checks to handle if an admin accidentally tries to award a "blank" badge.

* Ensure error is surfaced as flash message
2020-02-04 09:02:14 -08:00
Mohamed ABDELLANI
058f6a2939
Remove footer rendering from shecoded.html.erb (#5823) 2020-02-03 17:02:01 -05:00
Jacob Herrington
e8130565e1
Add whitespace to internal users edit page (#5840)
Co-authored-by: MichaelaHunter <michaela1234@gmail.com>

Co-authored-by: MichaelaHunter <60361569+MichaelaHunter@users.noreply.github.com>
2020-02-03 11:34:31 -05:00
Ben Halpern
82f2281b1c
Create dynamic robots.txt page (#5794) [deploy]
* Create dynamic robots.txt page

* Add tests and remove cachebust
2020-01-28 16:49:34 -05:00
Ben Halpern
ac222865ac
Use page location as indicator for page load (#5735) [deploy] 2020-01-27 16:12:26 -05:00
rhymes
397ef313de Improve video controllers caching and retrieving (#5709) [deploy]
* Add tests and improve pagination and caching

* Add two more specs

* Add .with_video scope

* Get rid of N+1

* Only select needed columns

* Improve efficiency of the video page as well

* Add missing set_cache_control_headers to API videos#index
2020-01-27 15:51:12 -05:00
Sebastien
a25446b1d4 Add organizations to user profile (#5583) [deploy]
* Add organizations to user profile

* Add user organization info updated at column and cache key

* Remove default value for users organization_info_updated_at column

* Update organization_memberships factory

* Remove schema organization_info_updated_at default value

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-01-27 13:31:27 -05:00
rhymes
e582e2a245 Don't use the service worker for the feed (#5734) 2020-01-27 12:56:39 -05:00
Molly Struve
ebf43209a5
Handle Missing Root Comment in Deleted Comment View (#5716) 2020-01-27 08:44:00 -05:00
Ben Halpern
d81f407394
Remove non-indexable logged-out links (#5713) [deploy]
* Remove non-indexable logged-out links and add nofollow elsewhere

* Remove nofollow part of PR
2020-01-27 07:54:49 -05:00
Ben Halpern
071ec03a3c
Fix article description issues (#5679) [deploy]
* Fix article description issues

* Move tag info to decorator

* Fix description edge cases

* Fix description creation logic

* Fix test and adjust naming

* Modify line in processed_description
2020-01-26 14:43:11 -05:00
Jacob Herrington
3e99fb527f Add StimulusJS and Refactor Internal article_script (#5539) deploy]
* Add StimulusJS 1.1.1

Because:
- Internal will likely need more interactivity going forward
- Vanilla JS and jQuery are great, but aren't quite as organized as we
might like
- Stimulus fits our model of what internal should be (imo)
- Adopting Preact or something with templating would require rewriting a
bunch of erb (that is currently working just fine)

Stimulus is a JavaScript framework that directly compliments turbolinks
and the approach vanilla Rails takes to JavaScript. I've set it up to
specifically be used in the internal views where we are currently using
jQuery and vanilla JS. I think we should chip away at the vanilla JS
currently in place with this, which appears to be both scalable and
pragmatic exactly the sort of tool we want for building our internal
tools.

* Replace crufty article JS with Stimulus

I'm swapping out some of the stuff going on in article_script.erb with
some StimulusJS, it seems like a good test case for Stimulus.

This lets us organize the code a little more intentionally and hopefully
fixes a small performance complaint that Michael had.

* Rename uncommunicative methods

* Add unit tests for Stimulus classes

* Move Stimulus code to javascript/internal
2020-01-24 16:00:24 -05:00
Josh Puetz
7444b315a4 Fix capitalization in settings placeholders (#5707) 2020-01-24 14:08:32 -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
Ben Halpern
8ed94c8fb1
Add conditional to prevent superfluous rerenders in chat compose (#5705) [deploy] 2020-01-24 11:23:48 -05:00
Spencer
49474d516e Allow comments from deleted articles to be viewed (#5199) [deploy] 2020-01-24 11:06:52 -05:00
Sarthak Sharma
75608e3e55 Feature🚀: Ability to mention anyone in open chats and notify them (#5460) [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

* Feature 🚀 : Ability to mention member in Group [Frontend]

* Test Cases📝 : Test Cases added

* Feature 🚀 : Ability to mention member in Group [Backend]

* Bug Fix 🐞: Making messages realtime for open channels

* Feature 🚀 and Bug Fix 🐞: Ability to get notification if mentioned in open messages and increasing message number count

* Feature 🚀 : Ability to remove message count on channel open

* Bug Fix 🐞: Making Notification more reliable by checking if the new message is notified to user or not

* Feature 🚀 : Ability to metion @all and notify them

* Bug Fix 🐞: Minor fixes

* Fews tweaks in code

* Bug Fix 🐞: Feature was not present for Invite only Section

* Bug Fix 🐞: In open channels one can't mention all

* Bug Fix 🐞: Markdown conversion for all only in case of invite only

* Specs added

* Delete schema.rb

* Schema file updated

* Code refactoring

* Further Code refactoring backend

* Further Code refactoring backend

* Bug Fix 🐞: Mention List error problem in switching tabs

* Test Snapshots added

* Feature 🚀 : Ability to mention member in Group [Frontend]

* Test Cases📝 : Test Cases added

* Feature 🚀 : Ability to mention member in Group [Backend]

* Bug Fix 🐞: Making messages realtime for open channels

* Feature 🚀 and Bug Fix 🐞: Ability to get notification if mentioned in open messages and increasing message number count

* Feature 🚀 : Ability to remove message count on channel open

* Bug Fix 🐞: Making Notification more reliable by checking if the new message is notified to user or not

* Feature 🚀 : Ability to metion @all and notify them

* Bug Fix 🐞: Minor fixes

* Fews tweaks in code

* Bug Fix 🐞: Feature was not present for Invite only Section

* Bug Fix 🐞: In open channels one can't mention all

* Bug Fix 🐞: Markdown conversion for all only in case of invite only

* Specs added

* Code refactoring

* Further Code refactoring backend

* Further Code refactoring backend

* Bug Fix 🐞: Mention List error problem in switching tabs

* Test Snapshots added

* Feature 🚀: Ability to navigate through user list with keyboard only

* Bug Fix 🐞: Changing color of group avatars in dark themes

* Bug Fix 🐞: Setup pusher channel for open channels also
2020-01-23 18:06:35 -05:00
Michael Kohl
d82bbb874e Add rate limits to admin interface (#5642) 2020-01-22 15:29:27 -05:00
Shelley Vohr
b146528aa8 feat: add per-user Open Dyslexic font setting (#5037) [deploy]
* feat: add per-user Open Dyslexic font setting

* Adjust css slightly

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-01-20 18:23:57 -05:00
Ben Halpern
7bd1d8afda
Change font size for search and message input (#5572) [deploy] 2020-01-18 14:53:54 -05:00
Jacob Herrington
8db4808d2e Internal Reports: Searching and sorting with Ransack (#5447) [deploy]
* Add gem Ransack 2.3.0

* Add sorting and search to internal/reports

The UI here should probably be revisited sooner or later, I feel like
the vomit reactions might even need to be moved to their own view.

* Add system spec for internal reports search

* Remove filter for report_type
2020-01-16 15:02:09 -05:00
Michael Kohl
e946e2d7cf Update settings links + descriptions in editor guide (#5473) 2020-01-15 16:37:35 -05:00
rhymes
7bfb255627 Remove unnecessary heroku slug commit values in cache keys (#5524) 2020-01-15 12:35:16 -05:00
rhymes
bcd85452e9 Comments API: fix caching issues (#4744) [deploy]
* Use ancestry in the index and add test

* Add tests for show action

* Return complete comments trees for index, kill n+1 and use correct edge cache key

* Return complete comments tree for show, kill n+1 and use correct edge cache key

* Refactor tests and add surrogate keys tests

* Preload users for the whole subtree

* Clarify explanation of the edge cache keys construction

* Refactor partials

* Remove action caching

* Replace .map.flatten with .flat_map

* Fix surrogate key prefix according to Fastly docs

* Add comment.purge to Comments::BustCacheJob to use Fastly-Rails

* Fix surrogate key spec
2020-01-15 10:45:56 -05:00
Ben Halpern
e9252bcd10
Fix podcast NaN time issue (#5513) [deploy] 2020-01-14 15:30:11 -05:00
Ben Halpern
c0a7c17054
Modify podcast design details and functionality (#5472) [deploy]
* Modify podcast design details and functionality

* Adjust play button size

* Add heroku slug commit to some cache keys
2020-01-14 13:56:47 -05:00
Jacob Herrington
65c9989cf9 Add visual indication for listing buffer actions (#5411)
Michael asked that this behavior be extended to the buffer actions on
internal/listings as well.

We should probably look for an opportunity to refactor the JS currently
living in article_script.erb.
2020-01-14 12:03:58 -05:00
rhymes
9b2886979a ActiveRecord count optimizations (#5478) [deploy]
* Do not load messages in memory, just to count them
* Add Model.estimated_count
* Use Model.estimated_count in task record_db_table_counts
* Use size and estimated_count
* Use table_name so that .estimated_count works with all models
* Add comment to explain the .load.size + .each pattern
2020-01-14 12:03:38 -05:00
rhymes
c267526ed2 Remove temporary site config script and unused ENV var (#5455) [deploy] 2020-01-14 09:49:31 -06:00
Anna Buianova
851508f628 Fix a bug when user tries to delete an account while not having an email (#5486)
* Ask user to add email when deleting [WIP]

* Ask to provide an email before requesting account deletion

* Additional checks to make sure that user won't be deleted w/o an email

* Revert changes on confirm destroy view
2020-01-13 08:34:37 -05:00
Ben Halpern
150e31bbf0
Add oauth to list of skipped paths for service workers (#5441)
* Add oauth to list of skipped paths for service workers

* Fix comment
2020-01-10 13:41:10 -05:00
Ben Halpern
f78b89e763
Add suggested tags to SiteConfig (#5426) [deploy]
* Initial base work

* Add suggested tags config

* Downcase suggested tag input
2020-01-10 12:33:37 -05:00
Michael Kohl
47c77dbee9 Fix typo (#5428) 2020-01-10 08:42:22 -05:00
Jacob Herrington
0fd8172f86 Resize textarea to fill parent (#5420) 2020-01-10 08:38:46 -05:00
Jacob Herrington
2a8b133d82 Remove call to publish method on non-articles (#5418) [deploy] 2020-01-09 12:07:39 -05:00
rhymes
7dd2ae9fe0 Remove notifiable access from articles and comments notifications (#5415) [deploy]
* Add created_at to comment notification data

* Remove notifiable usage from notifications partials

* Fix typo
2020-01-09 10:19:45 -05:00
Jacob Herrington
41c3164553 Skip negative reactions for unpublished content (#5392) [deploy]
If content is unpublished it shouldn't be immediately necessary for
negative reactions to be acted on.

There is a higher touch solution here, but I'm not sure it's warranted.
2020-01-09 10:06:45 -05:00
rhymes
d2e96007c7 Fix (some) n+1/eager loading issues (#5294) [deploy]
* Remove mock from specs to test the actual Suggester

* Fix articles API top articles n+1

* Fix n+1 in articles API with state parameter

* Remove eager loading for organization dashboard

* Eager load notifiables in notifications only when needed

* Algolia does not like this
2020-01-08 18:48:24 -05:00