Repository: mdn/kuma

Issue:
Soapbox banner required for MDN browser comatibility report
# Content Issue
<!-- Select the appropriate option -->
- [ ] Please close this issue, I accidentally submitted it without adding any details
- [ ] New documentation
- [x] Correction or update

# URL of page you are seeing the problem on:

All MDN pages ;-)

# Details
<!-- Tell us about the issue you saw. A clear description, links, and screenshots help us fix it faster. -->

To accompany the launch of the MDN browser compatibility report (see https://github.com/mdn/insights/issues/42), we'd like to put up a soapbox banner to draw people's attention to it.

The wording should be "Check out the MDN Browser Compatibility Report, a deep dive into web compatibility frustrations, with useful insights into how they could be overcome.", and "MDN Browser Compatibility Report" should be linked to the report.

We'd like this banner to run until the day before the soapbox banner for the 2020 Web DNA Survey is published (see https://github.com/mdn/kuma/issues/7492)

Does this sound OK? 




Discussion:
FYI @robnyman
@chrisdavidmills Sounds good. We might need to finesse the wording a little to fit into our standard banner. Let me do a mock-up and we can take it from there.
Sounds good; thanks @schalkneethling !
@chrisdavidmills Do we link to the insights website or directly to the PDF from this banner?

Resolving patch:
diff --git a/kuma/core/migrations/0010_create_browser_compat_report_banner_switch.py b/kuma/core/migrations/0010_create_browser_compat_report_banner_switch.py
new file mode 100644
--- /dev/null
+++ b/kuma/core/migrations/0010_create_browser_compat_report_banner_switch.py
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+def create_browser_compat_report_banner_switch(apps, schema_editor):
+    Switch = apps.get_model("waffle", "Switch")
+    if not Switch.objects.filter(name="mdn_browser_compat_report").exists():
+        Switch.objects.create(
+            name="mdn_browser_compat_report",
+            active=False,
+            note="The MDN Browser Compatibility Report",
+        )
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("core", "0009_remove_user_interviews_banner_flag"),
+        # This is needed otherwise `apps.get_model('waffle', 'Flag')`
+        # will raise a Django app LookupError.
+        ("waffle", "0001_initial"),
+    ]
+
+    operations = [migrations.RunPython(create_browser_compat_report_banner_switch)]
diff --git a/kuma/settings/common.py b/kuma/settings/common.py
--- a/kuma/settings/common.py
+++ b/kuma/settings/common.py
@@ -692,6 +692,10 @@ def pipeline_one_scss(slug, **kwargs):
         "source_filenames": ("styles/components/banners/developer-needs.scss",),
         "output_filename": "build/styles/developer-needs.css",
     },
+    "banner_browser_compat_report": {
+        "source_filenames": ("styles/components/banners/browser-compat-report.scss",),
+        "output_filename": "build/styles/browser-compat-report.css",
+    },
     "banner_mdn_subscriptions": {
         "source_filenames": ("styles/components/banners/mdn-subscriptions.scss",),
         "output_filename": "build/styles/mdn-subscriptions.css",


Test patch: