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

Promo Banners #11532

Closed
elijames-codecov opened this issue Oct 9, 2024 · 8 comments · Fixed by #11761
Closed

Promo Banners #11532

elijames-codecov opened this issue Oct 9, 2024 · 8 comments · Fixed by #11761
Assignees

Comments

@elijames-codecov
Copy link
Contributor

Problem Statement

Since the docs are great for boosting our SEO traffic, I was wondering if we could extend the promo banner beyond the homepage.

Currently, it's managed through src/components/banner with no real option on which page we would like to target, and based on the codebase, it's only published on the docs homepage (though please let me know if I'm missing something).

Solution Brainstorm

We would like the following functionality:

  • Have banners appear on any page in docs and have that selectively controlled through src/components/banner/index.tsx
  • Have the ability to have different banners appear on different pages

As an example of general functionality, it can be found on static-sites (packages/shared/components/Banner).

@getsantry
Copy link
Contributor

getsantry bot commented Oct 9, 2024

Assigning to @getsentry/support for routing ⏲️

@a-hariti
Copy link
Collaborator

@elijames-codecov we can have banners across all pages easily reusing the same component (and dismissibility) behavior

what would an ideal fine grained control over which pages to show a certain banner look like from an author's POV / dream DX?

@elijames-codecov
Copy link
Contributor Author

@elijames-codecov we can have banners across all pages easily reusing the same component (and dismissibility) behavior

what would an ideal fine grained control over which pages to show a certain banner look like from an author's POV / dream DX?

@a-hariti - if you look at static-sites' banner, we list each page or directory we want each banner to appear in. If we can mimic that functionality, that would keep it consistent which makes it easier to maintain. Here's a code snippet of how this is currently controlled on static-sites. The appearsOn property determines where the particular banner is located.

const BANNERS = [ { appearsOn: ['^/from/self-hosted'], text: 'Atlassian migrated to Sentry SaaS and scaled their developer efficiency in just a few days - see how in our on-demand workshop.', linkURL: 'https://sentry.io/resources/upgrading-vs-migrating-atlassian-workshop/?promo_name=from-banner', linkText: 'Watch here.', }, { appearsOn: ['^/for/laravel', '^/for/php'], text: 'Join us for a live discussion and demo with Lavarel experts on Oct. 22.', linkURL: 'https://sentry.io/resources/behind-the-code-laravel-experts/?promo_name=from-banner', linkText: 'RSVP', }, { appearsOn: ['^/answers', '^/for/open-source', '^/for/good', '^/for/python', '^/for/django'], text: 'We’ve been feasting at the Open Source table without paying the maintainers for too long. The Open Source Pledge is looking to change that.', linkURL: 'https://opensourcepledge.com/', linkText: 'Will you join us?', }, ];

@a-hariti
Copy link
Collaborator

Nice pattern!

Can you give the repo where it's being used?

@elijames-codecov
Copy link
Contributor Author

elijames-codecov commented Oct 11, 2024

Nice pattern!

Can you give the repo where it's being used?

static-sites. The repo and directory location of the file is in the description.

@a-hariti
Copy link
Collaborator

I think this repo is not visible to me

@stephanie-anderson
Copy link
Contributor

I added you to the static-sites repository, you will be able to see it once our Security team merges the access changes (sometime later today) 👍

@stephanie-anderson
Copy link
Contributor

PR just got merged - takes about 10 min to roll out

@github-project-automation github-project-automation bot moved this from Backlog to Done in Docs Platform Nov 8, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants