Commit graph

600 commits

Author SHA1 Message Date
Abraham Williams
9cb40e546b Enables Rails cops (#2186)
* Enable Rails cops

* Fix Rails/DynamicFindBy

* Fix Rails/HttpStatus

* Fix Rails/Blank

* Fix Rails/RequestReferer

* Fix Rails/ActiveRecordAliases

* Fix Rails/FindBy

* Fix Rails/Presence

* Fix Rails/Delegate

* Fix Rails/Validation

* Fix Rails/PluralizationGrammar

* Fix Rails/Present

* Fix Rails/Output

* Fix Rails/Blank

* Fix Rails/FilePath

* Fix Rails/InverseOf

* Fix Rails/LexicallyScopedActionFilter

* Add Rails/OutputSafety to TODO

* Add Rails/HasManyOrHasOneDependent to TODO

* Add Rails/SkipsModelValidations to TODO
2019-03-25 09:25:55 -04:00
Glenn Carremans
9470ad8e7f Bug fix broken giphy url (#2180) 2019-03-24 08:43:35 -04:00
Mike Coutermarsh
dd84051ce4 Social Card upgrade - Part 1 (#2090)
* Add HtmlCssToImage for generating images

This will be used by social_previews to convert the templates into images.

Setup a fallback image primarily for local dev, so that this won't cause
errors if authentication is missing.

Caching is setup to use contents of the html/css. So it with
autobust/generate a new image whenever the markup changes.

* Update Article social preview template to not be random

+ Being random breaks caching (since we generate cachekey by a SHA of html content)
+ Use Roboto for when generating via HTML/CSS to Image

* Update Tag social preview template to not be random

+ Make rand deterministic so it doesn't break caching

* Update user social preview template for html/csstoimage

* Update shecoded template to work with both url2png and htmlcsstoimage

* Add ability to respond to .png for social previews controller

When adding .png to the url, these routes will now generate an image and
redirect to it.

This leaves the existing pages as they were, so we're backwards
compatible with all the existing links out in the world.

* Fix merge conflicts

* Remove some duplication

* Improve spec descriptions/read better

* clean up setting template with a ternary
2019-03-22 16:28:02 -04:00
Jess Lee
1b0cb47916 Merge user and give pro users trusted role (#2176)
* remove pro privelges from other roles and add trusted role for pros

* add merge user routes and methods

* add specs

* add more specs

* update languauge on /internal for clarity

* fix code climate error
2019-03-22 16:20:31 -04:00
rhymes
b789e5d78d Add SRI to script tags where applicable (#2153)
* Add SRI to script tags

* Update app/views/articles/_hiring_form.html.erb

Good point :)

Co-Authored-By: rhymes <rhymesete@gmail.com>
2019-03-22 14:14:59 -04:00
Andrew Bone
e96bf2e329 Add discernible text for organization link (#2168) 2019-03-22 13:54:46 -04:00
Andy Zhao
1b4c50574a Update pro dashboard permissions for organization members (#2173) 2019-03-22 12:40:31 -04:00
Ben Halpern
7f27aa32c7
Add areas for DEV Shop displays on left sidebar (#2162)
* Add areas for DEV Shop displays

* Update display_ad spec

* Add organization to spec

* Add orgs to specs properly
2019-03-22 09:57:37 -04:00
rhymes
22ceaf7689 Remove klipse script unused partial (#2164) 2019-03-21 16:58:40 -04:00
Filip Defar
937bc63bbb Add list of followed organizations to dashboard (#2157) 2019-03-21 15:16:23 -04:00
rhymes
6435785017 Add alternative text for organization logo (#2148) [ci skip] 2019-03-21 12:52:22 -04:00
rhymes
df2621a8c0 Implement image upload's error handling (#2018) 2019-03-21 12:31:51 -04:00
Tim Lange
3494264404 Enabled rubocop/lint (#2130)
* WIP: Enabled rubocop/lint

* FIX: Fixed failing test

* FIX: Small change to return

* FIX: Changed indent
2019-03-21 10:53:44 -04:00
Tim Lange
d838f17f4b UX: Changed editor_version to a select field (#2107) 2019-03-20 13:34:02 -04:00
Jess Lee
d7860fa76c Removed unnecessary 'reason for warning' in internal (#2128) 2019-03-20 12:58:41 -04:00
Ben Halpern
c92c77396c
Add ability to set logo via ENV var (#2123) 2019-03-20 11:14:23 -04:00
Dave Follett
8434833d6a Update Tag removal's textarea (#2063) 2019-03-19 16:16:25 -04:00
Kristofer Selbekk
f352344fb2 Properly pluralize words on Dashboard (#2069) 2019-03-19 15:20:03 -04:00
Ben Halpern
9dfb363c86
Add theme to loading gradient, comment form, about author (#2117) 2019-03-19 14:52:04 -04:00
Ben Halpern
7bf37108b1
Night theme improvements + small fixes (#2114) 2019-03-19 13:36:30 -04:00
Andrew Bone
19a46edf9e add --theme-container-background-hover (#2116)
Add --theme-container-background-hover to the theme with #37475c
2019-03-19 12:00:50 -04:00
Ben Halpern
91bd6322ad
Add organic page view sums and modify seo boostables (#2109)
* Add organic page view sums and modify seo boostables

* Add score minimum for SEO boostable
2019-03-19 09:32:26 -04:00
Bolarinwa Balogun
da6a916412 Add link for tags everywhere they appear (#2088) 2019-03-18 17:10:23 -04:00
Jess Lee
9c1e10cd9f Improve Internal Dashboards features(#2043) 2019-03-18 16:29:11 -04:00
Ben Halpern
2b2ecaa115
Add proper css vars to user style config (#2105) 2019-03-18 15:22:23 -04:00
Andy Zhao
8a3d3ae765 Enable Org Pro Dashboard View (#2060) 2019-03-18 11:58:44 -04:00
Ben Halpern
e3760fc215
Add originally_published_at for more accurate crossposted info (#2076) 2019-03-16 18:11:39 -04:00
Keshav Biswa
8d57d45ecc Rubocop Style cops enabled (#2056)
* Rubocop enabled style/alias

* Enabled Style/ArrayJoin Cop

* Enabled Style/Attr

* Enabled Case Equality

* Enabled CharacterLiteral

*  Enabled ColonMethodCall Cop

* Enabled CommentAnnotation cop

* Enabled PreferredHashMethods Cop

*  Enabled DoubleNegation Cop

* Enabled EachWithObject Cop

* Enabled EmptyLiteral Cop

* Enabled EvenOdd Cop

* Enabled IfWithSemicolon Cop

* Enabled Lambda and LambdaCall Cop

* Enabled LineEndConcatenation Cop

* Enabled ModuleFunction Cop;

* Enable NegatedIf and NegatedWhile Cop

* Enabled NilComparison Cop

* Enabled Not Cop

* Enabled NumericLiterals Cop

* Enabled OneLineConditional Cop

* Enabled PercentLiteralDelimiters Cop

* Excluded internal/users_controller from negated_if cop

* Reverted the double negation change from github_issue_tag and github_issue.rb"

* Enabled PerlBackrefs Cop

* Changed Regexp.last_match(1) to Regexp.last_match(0)

* Enabled proc cop

* Enabled RaiseArgs Cop

* Reverted Regexp.last_match(0) to Regexp.last_match(1)

* Enabled SelfAssignment Cop

* Enabled SingleLineMethods Cop

* Enabled SpecialGlobalVars Cop

* Enabled VariableInterpolation Cop

* Enabled WhenThen Cop

* Enabled WhileUntilModifier Cop

* Enabled WordArray Cop

* Enabled IfUnlessModifier Cop

* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
Mario See
d8709c0334 Implement open inbox for dev-connect (#1563) 2019-03-15 14:39:57 -04:00
Ali Spittel
18a111418b a couple bug fixes for the pro dashboard! (#2070)
* give the pro dashboard a dashboard-y makeover

* make background color for the cards white

* fix a couple bugs, make greater greator or equal

* add markup and styling for skip link (#2062)

* fix a couple bugs, make greater greator or equal
2019-03-15 13:59:23 -04:00
Ben Halpern
d6ab255a45
Allow users to configure to use night mode (beta) and sans-serif article body (#2072)
* Initial work for config

* Add config for users

* Fix schema
2019-03-15 13:11:53 -04:00
Ryan Killeen
365a3513dc add markup and styling for skip link (#2062) 2019-03-15 10:46:09 -04:00
Ali Spittel
e45f9cca03 give the pro dashboard a dashboard-y makeover (#2058)
* give the pro dashboard a dashboard-y makeover

* make background color for the cards white
2019-03-13 17:34:40 -04:00
Ben Halpern
be0f55f9f4
Remove shecoded sidebar (#2059) 2019-03-13 17:34:02 -04:00
rhymes
6a9b97b30d Use numerical input for tags points (#2057) 2019-03-13 15:34:37 -04:00
Anna Buianova
343f109c0f Optimize stories (#1988)
* Add db index to articles path

* Slight stories optimizations

* Select only needed fields for the flare tag

* Revert the last commit (to check builds)

* Return selecting only needed fields for tag
2019-03-12 16:38:22 -07:00
Andy Zhao
be8e139e3e Fix charts and add nav buttons (#2044)
* Add navigation links for pro dashboard

* Move styles to stylesheet

* Use the correct dates for charts
2019-03-12 13:31:00 -07:00
Andy Zhao
1922a55739 Add initial charts implementation to pro dashboard (#2037)
* Refactor and optimize article ids a bit

* Add chartJS to package.json

* Add new queries for charts

* Add past week charts for rxns and comments

* Use real data oops

* Round followers percent to 2 decimals

Co-Authored-By: Zhao-Andy <andyzhao.zhao@gmail.com>

* Round all percentages to 2 decimals

Co-Authored-By: Zhao-Andy <andyzhao.zhao@gmail.com>
2019-03-12 10:21:12 -07:00
Ben Halpern
ecb9f6da3d
Remove some hardcoded shecoded stuff (#2011) 2019-03-08 18:08:48 -08:00
rhymes
3c6a7d4574 Display comment published timestamp according to user's locale (#1970) 2019-03-08 15:19:37 -05:00
Ali Spittel
2a9421bf4b Update shecoded.html.erb (#2005) 2019-03-08 12:31:05 -05:00
rhymes
ca79dac1bc Fix sidebar widget header for she coded (#2004) 2019-03-08 12:26:53 -05:00
Ben Halpern
cd36d097ca
Fix social card aspect ratio problem (#2006) 2019-03-08 07:12:53 -08:00
Ben Halpern
138278462a
Add shecoded sidebar/homepage decorations (#2003)
* Add shecoded sidebar/homepage decorations

* Add additional functioanlity to /shecoded

* Fix typo
2019-03-08 04:47:31 -08:00
Ben Halpern
8149a72efb
Nevertheless, She Coded (#2000) 2019-03-07 18:52:09 -08:00
Glenn Carremans
cb7ee46e35 Fix Mixed Content error in O RLY Parody Book Generator (#1993)
* Fixed image not loading + hide invalid gif

* Replaced other URLs with HTTPS
2019-03-07 07:10:58 -08:00
Ben Halpern
a17cfe7d33
Add time ago to recent posts in feed (#1981)
* Add time ago to recent posts in feed

* Modify time details
2019-03-05 13:40:27 -08:00
Ali Spittel
0c7690333b change media query to 950 instead of 800px (#1983) 2019-03-05 11:49:15 -08:00
Andy Zhao
d94f11fbf7 Add ability to add pro role to internal (#1980)
* Add ability to add pro role in internal

* Remove debug statement
2019-03-05 10:44:56 -08:00
Anna Buianova
0ac8eb1f73 Make less queries when displaying articles flare tags (#1957)
* Make less queries when displaying flare tag

* Make less sql queries to display articles flare tags
2019-03-05 07:27:51 -08:00