Commit Graph

7148 Commits

Author SHA1 Message Date
Matt Lee
a63bccc686 SubredditRules: Make report form more consistent with share form. 2016-01-25 13:05:49 -08:00
Matt Lee
9c89e4a1f5 SubredditRules: Force-select the radio input when site reason is selected. 2016-01-25 13:05:49 -08:00
Matt Lee
43a53fc493 SubredditRules: Adjust font sizes.
Font size for rules is increased.  Fixed tiny font size on delete confirmation
and adjusted color and spacing.
2016-01-25 13:05:49 -08:00
Matt Lee
188e760646 SubredditRules: Open the new rule form by default on empty pages. 2016-01-25 13:05:49 -08:00
Matt Lee
2ea5f9b653 SubredditRules: Give icons a bigger hitbox. 2016-01-25 13:05:49 -08:00
MelissaCole
2a6fe3dbea Add new report form to /subreddits 2016-01-25 13:00:01 -08:00
MelissaCole
72e4f4657d Subreddit rules: Don't feature flag mod note 2016-01-25 12:59:22 -08:00
umbrae
09b0ed0895 Edit subreddit rules: no ES6 function definitions
This breaks uglify despite working unminified
2016-01-25 12:59:14 -08:00
MelissaCole
197caa9850 Fix isinstance check 2016-01-25 12:58:03 -08:00
MelissaCole
2036aced15 Subreddit Rules: Support ReportForm for Messages
Messages don't have a subreddit so this was failing. Only attempt
to get subreddit rules for comments and links.
2016-01-25 12:58:03 -08:00
MelissaCole
7fe7068daa Feature flag ban reason 2016-01-25 12:58:03 -08:00
MelissaCole
e0ece48432 Feature flag rules page menu item 2016-01-25 12:58:03 -08:00
MelissaCole
501d53a702 Refactor subreddit rules validators and strip whitespace 2016-01-25 12:58:03 -08:00
Matt Lee
281ec4b0d3 SubredditRules: Fix new rule models being uneditable. 2016-01-25 12:58:03 -08:00
Matt Lee
ccbd55d2af SubredditRules: Style subreddit report form. 2016-01-25 12:58:03 -08:00
Matt Lee
d604704310 SubredditRules: Part 3: Styling the about/rules page. 2016-01-25 12:58:03 -08:00
Matt Lee
98a1ebff4b SubredditRules: Part 2: Markup changes and backbone views. 2016-01-25 12:58:02 -08:00
Matt Lee
7126b39749 SubredditRules: Part 1: Icon assets and styles. 2016-01-25 12:58:02 -08:00
Matt Lee
0132c4edd7 SubredditRules: Fixups to backbone model. 2016-01-25 12:58:02 -08:00
Matt Lee
c46c60778d Add client-side errors for subreddit rules. 2016-01-25 12:58:02 -08:00
Matt Lee
43c06e9308 Frontend: Fixups for errors.js. 2016-01-25 12:58:02 -08:00
Matt Lee
f062de4f0c ModTools: Add base templates for new modtools pages.
Adds a new js module and css file for mod tools, and a new page that
includes them.  This is so that, moving forward, we don’t have to cram
everything into the reddit.js package.
2016-01-25 12:58:02 -08:00
Matt Lee
13e47c5a3f SubredditRules: Send rendered markdown in api responses.
In the create and update endpoints, send the rendered description
markdown in the response. We don’t have client-side markdown rendering,
so this is necessary for the rules page to be fully ajax-y.
2016-01-25 12:58:02 -08:00
MelissaCole
b2f6347741 Remove reddit rule: other option for subreddit rules 2016-01-25 12:58:02 -08:00
Matt Lee
0b1eb7669c SubredditRules: Add subreddit rule Backbone model. 2016-01-25 12:58:02 -08:00
Matt Lee
dea3f9df9b Frontend: Add errors.js
A js module for handling api errors and client-side validation errors.
Right now, most of this is done through the jQuery-json response and
through custom code on a per-feature basis.  This module provides a way
to consume API errors that would normally be displayed through the
jQuery-json response handler, as well as a way to define errors on the
client side that display in the same way.
2016-01-25 12:58:02 -08:00
Matt Lee
f2657f10c2 Frontend: Add ui.TextCounter.
Provides a method of displaying a count of how many characters a user
can type into an input before hitting the maximum length.
2016-01-25 12:58:02 -08:00
Matt Lee
4fde89fdc5 SubredditRules: Reduce max number to 10. 2016-01-25 12:58:02 -08:00
Matt Lee
477462a10f SubredditRules: Additional API errors.
Adds the following errors:

