Commit Graph

6181 Commits

Author SHA1 Message Date
Jordan Milne
35fa8149d5 Add a better check for HTTPS-ready embeds
Don't depend on a hardcoded list of providers, look at the embed HTML
to detect if we'll get mixed content or a placeholder image on HTTPS
2015-06-24 14:32:07 -07:00
xiongchiamiov
7bfb58e677 Reinstate random sort
A bit ago, I accidentally broke (in reddit/reddit@dbbc16e) the random sort
method for comment threads: we started filtering the `sort` GET parameter to
only "visible" options (those we display in the menu), when it should be *all*
sort options, visible or hidden.
2015-06-24 11:40:08 -07:00
Florence Yeun
2876c37c5a Comment embeds: Delink username
Do not link to user pages from comment embeds. This is a tweak to
simplify the experience for external users.
2015-06-23 14:48:34 -07:00
MelissaCole
af934eab3b Renotify unspammed comments
If a comment is unspammed, put a notification back in the inbox
of all possible recipients (parent, username notifications, etc).

Keep track of the `new` status when the comment has been marked as spam.
When it is unspammed, try to get the previous `new` status so that it
isn't marked as unread if it's already been read.
2015-06-22 11:36:19 -07:00
xiongchiamiov
3cb8e6f260 Open graph: up max image size to 320px wide
With a little bit of testing, we decided 320px-wide Open Graph images are ideal
for Facebook.  Specifically, they seem to crop down to 160px squares, except
when presenting images to retina devices, in which case you'll see 320x320.
So, if we can produce a 320px-wide image, let's provide it, and if not, we'll
fall back to a smaller size before trying other sources.
2015-06-22 10:51:03 -07:00
allthefoxes
ecf032e378 Change a few links to https 2015-06-18 15:28:05 -07:00
Chris Stephens
60a50c459b Lowercase any reference to multi ids 2015-06-17 11:43:20 -07:00
umbrae
d573af1307 Suggested sort: Do not suggest Q&A sort if the user is a responder
We don't want to suggest Q&A sort to responders, because the user
is answering questions, and Q&A sort focuses on already-answered
questions. This resets the suggested sort for responders.
2015-06-16 14:05:16 -07:00
Florence Yeun
ac80dde506 Toolbar: Update deprecation warning
Link to the toolbar wiki page.

https://www.reddit.com/wiki/toolbar
2015-06-16 10:01:44 -07:00
Jordan Milne
c6aaf9cfec Add percent_loggedin condition for feature flags 2015-06-15 15:56:55 -07:00
Jordan Milne
4dabd3afab Fix loggedin / loggedout feature flag tests 2015-06-15 15:56:52 -07:00
David Wick
66cf8dd704 Fix gold form for users blocking google analytics
Ghostery has a tendency to monkey patch things it blocks.  This
extra guard ensures we don't throw `TypeErrors` when calling
`_ga.getByName`.
2015-06-15 15:23:08 -07:00
xiongchiamiov
26e86563dd Image previews: clear on link deletion
We've had a number of minor data leaks where we'd expose information from
deleted links in metadata information.  While we can patch them as they come
up, getting rid of the data at the source makes it harder to make these
mistakes.

Specifically, this was motivated by Open Graph image metadata being pulled from
the preview image for deleted self-posts.
2015-06-15 15:09:39 -07:00
xiongchiamiov
4b688caba4 Un-gate image previews
We're using them in mobileweb, and are getting ready to announce them to the
developer community, so we don't really need them gated behind a feature flag
any more.
2015-06-15 14:44:58 -07:00
Florence Yeun
e12672018d Sharing: Remove CAPTCHA for email share
We're no longer requiring a CAPTCHA for the email share feature.
Sharing by email/username requires login and is also rate limited.
2015-06-12 11:20:58 -07:00
Florence Yeun
7b37d04a1c Sharing: Log event for email opt out
Log a simple event for successful email opt out and opt in.
2015-06-12 11:20:22 -07:00
Jack Lawson
43c91ea479 Remap .mobile to simple.reddit.com 2015-06-11 15:56:56 -07:00
Matt Lee
47bfe96697 Sharing: Prevent opening multiple share menus when spamming clicks. 2015-06-11 15:37:55 -07:00
Matt Lee
04766de8cb CombinedSearch: Change no-results message color to grey. 2015-06-11 15:37:54 -07:00
Chris Stephens
43162e25e8 Refactor the image preview generation method
This will allow the method to be called from other locations so we can
use the image preview object in other locations.
2015-06-11 15:25:50 -07:00
Brian Simpson
2321d4b117 Don't rely on special author_id value for /r/promos. 2015-06-11 02:27:08 -04:00
Brian Simpson
3c1267de16 Subreddit.get_promote_srid: use an ini value rather than a query.
This should be faster because it doesn't need to hit caches or
postgres.
2015-06-11 02:27:08 -04:00
Matt Lee
268b44ba63 Cleanup: Remove unused javascript.
A pass at cleaning up some frontend code by removing unused functions.  All of
these functions are either 1. not referenced anywhere or 2. referenced
somewhere, but don't actually _do_ anything. In the latter case, the reference
is removed as well.

The list of functions removed:

- hover_open_menu
- update_user
- emptyInput
- clear_all_langs
- check_some_langs
- show_unfriend
- pure_domain
- parse_domain
- save_usertext
- save_thing
- unsave_thing
- $.fn.same_author
- tool_cover
- fire_success
- check_name
- too_big

Additionally, the 'success_field' template in utils.html is removed, as it is
imported several places but never rendered (and was the only place the
fire_success function was being called).
2015-06-11 11:42:10 -07:00
Brian Simpson
4245fde3e1 Use the same selftext max length for all subreddit types.
Previously selfpost only subreddits got a limit of 40,000 characters
and other subreddits had a limit of 15,000 characters. Now all subreddits
have a limit of 40,000 characters.
2015-06-11 01:57:02 -04:00
Florence Yeun
fc09f064ee CombinedSearch: Remove hot sort from sort menu
This is an experimental change. We are considering dropping support
for sorting by hot due to very low usage.
2015-06-10 15:33:19 -07:00
Matt Lee
9bd078783f CombinedSearch: Add some missing translations.
Conflicts:
	r2/r2/templates/searchresultlink.html
2015-06-10 13:23:25 -07:00
Matt Lee
52dcca31fa CombinedSearch: Decrease font size of meta text. 2015-06-10 13:23:25 -07:00
Matt Lee
76a2f6831d CombinedSearch: Use rendered markdown in post selftext.
Conflicts:
	r2/r2/templates/searchresultlink.html
2015-06-10 13:23:25 -07:00
Matt Lee
32db79770d CombinedSearch: Add 'visited' state for search result links.
Simplify the css a bit by making all links the same link color and adding a
purple link color for :visited and .visited links.  Also adds posts clicked on
from the new search results page to the 'Recently Viewed Links' widget.
2015-06-10 13:23:25 -07:00
Matt Lee
9c78287817 CombinedSearch: Make points and comment counts more prominent.
Moves the subreddit link to the end of the meta line to keep the score and
number of comments more consistently positioned.

Also adds the 'ambivote' icon before score, and linkifies the comment count.
2015-06-10 13:23:25 -07:00
Matt Lee
128834c31b CombinedSearch: Add expando to self posts. 2015-06-10 13:23:25 -07:00
Matt Lee
2e0292af16 Sharing: Handle narrow screens better.
When screens get narrow, the 'Share with:' label starts to wrap to two lines.
Since this is a translated string, we can't really just set a minimum width on
it and expect it to always work, but we can handle the wrapping case better.

