Commit graph

4301 commits

Author SHA1 Message Date
Ben Halpern
e00a08ba82
Small CSS fixes (#6381)
* Small CSS fixes

* Minimal width notifier
2020-03-01 12:46:13 -05:00
Ben Halpern
ec50515810
Remove parentheses when time ago not present (#6379) [deploy] 2020-02-29 14:05:45 -05:00
Ben Halpern
501f70bd9f
Fix width of article sticky sidebar (#6378) [deploy] 2020-02-29 13:08:10 -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
Alex
00bced6179
Refactor search specs to use index_documents helper (#6365) [deploy] 2020-02-28 11:08:46 -08:00
Ridhwana
0f9c9d2738
Sanitisation of Ads (#6361) [deploy] 2020-02-28 13:20:34 -05:00
rhymes
2b31a9b9ee
Allow different casings to be specified for syntax highlighting (#6354) 2020-02-28 12:36:27 -05:00
rhymes
6795be006d
Don't run the service worker on /enter (#6353) 2020-02-28 12:35:15 -05:00
Molly Struve
c8f5f3e9f6
add leading true to avoid debounce interrupting typing (#6358) [deploy] 2020-02-28 12:32:40 -05:00
rhymes
30e472edf6
Replace last SearchClient with Search::Client (#6359) [deploy] 2020-02-28 11:53:58 -05:00
rhymes
e27c9b77a3
Refactor Elasticsearch client access (#6307) [deploy]
* Add Transport module to Search
* Test public methods only
* Add Search::Client with exception handling
* Remove Transport and request do
* Replace SearchClient with Search::Client
2020-02-28 11:38:37 -05:00
Alex
e40c28117b
Search ClassifiedListings backend code (#6348)
* Add search methods

* Add spec for new search methods

* Add QueryBuilder for ClassifiedListing

* Add QueryBuilder spec for ClassifiedListing

* Refact build_query in ClassifiedListings

* Refactor logic for filter and query conditions

* Refactor index_documents to helper_method

* Update elasticsearch helper for single objects

* Refactor specs from stubbing to record update

* Update search and specs for query_builder

* Refactor set_size

* Update Search::ClassifiedListing

- Add DEFAULT_PAGE constant
- ADD DEFAULT_PER_PAGE constant
- Add pagination

* Fix paging

* Add pagination specs

* Remove manual Array conversion for Array.wrap()

* Change guard clause to .key? for readability
2020-02-28 10:51:33 -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
Josh Puetz
4cb60958dd
Add page and article limit options (#6349) [deploy] 2020-02-28 06:45: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
rhymes
66bc6cf698
Rephrase CORS availability (#6341) 2020-02-27 17:41:16 -05:00
Vaidehi Joshi
422cebf87e
Remove sent attribute from broadcasts table (#6350) [deploy]
Now that 6318 and 6319 have been merged, we no longer need the `sent` attribute on the Broadcast model.
2020-02-27 17:36:26 -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
Molly Struve
fdb8e131ea
Add debounce to Tag Search (#6327) [deploy] 2020-02-27 16:56:49 -05:00
Michael Kohl
32e30c8844
Mailchimp resubscribe (#6256)
* Re-subscribe user to newsletter by setting MC status to pending

* Add guard clause and new spec

* Make trait name more explicit

* Fix guard clause and spec
2020-02-27 15:48:38 -05:00
Josh Puetz
df98591d6d
Fix flapping test (#6346) [deploy] 2020-02-27 14:44:04 -06:00
Alex
d8c168941c
Update max line limit to 15 for RSpec files (#6344) [deploy] 2020-02-27 11:55:07 -08:00
Josh Puetz
47ec81cf14
Implement home page feed article ranking in Ruby (#6320) [deploy]
* WIP - JS feed logic ported to Rails

* Port JS ranking logic to ruby

* PR feedback, sort call from stories vs feeds controller

* Optimize `score_followed_tags`

* Optimize article ranking

* remove unused RankedArticle struct
2020-02-27 12:06:24 -06:00
Alex
037b2fa432
Fix pagination on Search::ChatChannelMembership (#6328) [deploy]
* Fix pagination logic

* Fix typo slig --> slug

* Add spec for returning empty Array vs nil

* Add spec for pagination

* Change expectation of test for empty Array
2020-02-27 09:56:05 -08:00
Ridhwana
55909afdc7
Make Hero Banner closable (#6333) [deploy]
* feat: set up an event handler that will allow close the banner and set a cookie when you've closed it

* feat: return early if the cookie says it shouldn't be shown

* refactor: make the names more general so that they can be applied to other campaigns
2020-02-27 12:06:37 -05:00
Mohamed ABDELLANI
da133bcbb5
Require body_markdown Be Present for Articles (#5982) [deploy] 2020-02-27 11:44:17 -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
cf94f76ccd
Notify slack when release phase fails (#6300) [deploy] 2020-02-27 10:50:59 -05: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
Michael Kohl
c8b56d1788
Add HtmlVariantSuccess and HtmlVariantTrial dashboards (#6262) [deploy]
* Add HtmlVariantSuccess and HtmlVariantTrial dashboards

* Add new dashboards to manifest
2020-02-27 08:34:10 -06:00
Molly Struve
c64ca9750c
Default search by active chat channel memberships only (#6325) [deploy] 2020-02-27 08:12:36 -05:00
Vaidehi Joshi
81e2a5efc3
Add active attribute to Broadcasts (#6318) [deploy]
* Add active attribute to Broadcasts

* Backfill active attribute on Broadcasts
2020-02-26 16:44:27 -05:00
Molly Struve
0e75b091e8
only show users their active channels (#6321) [deploy] 2020-02-26 16:24:02 -05:00
Michael Kohl
ec8ee54559
Delete classified listings when deleting user (#6258) 2020-02-26 14:44:09 -05:00
Andy Zhao
ac58bbeeb9
Only show the ghost option if user has content (#6313) 2020-02-26 14:10:13 -05:00
rhymes
2fcdb9bcaa
Use DataUpdateScript.scripts_to_run? in development (#6309) 2020-02-26 13:34:16 -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
Molly Struve
8f0bfa5e08
Implement Search for Chat Channels with Elasticsearch (#6282) [deploy] 2020-02-26 11:06:38 -05:00
rhymes
fc09716709
Use builtin Rails index_exists? for indices (#6293) 2020-02-26 11:05:23 -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
Fernando Valverde
5bb9890c09
Adds administrate gem CSS & JS assets to Sprockets Manifest (#6291) [deploy]
* Adds administrate gem application.css & applicatiion.js to Sprockets manifest

* Adds admin tests
2020-02-26 09:21:09 -06:00
Mac Siri
6d4925a17d
Ignore referer on /report-abuse if it's SW.js (#6295) [deploy] 2020-02-26 10:18:22 -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
rhymes
145d5e610e
Use scopes for Follow instead of where all the time (#6149) [deploy] 2020-02-25 19:29:52 -05:00
Juanito Fatas
cc09ed7cd1
Do not escape underscored username in code or codeblocks (#5785) [deploy]
It only runs when markdown has underscored usernames.

Skip escaping underscore when content is in code or codeblock. It works by
going through all lines of a markdown content. Find underscored username.
Escape if we are not in the codeblock.

The (?<!) is negative lookbehind which rules out the case
when a underscored username is present in code, e.g., `@_dev_` will not be escaped.
2020-02-25 17:30:08 -05:00