Commit graph

1228 commits

Author SHA1 Message Date
Ben Halpern
8bcf95b3ec
Disallow /mod/ in robots.txt (#6562) [deploy] 2020-03-10 14:24:33 -04:00
Ben Halpern
77f0581673
Remove flash notice to avoid cache leak (#6570) [deploy] 2020-03-10 13:22:46 -04:00
Mac Siri
80088c51ab
Skip /welcome in serviceworkers (#6561) [deploy] 2020-03-10 09:27:04 +01:00
Mac Siri
8e4905522d
Implement KatexTag (#6237) [deploy]
* Install Katex gem

* Add Katex stylesheet and spec

* Implement basic error handling

* Remove comment

* Create more spec

* Update approval file

Changes is due to turning off RedCarpet's superscript feature

* Add instruction to _editor_guide_text

* Serve our own KaTeX css

* Apply Rhyme's suggestion

* Limit Katex's css use

* Update spec

* Add spec

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-09 17:58:54 -04:00
Anna Buianova
99cabcbf6b
Removed unused campaign settings (#6532) [deploy] 2020-03-09 12:59:54 -04:00
rhymes
d7717e6eff
Re-enable correct operation of liquid tags with scripts in articles (#6473) [deploy]
* Re-enable correct operation of liquid tags with scripts in articles

* Fix typo
2020-03-09 12:47:13 -04:00
Ben Halpern
1cd38b55fd
Skip /ahoy/ in serviceworkers (#6547) 2020-03-09 12:32:00 -04:00
Fernando Valverde
0bc7b0ea21
Podcast playback update for iOS app native implementation (#6035) [deploy]
* First experiment with supressing audio playback on native iOS

* Adds load audio message posting

* First version of refactor working on web

* handlePodcastMessages now receives messages sent into JS from native iOS app

* bump back to "v2" local storage key or playback state

* terminatePodcastBar now clears the currentAudioState

* function getMediaState now initializeMedia, fixes audioExistAndIsPlaying for web, better playAudio error management & others

* Fixes bug in playAudio() & clears audioInitialized when no Podcast was initialized

* Codeclimate tweaks

* Reorders functions to comply with codeclimate

* More codeclimate reordering & fixes

* Upgrades the audio bridge messages to JSON instead of strings

* codeclimate doh
2020-03-09 12:09:42 -04:00
rhymes
21fca3e0f2
Comments API: hide deleted and hidden comments (plus docs) (#6482) [deploy]
* Modernize index test

* Hide comments body_html and user info if the comment is either deleted or hidden

* Shorten lines a bit

* Freeze repeated strings

* Document all /comments

* Document /comments/{id}
2020-03-07 09:02:10 +01:00
Ben Halpern
4eb0080eee
Let mods mark articles that require approval as approved. (#6513) [deploy]
* Initial work to add approval to regular mod flow

* Add article_approvals controller and tests

* Add check for moderatable being article
2020-03-06 19:49:41 -05:00
Michael Kohl
555cb2d69e
Consistently use cache_key_heroku_slug (#6495) 2020-03-06 16:35:35 -05:00
Michael Kohl
183c24ca59
Show hidden comments on article mod page (#6493) 2020-03-06 16:12:07 -05:00
Andy Zhao
478d1b36a5
Hide banished users vomit confirmations and delete vomit reactions on banish (#6507) [deploy]
* Update to hide only banished users

* Refactor and move into a model method

* Delete vomits on banished users

* Add tests for banishing users
2020-03-06 15:35:30 -05:00
Jacob Herrington
7ebde59b62
Convert internal listing table view to bootstrap (#6486)
* Convert internal listings index table to bootstrap

* Add some eager loading to internal listings

This should cheer bullet up some!
2020-03-06 20:03:24 +01:00
Michael Kohl
8df0a72ce7
Move onboarding tags from public to internal API (#6329)
* Move onboarding tags from public to internal API

* Fix typo

* Undo wrong chang
2020-03-06 19:34:31 +01:00
Michael Kohl
0fd6c948d1
Move followings to internal API (#6494) 2020-03-06 19:33:26 +01:00
Ben Halpern
e19a1a43be
Small fixes/adjustments (#6501) [deploy] 2020-03-06 09:28:42 -05:00
Ben Halpern
afc8594dd9
Switch from cookies to localstorage for hero banner (#6498) [deploy] 2020-03-06 08:54:36 -05:00
Ben Halpern
2a1a675175
Changed shecoded preview template (#6475)
* Changed shecoded preview template

* Added a test for social preview template with multiple campaign tags

* feat: update some css properties to make it closer to the design (i think)

* Update to relative units

* Update spec

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-05 18:26:28 -05:00
Vaidehi Joshi
10cee2ec5c
Add a mascot_user_id to SiteConfig (#6483) [deploy]
* Add a mascot_user_id to SiteConfig

Also allow it to be updated from /internal/config pages.

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Add spec for updating mascot_user_id

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2020-03-05 12:44:59 -08:00
rhymes
7e39262738
Disable service worker on /search endpoints (#6375) [deploy] 2020-03-04 10:45:03 -05:00
Ben Halpern
1a95597ccd
Fix style issues on liquid tag embed page (#6445) [deploy] 2020-03-04 10:40:34 -05:00
rhymes
f3e76e7fe5
Improve API docs for articles, add listings to it and fix bugs (#6413) [deploy]
* Fix articles index state param values

* Update Articles API docs

* Fix ClassifiedListing.cost_by_category with invalid category

* Add docs for GET|POST /listings and fix bugs

* Document PUT /api/listings/:id

* Add docs for /listings/category/{category}

* One variable down

* Improve listings update error handling
2020-03-04 15:30:02 +01:00
Ben Halpern
883264c8ab
Do not render or link to empty rss feeds (#6429) [deploy]
* Do not render or link to empty rss feeds

* Fix tests up
2020-03-03 21:37:51 -05:00
cyrillefr
fe57053c44
Fixe html_safe issues from comment domain (#6422) 2020-03-03 15:38:15 -05:00
Jacob Herrington
b5e7521676
Skip vomit reactions on banned users (#6432) [deploy]
Just a quick fix to filter banned users out of the vomit reaction lists,
we are doing essentially the same thing for unpublished articles. It
might worth handling this at the controller level if we experience any
performance issues.
2020-03-03 15:21:37 -05:00
Andy Zhao
c830a1e24b
Check presence of auth_data_dump (#6431) 2020-03-03 15:05:39 -05:00
Ben Halpern
1dc1723709
Add field test gem to establish a/b testing (#6283) [deploy]
* Initial field test spec work

* Clean up specs

* Fix codeclimage

* Cleanups

* Update names

* Rename and remove need to pass logged in status

* Leadup to prod: two experiments

* Move test logic to controller and add tests

Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
2020-03-03 10:21:29 -05:00
cyrillefr
dea823b6ec
Excludes some files from linting and deletes redundancies (#6275) 2020-03-02 12:50:36 -05:00
Ben Halpern
3c8422c8d5
Add social image to internal/pages form (#6401) [deploy] 2020-03-02 11:38:01 -05:00
Ridhwana
dee8d39fe7
Ridhwana/Remove shecoded (Please do NOT merge as yet) (#6357) [deploy]
* chore: remove she coded route

* chore: remove the shecoded page

* chore: remove some assets

* chore: remove shecoded pages controller action
2020-03-02 10:20:42 -05:00
Ben Halpern
08cbb837f2
Fix editor style bugs (#6399) [deploy] 2020-03-02 10:12:10 -05:00
Anna Buianova
b36d2e72ff
Started moving sponsorships to /internal (#6355) [deploy]
* Started moving sponsorships to /internal

* Moving sponsorships to /internal

* Improved /internal/sponsorships

* Added destroying sponsorships to /internal

* Rename sponsorships creator in internal
2020-03-01 12:48:47 -05:00
Ben Halpern
e00a08ba82
Small CSS fixes (#6381)
* Small CSS fixes

* Minimal width notifier
2020-03-01 12:46:13 -05:00
Mac Siri
9f58b12f67
Make localstorage draft respect newer saved draft (#6343) [deploy] 2020-02-28 15:17:21 -05:00
Nick Taylor
f6e99dec8b
Nickytonline/homepage main feed component (#6164) [deploy]
* wip

* Removed reference to cached_tag_list as the feed enpoint only returns tag_list now.

* Removed reference to cached_properties.

* Updated <CommentsCount /> and <TagList /> to support additinal className

* wip

* wip

* Undid init scrolling for Algolia articles

* Converted homePageFeed.jsx to an ERB template to access Sprockets.

* Now the homePageFeed.jsx files is an ERB so it can load Sprockets assets.

* wip

* Removed accidental commit of debugger statement in ERB.

* Now different feed time frames are loaded based on the homepage feed tab clicked.

* Prevent default Algolia paging when on the homepage.

* Added a tiny comment about feed time frame.

* Now feed loads properly for each time frame on home page.

* prop name refactor.

* Reneabled default Algolia scrolling.

* On the homepage, we no longer overwrite article HTML with Algolia data for initial articles.

* Assumption is the proper URL for main_image of featured article will be sent in the feed.

* Fixed Google Analytics for featured article.

* No longer need the new-feed ID for checking if we're on the homepage.

* Trying to make codeclimate happy.

* wip

* Removed reference to cached_tag_list as the feed enpoint only returns tag_list now.

* Removed reference to cached_properties.

* Updated <CommentsCount /> and <TagList /> to support additinal className

* wip

* wip

* Undid init scrolling for Algolia articles

* Converted homePageFeed.jsx to an ERB template to access Sprockets.

* Now the homePageFeed.jsx files is an ERB so it can load Sprockets assets.

* wip

* Removed accidental commit of debugger statement in ERB.

* Now different feed time frames are loaded based on the homepage feed tab clicked.

* Prevent default Algolia paging when on the homepage.

* Added a tiny comment about feed time frame.

* Now feed loads properly for each time frame on home page.

* prop name refactor.

* Reneabled default Algolia scrolling.

* On the homepage, we no longer overwrite article HTML with Algolia data for initial articles.

* Assumption is the proper URL for main_image of featured article will be sent in the feed.

* Fixed Google Analytics for featured article.

* No longer need the new-feed ID for checking if we're on the homepage.

* Added postcst episodes to <Feed /> state.

* Breaking up Article.jsx to make codeclimate happy.

* wip

* Created the <TodaysPodcastEpisodes /> and <PodcastEpisode /> components.

* Fixed issues with some components that were updated for the <FeaturedArticle />

* Added tests for <FeaturedArticle />

* Barreled up <FeaturedArticle />

* Added Storybook stories for <FeaturedArticle />

* Featured articles don't display org, so removed that test.

* Added proper today's podcasts components to feed.

* Converted some leftover ERB + removed pro checkmark as it doesn't exist yet.

* Now logic is same as master for feed timeframe.

* Updated <FeaturedArticle /> snapshots.

* On frontpage, bookmark button state is managed by Preact components now.

* bookmarkedFeedItems is now a prop on <Feed />.

* Fixed logic check for initializing reading list icons.

* Now <Article /> and <FeaturedArticle /> receive a bookmarkClick prop.

* Removed beginnings of scroll handler in <Feed /> as we're using what's there already for now.

* Removed logic to not show main image on other time frame feeds as it was not correct.

* Fixed issue with 0 rendering when no podcast episodes in feed.

* Converted <SaveButton /> to a stateful component.

* wip - <Feed /> render prop now passes bookmarked feed item ID set and a click event.

* Moved FEED_ICONS to an export so it's easier to use JSX/JS in <Feed />

* Moved <Feed /> into article components.

* Now reading list save buttons work properly in Preact components.

* Fixed issue with Save buttons in Algolia paging/<Feed />

* Updated snapshots.

* Took <Feed /> out of articles barrel file as jest was trying to import FEED_ICONs which is an ERB template.

* Now the Preact feed is dynamically imported.

* Now the Preact <Feed /> only loads for a logged on user.

* Fixed <FeaturedArticle /> so that the save button behaves properly now.

* Updated article stories for Storybook.

* Putting this back to the order it was because I've removed my code changes for this block.

* Fixed when renderFeed is imported for a logged on user.

* Add podcasts to feed and render home from server

* Add padding to feature laoding div

* Update tests

* Add more loading articles

* Fix conflicts

* Add readinglist javascript to initscrolling

* Ensure first article is one with image

* Organize feed items outside of feed instead of in it

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
2020-02-28 14:14:47 -05:00
rhymes
6795be006d
Don't run the service worker on /enter (#6353) 2020-02-28 12:35:15 -05:00
ludwiczakpawel
66e0637e4c
CSS cleanups (#6274) [deploy]
* move kbd where it should be

* initial cleanup

* do we even need that?

* sponsorships

* cleanups on articles.scss mostly

* initial cleanups to scaffolds

* moving cheese around

* color variables, variables cleanups

* adding spacing units

* variables cleanup

* adding topbar height variable

* a bit of top-bar refactor

* a bit of top-bar refactor

* a bit of top-bar refactor

* simpler animation

* top bar search and responsivness

* loggged out version

* remove unnecessary comment

* fixing svg icons

* search cleanup

* top bar cleanups

* .

* dropdown in header

* removing fill from svgs to make them work in other themes

* remove test element

* topbar icons recreated

* Whoops

* variables naming

* .

* whoops
2020-02-28 07:39:09 -06:00
Anna Buianova
df93e8d41e
Custom social preview template for tags (#6290) [deploy]
* Custom social preview template for tags

* Added index on tags social_preview_template + small refactoring

* Add checks if index exists to tags migration
2020-02-27 17:56:21 -05:00
Anna Buianova
946a94e560
Removed misleading information about sponsorships renewal (#6257)
* Removed misleading information about sponsorships renewal

* Change the spec not to rely on sponsorship auto-renewal info
2020-02-27 17:55:12 -05:00
Anna Buianova
bef07a5834
Add nav_image and dark_nav_image fields to org settings form (#6336) [deploy] 2020-02-27 17:33:52 -05:00
Vaidehi Joshi
3bc0f49861
Only send notifications that belong to an active broadcast (#6319) [deploy]
* Use active in place of sent on internal broadcast routes

* Add and use active scope on broadcasts

* Update seeds + specs to use active broadcasts

* Add note about active broadcasts to /internal/broadcasts page
2020-02-27 08:02:45 -08:00
Molly Struve
65a3420952
Use debounce to limit Chat Channel Searches (#6322) 2020-02-27 10:50:21 -05:00
Molly Struve
9863d70b57
Remove algolia from chat channel memberships (#6323) 2020-02-27 09:59:12 -05:00
Andy Zhao
ac58bbeeb9
Only show the ghost option if user has content (#6313) 2020-02-26 14:10:13 -05:00
Jacob Herrington
4b47611764
Remove existing mods from potential mod list (#6235) [deploy]
This is a request from Peter, and it should make searching for potential
admins a bit less tedious.
2020-02-26 12:14:28 -05:00
Anna Buianova
e59e523ace
Hide information about expired sponsorships from "partnerships" pages (#6308)
* Hide information about expired sponsorships from the tag and level sponsorships

* Removed initial notes from sponsorships specs
2020-02-26 11:26:39 -05:00
Michael Kohl
6ad74517d7
[deploy] Remove github_repos from public API (#6304) 2020-02-26 11:23:39 -05:00
Anna Buianova
e2cb359b2d
Change sidebar campaign view (#6228) [deploy]
* Changed sidebar campaign view

* feat: update the hml of the campaign sidebar config (do not show broken image if the link has not been set)

* feat: update the html and css to make it look like Figma

* chore: revert the classname change as we use write elsewhere

Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2020-02-26 10:36:18 -05:00
Mac Siri
d8f247661c
Add accept attribute to the video upload (#6296)
* Provide fallback for PREFERRED_EMAIL_NAME

* Specify file type for video upload
2020-02-26 08:37:47 -05:00