Commit graph

55 commits

Author SHA1 Message Date
rhymes
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position (#9262) 2020-07-16 15:51:11 +02:00
Ben Halpern
7bb194b305
[deploy] Remove /rly code (#9192) 2020-07-08 07:55:33 -04:00
Alberto Pérez de Rada Fiol
2660c76fca
Fix erblint errors on the app/views/pages folder (#8401) 2020-06-11 15:46:50 +02:00
Josh Puetz
71fba61ae2
Properly return json (#8395) [deploy] 2020-06-10 17:38:50 -05:00
Josh Puetz
d33322f8e4
Add json template to Pages (#8357)
* Add json template to pages

* Add jsonb field, tweak form
2020-06-10 09:42:15 -05:00
Josh Puetz
f165c47b34
Add feature flag support to Pages (#8149)
* Add 'feature_flag' field to pages table, form

* Add 'exist?' to FeatureFlag

* Test for feature flag when loading custom pages

* Refactor FeatureFlag.enabled? to check both boolean and user gates

* Ugly test fixes

* PR feedback and refactoring

* PR refactor: don't require database table!
2020-06-01 09:23:19 -05:00
Ridhwana
8140e46ceb
Add some placeholder pages (#7441)
* feat: add placeholders for some routes

* about_listings_url

* feat: tag-moderation

* chore: about_listings_url test

* chore: use post a job url

* chore: add pages methods

* chore: just reordered stuff

* oops forgot to save - oh man

* chore: change to single quotes

* chore: hopefully retrigger cc

* chore: update tests

* feat: PR suggestions:)

* chore: spec
2020-04-28 15:55:59 +02:00
Michael Kohl
0d59f92670
Add CodeNewbie staff redirect (#7272) 2020-04-14 20:54:42 -04:00
Anna Buianova
d8539fd8c0
Remove hardcoded now page (#7174) 2020-04-09 16:41:16 +03:00
Michael Kohl
eeed7f6c54
Introduce URL.sanitized_referer helper (#7122) [deploy]
* Introduce URL.sanitized_referer helper

* Make service worker path a constant

* Simplify redirect logic

* Actually use helper

* Remove random file
2020-04-07 17:57:13 +02:00
Anna Buianova
b2a2f4bee5
Remove dynamic /live page (#7130)
* Removed dynamic /live page
2020-04-07 17:36:21 +03:00
Anna Buianova
ad26176828
Removed unused pages code (#6908) 2020-03-27 13:22:40 -04:00
Mac Siri
84e84af8d7
Create Article#admin_published_with scope (#6794) 2020-03-24 18:15:43 -04:00
ludwiczakpawel
cad93674ff
New colors (#6650)
* add tons of colors

* add tons of colors

* moving cheese around and prepping for new theming system

* documenting

* .

* moving theme code to own files

* whitespaces
2020-03-19 15:34:09 -04:00
Mac Siri
d0c1467ab0
Extract Onboarding into its own controller (#6620)
* Extract onboarding into it's own controller

* Pluralize controller

* Create Onboarding spec
2020-03-16 15:49:28 +01:00
Nick Taylor
7bd99ad2da
Nickytonline/add crayons to storybook (#6578)
Added crayons (design system) to Storybook
2020-03-12 15:00:32 -04:00
ludwiczakpawel
ca97c21e16
CSS Components, Variables + Utility classes (#6334)
* 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

* introducing variables & buttons component

* more variables

* Whoops

* init modal component

* init modal component

* init form component

* form component

* .

* variables naming

* .

* tiny cleanups

* formatting

* whoops

* Test

* component avatars

* components page + fixes

* indicators

* init boxes

* boxes

* im an idiot

* radios, checkboxes

* maybe im smart

* whoops. i am dumb and blind

* checkboxes and radios

* better documentation, code examples, avatars rewritten

* notices, modals, dropdowns

* .

* oh damn you

* checkboxes & radios

* forms

* generating tailwind classes

* i broke things

* spacing units

* typography, spacing

* positioning

* overflow

* .

* getting rid of cards for now

* formatting

* adding reset to global styles to avoid jumping layout

* change url for crayons test page to not be top-level

* additional style for indicators, colors, navigation, grid

* tabs

* backgrounds

* flexbox

* .

* .

* im not sure why schema change was here...

* same about this one...

* this file shouldnt be in my commit either

* adding comments and mentally dropping IE10 support :D

* .

* referencing boxes.scss file

* new line

* get rid of font-size from body

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-03-12 11:21:20 +01: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
Mac Siri
6d4925a17d
Ignore referer on /report-abuse if it's SW.js (#6295) [deploy] 2020-02-26 10:18:22 -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
Michael Kohl
728a05c476 Move from env variables to SiteConfig (#5385) [deploy]
* Move from env variables to SiteConfig

Related to #5384

This PR only deals with the first remaining part outlined in the issue, starting to use existing SiteConfig keys instead of the env variables.

* Restore Envfile to original version for now
2020-01-07 16:36:24 -05:00
rhymes
8f5706fcc1 Remove all old membership code, see 97040ab6 (#3575) 2019-07-30 12:33:50 -04:00
Ali Spittel
52c60ce37e Feature/refactored onboarding (#3333)
* set up refactored onboarding

* create onboarding page

* add in first slide and change slide functionality

* fix test suite

* profile refactor

* profile refactor

* refactor to api

* add checkbox fields

* add checkbox fields

* remove puts

* add basic css

* add styling

* add redirect

* hide back and next at first and last slides

* test refactored onboarding

* test refactored onboarding

* remove article edits

* Fix schema

* Add deleted file back in

* Add default value for checked_t&c column

* Adjust HTML structure to keep nav buttons in place

* Fix ESLint issues on Onboarding.jsx file

* Handling for undefined or empty followedTags on getUserTags

* Fix codeclimate issues

* Fix codeclimate issues

* Fix more codeclimate issues

* Fix more codeclimate issues

* Update Onboarding snapshots

* Uncheck the CoC and T&C checkboxes on render

* Update snapshots

* Return false instead of raising error

* Update spec to use new onboarding

* Redirect to onboarding if haven't seen it yet

* Prevent redirect to onboarding from /signout_confirm

* Use assign_attributes instead of saving twice

* Move COC and T&C checkbox page to second slide

* Add 'go back to original page' functionality

* Reuse ready prototype logic

* Keep track of the last visited onboarding page

* Fix email subscription bug

* Fix overflow issue for tags page

* Remove height to prevent page container scrolling

* Check for CoC and T&C for displaying onboarding

* Add InstantClick redirect and preserve referrer in client

* Fix async update + check by using localStorage

* Turn off onboarding for tests

* Finalize design for onboarding

* Finalize design for onboarding

* Make bulk follows during onboarding

* Fix bulk follow test
2019-07-26 15:53:32 -04:00
Andy Zhao
b4e493ec30 Redirect to actual latest published thread for /welcome (#3488) 2019-07-15 17:03:47 -04:00
Andy Zhao
04ce7738ab Add /challenge redirect (#3368) 2019-07-02 16:27:39 -04:00
rhymes
c42c28ae59 Performance: save some queries when pluck is not needed (#3160) 2019-06-14 14:56:33 -04:00
Ben Halpern
f0871346f7
Add security and faq pages as generatable via the Page model (#2792) 2019-05-10 16:20:40 -04:00
Andy Zhao
97040ab603 Remove membership and stripe subscription routes (#2741) 2019-05-07 11:37:21 -04:00
Ben Halpern
5891b2ea58
Add application "page" model (#2657)
* Generate page model

* Add page model

* Conditionally modify html rendering
2019-05-02 18:24:06 -04:00
rhymes
5782ffd7e0 Use published scope for articles (#2374)
* Use published scope for articles

* Fix variable name

* The sequencing in the union query matters

* Fix spec

* Restore a published: true condition

* This test is actually misleading due to the union

* Revert this change, not sure why it's not a relation

* Fix useless diff
2019-04-11 13:18:26 -04:00
rhymes
3a53d5797e Upgrade Rails to 5.2.3 (#1408) 2019-04-03 13:08:59 -04:00
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
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
Ben Halpern
27662eb924
Ben/shecoded tweaks (#2007)
* A few shecoded tweaks

* Refactor code
2019-03-08 08:16:10 -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
Ben Halpern
263b698686
Add shecoded page (#1968)
* Add shecoded page

* Fix copy
2019-03-04 07:50:49 -08:00
Ben Halpern
d9e1ab2caa
Fix typo in badge show page and fix unrelated badge missing word (#1899) 2019-02-25 16:06:27 -08:00
Ben Halpern
92b24a9978
Add html_variant split testing to /badge (#1763)
* Add /badge html_variant

* Fix some of the linting
2019-02-08 12:45:14 -04:00
Mac Siri
9f36295c40 Reduce member's page cache size (#764) 2018-09-29 22:20:37 -04:00
Andy Zhao
5814d0a263 Add slack notifications to notes for reports (#660)
* Remove extraneous string conversion

* Add slack message for new notes

* Move status and minimize buttons to the bottom

* Add note model spec

* Remove extraneous param for reported links
2018-09-25 14:36:54 -04:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Mac Siri
40f488d991 Migrate to Travis CI (part 2) (#591)
* Update Travis.yml

* Update README

* Update README

* Adjust test to not rely on env vars

* Update encryption

* Refactor

* Update env key

* Stub AWS calls

* Create ApplicationConfig

* Fix specs

* Fix lint

* Update ApplicationConfig

* Remove travis env vars

* Fix lint

* Extend character limit to 100

* Add env to travis

* Take out auto-restart after deploy

* Immediately discarded test cache

* Stub GA in request specs

* Stub Pusher

* Fix broken specs

* Update fixture

* Add CodeClimate id

* Change CodeClimate key

* Remove merge mistakes

* WIP

* Add Envied gem & Change README

* Add missing keys

* Add missing key

* Update fixture

* Fix broken spec

* Add Slack Notification for Travis

* Fix wording

* Fix typo
2018-07-20 20:17:18 -04:00
Ben Halpern
799aa16378
Fix /live for workshop (#516) 2018-06-28 14:28:24 -04:00
Ben Halpern
7e9280390c
Add /survey and modified several page titles (droped the the) (#515)
* Add /survey and modified several page titles (droped the the)

* Add emojis to page title
2018-06-28 11:07:42 -04:00
Andy Zhao
cd9f6d9ada [Done] Add BDEFGI Policies and Specs (#487)
* Add comment for public controllers

* Add block policy and specs

* Add policy for authorizing dashboard

* Add follow policy and specs

* Refactor a tiny bit

* Prevent banned users from following anything

* Add a note for email sub controller about auth

* Add image upload policies

* Add policy for github repos

* Fix typo and use correct github repo variable

* Fix image uploader and use regular params

* Add authenticate_user before action back in

* Rename test

* Update slack bot message formatting and fix reported URL
2018-06-26 09:23:07 -04:00
Ben Halpern
2b4749bf11
Whitelist columns on to_json call (#477) 2018-06-21 17:43:56 -04:00
Ben Halpern
0941b2e4fb
Add some tests around model validations (#459)
* Modify sample_application.yml and write test

* Add ahrefs verification

* Add some tests around model validations

* Indent an end

* Add a few tests

* Add tests and reserved words

* Fix live articles spec typo

* Modify ga_events_controller
2018-06-20 17:14:08 -04:00
Andy Zhao
ecbb9d4ab1 [Done] New Reporting System MVP (#408)
* Move validations from controller to model

* Add new columns to feedback message model

* Use polymorphic notes relationship

* MVP of ticketing system

* Use new URL for reported_url param

* Add missing files

* Add validations and tests for feedback_messages

* Clean up some html

* Update create spec and add update spec

* Add mail tests and lint

* Add link to user profile
2018-06-19 16:41:31 -04:00
Ben Halpern
39ecf7d70d
Fix live and adjust coming soon (#400) 2018-06-07 11:42:41 -04:00