openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

Add a donate button to the navbar

Open Robot8A opened this issue 1 month ago • 6 comments

Would fix #6517

I went for an embed of https://supporting.openstreetmap.org/ on /donate. This way, the user can always return to the map or other parts of the website.

We can discuss whether this is the most appropriate way to do it or whether others would be better. Also, it's my first time programming with Ruby on Rails, so I hope I did everything in a way that makes sense :)

Robot8A avatar Dec 08 '25 20:12 Robot8A

Yay, another button in the navbar, and there's already a community thread asking for a link to community there as well..

Seriously though if you want to propose a link to the donation site then just do that - framing the site is just going to be horrible.

Also please don't call commits "first iteration..." even if you do think they might change - any PR you open should in principle be ready to merge so the commit description just describe it as if it was final. If this had been good to merge I would have wanted to be able to do so without having to come back to ask for the commit message to be updated.

tomhughes avatar Dec 08 '25 22:12 tomhughes

These changes make the existing donation link redundant.

Then the link to the copyright is also redundant, because it is in the header.

But seriously, you forget that the buttons in the header are sometimes hidden, for example, on mobile devices or if the user uses vertical tabs. Also in other languages, the header width is larger than in the English localization. You can deal with duplicate links after this PR.

deevroman avatar Dec 09 '25 09:12 deevroman

Then the link to the copyright is also redundant, because it is in the header.

I pointed that out in https://github.com/openstreetmap/openstreetmap-website/issues/6575#issuecomment-3608290388. 🙂

But seriously, you forget that the buttons in the header are sometimes hidden, for example, on mobile devices or if the user uses vertical tabs. Also in other languages, the header width is larger than in the English localization.

The Donate link will end up in the overflow menu in a narrow window or in the collapsible header on a mobile screen. I suspect the Donate link would still be more discoverable there than in the attribution line. The attribution link only appears on the homepage and only if the Standard or Shortbread layer is active. The link doesn’t have to always be visible, but it does need to be accessible without taking unrelated steps. That said, I agree that adding the link to the navigation bar is the more impactful change.

1ec5 avatar Dec 09 '25 17:12 1ec5

I'm reasonably happy with the idea of putting a donation link in the main navbar, but I'll make a more general comment about this over at #6605

It's a hard no from me on the iframe implementation though. It's really not a great user experience, it breaks bookmarks, leaves you unsure of which site you are adding payment information to, and so on. I would decline this PR on that basis alone.

Perhaps you can consider having a page that introduces the topic of donations, and then the CTA takes you to support.openstreetmap.org - that might be better. It's worth considering that the target website is called "supporting" and not "donate", and it consists of multiple topics not just donations, when deciding what the link, url and content of the page here should be.

gravitystorm avatar Dec 10 '25 16:12 gravitystorm

Also links in the framed document that point to other sites like the wiki trigger CSP errors.

I'd say it either links directly to the donation site, maybe opening in a new tab, or to a new page like @gravitystorm suggests that can then point them at the donation site.

tomhughes avatar Dec 10 '25 17:12 tomhughes

@Robot8A I forgot to say - your ruby code looks fine, I'm always happy to answer questions or help with the coding. Thanks for making the PR!

gravitystorm avatar Dec 10 '25 17:12 gravitystorm