getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
330 stars 1.45k forks source link

Promo Banners #11532

Open elijames-codecov opened 1 week ago

elijames-codecov commented 1 week ago

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:

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

getsantry[bot] commented 1 week ago

Assigning to @getsentry/support for routing ⏲️

a-hariti commented 1 week ago

@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 commented 1 week ago

@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 commented 1 week ago

Nice pattern!

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

elijames-codecov commented 1 week ago

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 commented 1 week ago

I think this repo is not visible to me