SR_RULE_EXISTS if trying to create a new rule with a short_name that
already exists.
SR_RULE_DOESNT_EXIST if trying to update a rule with a short_name that
does not exist.
SR_RULE_TOO_MANY if trying to create a new rule when the subreddit
already has the max number of rules.
2016-01-25 12:57:58 -08:00
Matt Lee
9e7d65bf3a Frontend: Add flex-direction mixin. 2016-01-25 12:57:32 -08:00
MelissaCole
f973f7f6b1 Add action-thing class for old report dialog 2016-01-25 12:57:32 -08:00
MelissaCole
2ccf011943 Subreddit rules: Fix other_reason input in report dialog
The `other_reason` input needs to be enabled properly since
`.report-action-form` isn't being used in the report dialog anymore.
2016-01-25 12:57:32 -08:00
MelissaCole
0c7b0af668 Feature flag new report dialog style 2016-01-25 12:57:32 -08:00
MelissaCole
7aa352a8cd Subreddit rules: feature flag 2016-01-25 12:57:32 -08:00
MelissaCole
8b3fbc996c Update sitewide rules to reflect content policy 2016-01-25 12:57:32 -08:00
MelissaCole
4214856a0d Make all rules available through API
Subreddit rules and site rules can be rendered in json.
2016-01-25 12:57:31 -08:00
MelissaCole
ec9dc5927a Modify report form to support subreddit rules
Instead of preloading the report dialog, this will request it
when the report button is clicked so that the rules for that
subreddit are populated in the form.
2016-01-25 12:57:31 -08:00
MelissaCole
9a02aadf14 Subreddit rules: Add reasons to the ban page
If the subreddit has rules, the note attached to the ban will
begin with the rule that was violated (`reason`) and mods can add
additional details through this `note` that would be appended to
the rule. This will be visible in the mod log and banned listing.
2016-01-25 12:57:31 -08:00
MelissaCole
48e9548019 Add subreddit rules to /about/banned
Include subreddit rules and site rules. If rules don't exist
for the subreddit, show an empty textbox.
2016-01-25 12:57:31 -08:00
MelissaCole
047ae1c32d Add link and icons for rules in mod tools
This will add a link to /about/rules in the mod tools box and
icons for create, edit, adn delete rules in the mod log.
2016-01-25 12:57:31 -08:00
MelissaCole
826fa73b62 Create model for subreddit rules
This adds the data structure for subreddit rules and a very basic
/about/rules where mods can add, edit, reorder, and delete rules. The
rules are ordered by priority and maintain short_name and description
fields.
2016-01-25 12:57:31 -08:00
MelissaCole
3f8dbc93b2 Allow deleted stickied posts to be unstickied 2016-01-25 11:53:44 -08:00
MelissaCole
31c4f4f1c3 Fix multiple messages being sent when ban has changed 2016-01-25 11:53:44 -08:00
Chad Birch
6d6fcde6fa Link ID redirect: move into FrontController
To be able to do shortlink/id36 redirects, the user context has to be
set up to be able to check whether the user has access to view the
subreddit that the post is in. So this endpoint needs to be inside a
controller that's based on RedditController to make sure that info is
available.
2016-01-22 12:58:09 -08:00
Kevin O'Connor
f83cb007a7 Remove notifications_q. 2016-01-21 17:02:51 -08:00
Chris Slowe
af49fa322b Testing: add vote unit test and coverage script 2016-01-21 13:45:25 -08:00
Florence Yeun
fc2841ad2d Add key color to create subreddit page
Key color is now available on the create and edit subreddit pages.
2016-01-20 16:00:28 -08:00
Florence Yeun
4e7c1ca0b1 Update mobile image sizes
New mobile image sizes:
1. mobile icon,  256 x 256 (previously 240 x 240)
2. header image, 10:3 aspect ratio (previously 16:9)
   - maximum 1280 x 384 (previously 1280 x 720)
   - minimum 640 x 192 (previously 640 x 360)
2016-01-20 16:00:27 -08:00
Brian Simpson
f18ea3e1c4 Remove support for "hot" comment sort. 2016-01-20 13:45:02 -08:00
Brian Simpson
2b3b390b49 Override user preference for "hot" comment sort 2016-01-20 13:45:02 -08:00