readthedocs / addons

JavaScript client to integrate with Read the Docs nicely
https://readthedocs-addons.readthedocs.io/
MIT License
21 stars 4 forks source link

EthicalAd: implement better positioning #311

Open humitos opened 5 months ago

humitos commented 5 months ago

We wrote the logic we want to implement in https://github.com/readthedocs/addons/pull/295#discussion_r1600375886

Placement preference for RTD ad injection:

Using stickybox image (These float if the screen is wide, automatically):

  • Sidebar like content (role=sidebar) (Currently we check for sidebar height, and if it's too long, we put it in the footer -- but this is probably not necessary?)
  • Footer like content (role=footer)
  • Main body content (role=main)

Using text:

  • Fixed footer (Not conflicting with the flyout?)

It would be good to review it again when polishing the ad integration.

humitos commented 5 months ago

After the initial deploy from yesterday, we may reconsider this and avoid showing an ad if it doesn't fit in the screen in a well known position.