This reduces the line-height to look less terrible, and keeps the labels
centered with the rest of the content when they need to wrap.
2015-06-10 13:23:20 -07:00
Matt Lee
82fac18ec3 Sharing: Add a redirect endpoint for facebook sharing. 2015-06-10 13:23:20 -07:00
Florence Yeun
38928f110d Toolbar: Deprecation warning
As part of our efforts to move to full-site HTTPS, the reddit toolbar
will be discontinued on June 26, 2015.  The toolbar is not supported
when using HTTPS.

https://www.reddit.com/wiki/toolbar
2015-06-10 10:37:52 -07:00
Andy Tuba
0a2d3602c6 TEMPORARY: Prevent expando buttons added by RES from triggering expando behavior.
http://redd.it/392zol

Expandos added by extensions can be mistaken for the ExpandoLink's own button, resulting in opening parallel expandos (reddit's and the add-on) or closing an expando by clicking a nested expando. This is avoided by verifying the clicked button is owned by the ExpandoLink.

Extensions can avoid this by stopping propagation on clicks to their expando buttons.
2015-06-09 12:53:20 -07:00
Andy Tuba
5742edbd9c Create ExpandoLink when expando-button is clicked.
Instantiate ExpandoLink lazily as expando buttons are clicked.
2015-06-09 12:53:20 -07:00
Matt Lee
b3a6adb6e3 CombinedSearch: Add linkflair classes onto post results.
Moves the bit of logic that builds the linkflair class string up into
template_helpers.py to avoid duplicating.
2015-06-08 19:40:13 -07:00
Matt Lee
b10012b986 CombinedSearch: Don't show score if score should be hidden. 2015-06-08 19:40:13 -07:00
Matt Lee
3679fa8272 CombinedSearch: Make thumbnail link to comments page. 2015-06-08 19:40:13 -07:00
Florence Yeun
6897766c59 CombinedSearch: Format numbers with commas
Add commas to subscriber counts, link scores, and comment counts using
`format_number()`.
2015-06-08 19:39:38 -07:00
Florence Yeun
c927f13dca CombinedSearch: Format numbers
Format subscriber counts, link scores, and comment counts using
`ungettext()`.

Conflicts:
	r2/r2/templates/searchresultsubreddit.html
2015-06-08 19:39:36 -07:00
Florence Yeun
f3e0619341 CombinedSearch: Hide subscriber count for private subreddits
Conflicts:
	r2/r2/templates/searchresultsubreddit.html
2015-06-08 19:38:56 -07:00
Matt Lee
3755cbbd4b CombinedSearch: Respect 'open in new window' preference. 2015-06-08 19:36:38 -07:00
Matt Lee
9a22fdf3d0 Fix NSFW and report stamp styles. 2015-06-08 19:36:38 -07:00
Matt Lee
306306b9c1 CombinedSearch: Always show header.
Since the search filter and sort menus have moved into the header, hiding it
after the first page means that users can only change the sort/filtering options
on page 1.
2015-06-08 19:36:37 -07:00
Matt Lee
f52c753ac4 CombinedSearch: Fix sort filter menus.
The js that controls the showing/hiding of the menus expect each dropdown
element to be the only instance amongst its siblings.  In other words, each
dropdown button and list must be wrapped in a container element for it to work
correctly.

Additionally, this moves the filter menus to the right side of the header for
better visibility.
2015-06-08 19:36:37 -07:00
Matt Lee
5d50fd2386 CombinedSearch: Fix for logged-out users. 2015-06-08 19:36:37 -07:00
Matt Lee
dcf464fc0d CombinedSearch: Don't show subscribe button if user can't subscribe. 2015-06-08 19:36:37 -07:00
Matt Lee
f5056b2391 CombinedSearch: Add private, restricted, and archived indicators to subreddits.
Conflicts:
	r2/r2/models/subreddit.py
2015-06-08 19:36:37 -07:00
Matt Lee
487ad93874 CombinedSearch: Show link flair. 2015-06-08 19:36:37 -07:00