Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way for sponsors to pay without asking for logos etc. #2503

Merged
merged 16 commits into from Mar 3, 2017

Conversation

ericholscher
Copy link
Member

@ericholscher ericholscher commented Nov 14, 2016

This also adds the ability to see reports on specific promos.
Also gives a place to see how they display and test them before shipping them live.

@ericholscher ericholscher added the PR: work in progress Pull request is not ready for full review label Nov 14, 2016
@ericholscher ericholscher added PR: ready for review and removed PR: work in progress Pull request is not ready for full review labels Nov 14, 2016
Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm -1 on shoehorning this into donations, this is half-baked. Fine for now, as it doesn't seem like this is going to be used much yet.

What we should actually be shipping here is an invoice feature, with set amounts on the payments/etc. I don't want to see this implemented in RTD though.

email = forms.CharField(required=True)

def validate_stripe(self):
"""Call stripe for payment (not ideal here) and clean up logo < $200"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copypasta docstring


<p>
We appreciate your contribution greatly, thank you for showing your support!
Your help will go a long ways towards making the service more sustainable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should instead mention buying an ad, marketing departments aren't donating to us to make us more sustainable.

{% load i18n %}
{% load static %}

{% block title %}{% trans "Sustainability" %}{% endblock %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title should mention advertising

<p>
This form can be used to pay for your sponsorship of Read the Docs.
Thanks for helping make Open Source more sustainable!
</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with the title and this paragraph block. Framing this as sponsorship is misleading.

<option value="3000">$3,000</option>
<option value="5000" selected>$5,000</option>
<option value="10000">$10,000</option>
</select>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This select shouldn't exist at all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this to set the standard expectation that they should be paying us $5k test buys. Seemed simpler to have this select than rewrite how we were handling the actual data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does seem a bit odd still though. Altering the form should be straight forward. You'd need to remove the <select>, drop the visible data bind parameter on <input>, and drop the style parameter on the <input> as well. This should give a permanent text input.

from .mixins import DonateProgressMixin

log = logging.getLogger(__name__)


class PayAdsView(StripeMixin, CreateView):

"""Create a donation locally and in Stripe"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/donation/advertising payment/

Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted some HTML/CSS issues. These aren't horribly important. I pointed them out to ensure we're producing consistent templates. The current issue with our templates and UI is that it is not consistent. We can address these issues later if this is pressing, be sure to open a bug tracking this as cleanup if so.

<option value="3000">$3,000</option>
<option value="5000" selected>$5,000</option>
<option value="10000">$10,000</option>
</select>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does seem a bit odd still though. Altering the form should be straight forward. You'd need to remove the <select>, drop the visible data bind parameter on <input>, and drop the style parameter on the <input> as well. This should give a permanent text input.


</div>

<br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace shouldn't be added with html elements, this should be a css change.

<th><strong>Day (UTC)</strong></th>
<th><strong>Views</strong></th>
<th><strong>Clicks</strong></th>
<th><strong>CTR</strong></th>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <strong> here should also be replace be css rules. We shouldn't dictate styling in the HTML

<td><strong>Total (over all time)</strong> </td>
<td><strong>{{ promo.total_views }}</strong></td>
<td><strong>{{ promo.total_clicks }}</strong></td>
<td><strong>{{ promo.total_click_ratio }}%</strong></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for styling here. This should perhaps be a rule for table > tr.table-totals or somesuch.

def get_context_data(self, **kwargs):
promo_slug = kwargs['promo_slug']
slugs = promo_slug.split(',')
days = int(self.request.GET.get('days', 90))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input isn't sanitized here, this should be wrapped for exception handling on TypeError

@agjohnson agjohnson added the PR: hotfix Pull request applied as hotfix to release label Nov 22, 2016
@ericholscher
Copy link
Member Author

This has been live for quite a while -- can I just merge this @agjohnson, or do we care enough about the tidbits to fix it?

@agjohnson
Copy link
Contributor

My review still stands, but feel free to open issues to track the clean up efforts if you aren't going to handle them. I think this module makes more sense being pulled out of RTD eventually anyways

@ericholscher
Copy link
Member Author

Added #2691

@stsewd stsewd deleted the add-payment-form branch August 15, 2018 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: hotfix Pull request applied as hotfix to release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants