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 logo placement server to place sidebar's logos #9979

Merged
merged 19 commits into from
Nov 11, 2021

Conversation

berinhard
Copy link
Contributor

@berinhard berinhard commented Aug 31, 2021

This PR updates pypi to use logo placement server to place logo instead of the sponsors db.

To enable it, we had to update our CSP policies to include not only the server but also the hashes from JS and style files used. To better fit the logo in the sidebar, there's a minor CSS customization to support it. Here's a print screen of the final result:

Screenshot from 2021-10-19 10-49-58

@berinhard berinhard requested a review from ewdurbin October 19, 2021 13:50
@berinhard berinhard force-pushed the topic/sidebar-logo-placement branch from 41ecf4b to 03e4530 Compare October 19, 2021 14:03
@berinhard berinhard requested a review from ewjoachim October 19, 2021 14:16
@berinhard berinhard marked this pull request as ready for review October 19, 2021 14:16
@berinhard
Copy link
Contributor Author

@ewjoachim and @ewdurbin this PR is ready for a final review and merge once PSF have it all ready with EthicalAds.

@ewdurbin ewdurbin merged commit 64102a6 into pypi:main Nov 11, 2021
ewdurbin added a commit that referenced this pull request Nov 16, 2021
Follows on from #9979

- Updates CSP for connect-src used for placement view reporting
- Tweaks CSS to better style/differentiate logo placement
ewdurbin added a commit that referenced this pull request Nov 16, 2021
Follows on from #9979

- Updates CSP for connect-src used for placement view reporting
- Tweaks CSS to better style/differentiate logo placement
ewdurbin added a commit that referenced this pull request Nov 17, 2021
Follows on from #9979

- Updates CSP for connect-src used for placement view reporting
- Tweaks CSS to better style/differentiate logo placement
domdfcoding pushed a commit to domdfcoding/warehouse that referenced this pull request Jun 7, 2022
* Update hashes

* Update CSP to accept etihcaldas script

* Update breaking test for past date

* Replace db logo placement by test one

* Add integrity check

* Update sha

* Use pinned version for logo placement server

* Add hashes for inline files

* Use random ad from sidebar

* Use direct include instead async request so the sponsors div is available to EthicalAds script

* Update publisher ID

* Update sponsor logo placement to use base side bar section class

* Better display sponsor logo

* Add new hashes to CSP tests

* Try to pass on static lint build

* Make translations

Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
domdfcoding pushed a commit to domdfcoding/warehouse that referenced this pull request Jun 7, 2022
Follows on from pypi#9979

- Updates CSP for connect-src used for placement view reporting
- Tweaks CSS to better style/differentiate logo placement
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.

3 participants