DEV: Drop unsupported-browser plugin (#10261)

DEV: Drop unsupported-browser plugin (#10261)

Discourse 2.6 will not have support for older browsers (e.g. IE11)

diff --git a/.gitignore b/.gitignore
index 2ef9961..4f56364 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,7 +54,6 @@ bootsnap-compile-cache/
 !/plugins/discourse-narrative-bot
 !/plugins/discourse-presence
 !/plugins/discourse-local-dates
-!/plugins/discourse-unsupported-browser
 /plugins/*/auto_generated/
 
 /spec/fixtures/plugins/my_plugin/auto_generated
diff --git a/app/assets/javascripts/discourse/app/components/quote-button.js b/app/assets/javascripts/discourse/app/components/quote-button.js
index 8f7d464..2b932be 100644
--- a/app/assets/javascripts/discourse/app/components/quote-button.js
+++ b/app/assets/javascripts/discourse/app/components/quote-button.js
@@ -97,7 +97,7 @@ export default Component.extend({
     // on Desktop, shows the button at the beginning of the selection
     // on Mobile, shows the button at the end of the selection
     const isMobileDevice = this.site.isMobileDevice;
-    const { isIOS, isAndroid, isSafari, isOpera, isIE11 } = this.capabilities;
+    const { isIOS, isAndroid, isSafari, isOpera } = this.capabilities;
     const showAtEnd = isMobileDevice || isIOS || isAndroid || isOpera;
 
     // Don't mess with the original range as it results in weird behaviours
@@ -125,10 +125,7 @@ export default Component.extend({
     const parent = markerElement.parentNode;
     parent.removeChild(markerElement);
     // merge back all text nodes so they don't get messed up
-    if (!isIE11) {
-      // Skip this fix in IE11 - .normalize causes the selection to change
-      parent.normalize();
-    }
+    parent.normalize();
 
     // work around Safari that would sometimes lose the selection
     if (isSafari) {
diff --git a/app/assets/javascripts/discourse/app/initializers/copy-codeblocks.js b/app/assets/javascripts/discourse/app/initializers/copy-codeblocks.js
index f6fcef5..3d8ee45 100644
--- a/app/assets/javascripts/discourse/app/initializers/copy-codeblocks.js
+++ b/app/assets/javascripts/discourse/app/initializers/copy-codeblocks.js
@@ -113,8 +113,7 @@ export default {
         }
 
         const siteSettings = container.lookup("site-settings:main");
-        const { isIE11 } = container.lookup("capabilities:main");
-        if (!siteSettings.show_copy_button_on_codeblocks || isIE11) {
+        if (!siteSettings.show_copy_button_on_codeblocks) {
           return;
         }
 
diff --git a/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js b/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js
index c8c3503..a3a3f76 100644
--- a/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js
+++ b/app/assets/javascripts/discourse/app/pre-initializers/sniff-capabilities.js
@@ -30,7 +30,6 @@ export default {
             return p.toString() === "[object SafariRemoteNotification]";
           })(!window["safari"] || safari.pushNotification);
         caps.isChrome = !!window.chrome && !caps.isOpera;
-        caps.isIE11 = !!ua.match(/Trident.*rv\:11\./);
 
         caps.canPasteImages = caps.isChrome || caps.isFirefox;
       }
diff --git a/app/assets/javascripts/polyfills.js b/app/assets/javascripts/polyfills.js
index 0fe25c8..5913ad0 100644
--- a/app/assets/javascripts/polyfills.js
+++ b/app/assets/javascripts/polyfills.js
@@ -1,7 +1,5 @@
 /* eslint-disable */
 
-// Any IE only polyfill should be moved in discourse-unsupported-browser plugin
-
 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags#Polyfill
 // IE and EDGE
 if (RegExp.prototype.flags === undefined) {
diff --git a/lib/plugin/metadata.rb b/lib/plugin/metadata.rb
index d2de1ff..9f8eec7 100644
--- a/lib/plugin/metadata.rb
+++ b/lib/plugin/metadata.rb
@@ -75,7 +75,6 @@ class Plugin::Metadata
     "docker_manager",
     "lazy-yt",
     "poll",
-    "discourse-unsupported-browser",
     "discourse-fontawesome-pro",
     "discourse-staff-alias",
   ])
diff --git a/plugins/discourse-unsupported-browser/assets/javascripts/initializers/discourse-unsupported-browser.js.es6 b/plugins/discourse-unsupported-browser/assets/javascripts/initializers/discourse-unsupported-browser.js.es6
deleted file mode 100644
index 59cdbb1..0000000
--- a/plugins/discourse-unsupported-browser/assets/javascripts/initializers/discourse-unsupported-browser.js.es6
+++ /dev/null
@@ -1,24 +0,0 @@
-import I18n from "I18n";
-import { withPluginApi } from "discourse/lib/plugin-api";
-
-function initializeInternetExplorerDeprecation(api) {
-  const siteSettings = api.container.lookup("site-settings:main");
-  if (siteSettings.browser_deprecation_warning) {
-    const { isIE11 } = api.container.lookup("capabilities:main");
-    if (isIE11) {
-      api.addGlobalNotice(
-        I18n.t("discourse_unsupported_browser.deprecation_warning"),
-        "browser-deprecation-warning",
-        { dismissable: true, dismissDuration: moment.duration(1, "week") }
-      );
-    }
-  }
-}
-
-export default {
-  name: "discourse-unsupported-browser",
-
-  initialize() {
-    withPluginApi("0.8.37", initializeInternetExplorerDeprecation);
-  }
-};
diff --git a/plugins/discourse-unsupported-browser/assets/stylesheets/ie.scss b/plugins/discourse-unsupported-browser/assets/stylesheets/ie.scss
deleted file mode 100644
index 00d91c8..0000000
--- a/plugins/discourse-unsupported-browser/assets/stylesheets/ie.scss
+++ /dev/null
@@ -1,444 +0,0 @@
-@media screen and (max-width: 767px) {
-  table.staff-logs tr {
-    display: -ms-grid;
-    -ms-grid-columns: 1fr 1fr 1fr 0.5fr;
-    -ms-grid-rows: auto auto;
-    td {
-      display: -ms-grid;
-      &.staff-users {
-        -ms-grid-row: 1;
-        -ms-grid-column: 1;
-        -ms-grid-column-span: 2;
-      }
-      &.created-at {
-        -ms-grid-row: 1;
-        -ms-grid-column: 4;
-      }
-      &.action {
-        -ms-grid-row: 2;
-        -ms-grid-column: 1;
-      }
-      &.subject {
-        -ms-grid-row: 2;
-        -ms-grid-column: 2;
-        -ms-grid-column-span: 3;
-      }
-      &.details {
-        -ms-grid-row: 3;
-        -ms-grid-column: 1;
-        -ms-grid-column-span: 3;
-      }
-      &.context {
-        -ms-grid-row: 4;
-        -ms-grid-column: 1;
-        -ms-grid-column-span: 3;
-      }
-    }
-  }
-}
-
-// desktop/login.scss
-.d-modal.create-account {
-  .login-form {
-    form,
-    table {
-      display: block; //IE11
-    }
-  }
-}
-
-// common/admin/dashboard.scss
-.dashboard,
-.dashboard-next {
-  .charts {
-    display: -ms-grid;
-    -ms-grid-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
-    -ms-grid-rows: 1fr 1fr;
-    .admin-report {
-      -ms-grid-column-span: 4;
-
-      &:nth-of-type(1) {
-        -ms-grid-row: 1;
-        -ms-grid-column: 1;
-      }
-      &:nth-of-type(2) {
-        -ms-grid-row: 2;
-        -ms-grid-column: 1;
-      }
-      &:nth-of-type(3) {
-        -ms-grid-row: 2;
-        -ms-grid-column: 5;
-      }
-      &:nth-of-type(4) {
-        -ms-grid-row: 2;
-        -ms-grid-column: 9;
-      }
-      &:nth-of-type(5) {
-        -ms-grid-row: 3;
-        -ms-grid-column: 1;
-      }
-      &:nth-of-type(6) {
-        -ms-grid-row: 3;
-        -ms-grid-column: 5;
-      }
-      &:nth-of-type(7) {
-        -ms-grid-row: 3;
-        -ms-grid-column: 9;
-      }
-    }
-
-    .admin-report {
-      &.consolidated-page-views {
-        -ms-grid-column-span: 12;
-      }
-    }
-  }
-}
-.counters-list {
-  .counters-header {
-    display: -ms-grid;
-    -ms-grid-columns: 2fr 1fr 1fr 1fr 1fr;
-    .counters-cell {
-      -ms-grid-row: 1;
-      -ms-grid-column-span: 1;
-      &:nth-of-type(1) {
-        -ms-grid-column: 1;
-      }
-      &:nth-of-type(2) {
-        -ms-grid-column: 2;
-      }
-      &:nth-of-type(3) {
-        -ms-grid-column: 3;
-      }
-      &:nth-of-type(4) {
-        -ms-grid-column: 4;
-      }
-      &:nth-of-type(5) {
-        -ms-grid-column: 5;
-      }
-    }
-  }
-}
-
-// common/admin/api.scss
-table.web-hooks.grid {
-  @media screen and (max-width: 767px) {

[... diff too long, it was truncated ...]

GitHub sha: 85d1677b

This commit appears in #10261 which was approved by eviltrout. It was merged by davidtaylorhq.