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

Use EthicalAds to place logos under Sponsors page #1981

Merged
merged 7 commits into from
Feb 14, 2022

Conversation

berinhard
Copy link
Contributor

This PR replaces the current thumbnail solution to place sponsors logo by EthicalAds integration.

Here's a screen shot of the page working in my local environment.

sponsors_page

One thing to notice is that the logo sizes will differ from production and my local environment. This is because the ideal_dimension template filter depends on reading the image's width and height. And, even though I have a local of the sponsors app db, the same is not true for the logos. Thus, there was no way to calculate the ideal dimensions. I added a fallback for such scenario and it already improved the logo sizes, but I know that they will differ when this PR gets deployed.

@ewdurbin another minor issue is the missing O'Reilly logo. This is because the logo file is formatted as EPS and probably EthicalAds had trouble processing such file format. I think it's better for us to convert the image to PNG and update our database instead of delegate the fix. Maybe this is also indicate we're missing some validation on the sponsorship application form to only accept JPG or PNG files as logos. What do you think about this?

berinhard added a commit that referenced this pull request Feb 13, 2022
This change is also present at #1981, but since pypi integration also needs
it, I decided to duplicate it to not have the integration between services
pending on an open PR.
ewdurbin pushed a commit that referenced this pull request Feb 14, 2022
* Remove authentication that is already defined at base settings

* Refactor tests to configure sponsorship applications during set up

* Add publisher and logo place filters via querystring at logo placement API

* Centralizes sponsor slug definition at pythondorg

This change is also present at #1981, but since pypi integration also needs
it, I decided to duplicate it to not have the integration between services
pending on an open PR.
Copy link
Member

@ewdurbin ewdurbin left a comment

Choose a reason for hiding this comment

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

Thanks @berinhard!

@ewdurbin ewdurbin merged commit 104c6ea into main Feb 14, 2022
@ewdurbin ewdurbin deleted the feature/ethical-ads-sponsors branch February 14, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants