public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Page <[email protected]>
To: Darren Duncan <[email protected]>
Cc: pgAdmin Support <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Cc: Akshay Joshi <[email protected]>
Subject: Re: Proposal: Drop support for Internet Explorer
Date: Thu, 9 Apr 2020 12:36:20 +0100
Message-ID: <CA+OCxowbi+rOK6gxfCd7d9+Dr3Wka27aRmAh7g7=sC1QdQhGqg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CA+OCxowooZqhT3BBLo5KshKjWJZNN7ERQydBmUrRLz=n+1LQKA@mail.gmail.com>
<[email protected]>
Hi
On Thu, Apr 9, 2020 at 12:26 AM Darren Duncan <[email protected]>
wrote:
> If its hard to know how many people are actually using Internet Explorer:
>
> You could make the next release of pgAdmin display a message occasionally
> to
> users of Internet Explorer saying that Internet Explorer will no longer be
> officially supported in a future version, and when that version comes the
> message says now no longer supported.
>
> You can then see how many people contact you about this to express concern.
>
Good idea. I've hacked up a patch to warn users if they're using a
deprecated or unsupported browser.
CCing Akshay for a review :-)
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[application/octet-stream] Warn_if_using_a_deprecated_or_unsupported_browser.patch (3.1K, 3-Warn_if_using_a_deprecated_or_unsupported_browser.patch)
download | inline diff:
Index: web/pgadmin/browser/templates/browser/browser.html
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/templates/browser/browser.html (date 1586431105718)
+++ web/pgadmin/browser/templates/browser/browser.html (date 1586431105718)
@@ -0,0 +1,5 @@
+<p>{{ _('Your browser was detected as {0} version {1}, which is either
+ deprecated or not supported by pgAdmin 4.').format(browser, version) }}</p>
+<p>{{ _('Please visit the <a class="alert-link"
+ href="https://www.pgadmin.org/faq/#11" target="_new">FAQ</a> to see the
+ supported browsers.') }}</p>
Index: web/config.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/config.py (revision 8a550b569ff5aadb8c2d99cbef4a4233ab00e413)
+++ web/config.py (date 1586430908666)
@@ -359,6 +359,9 @@
CA_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
"cacert.pem")
+# Check if the detected browser is supported
+CHECK_SUPPORTED_BROWSER = True
+
##########################################################################
# Storage Manager storage url config settings
# If user sets STORAGE_DIR to empty it will show all volumes if platform
Index: web/pgadmin/browser/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/__init__.py (revision 8a550b569ff5aadb8c2d99cbef4a4233ab00e413)
+++ web/pgadmin/browser/__init__.py (date 1586431972063)
@@ -543,6 +543,38 @@
base_url=None
)
+ # Check the browser is a support version
+ # NOTE: If the checks here are updated, make sure the supported versions
+ # at https://www.pgadmin.org/faq/#11 are updated to match!
+ if config.CHECK_SUPPORTED_BROWSER:
+ browser = request.user_agent.browser
+ version = request.user_agent.version and int(
+ request.user_agent.version.split('.')[0])
+
+ browser_name = None
+ if browser == 'chrome' and version < 72:
+ browser_name = 'Chrome'
+ elif browser == 'firefox' and version < 65:
+ browser_name = 'Firefox'
+ elif browser == 'edge' and version < 44:
+ browser_name = 'Edge'
+ elif browser == 'safari' and version < 12:
+ browser_name = 'Safari'
+ elif browser == 'msie':
+ browser_name = 'Internet Explorer'
+ elif browser != 'chrome' and browser != 'firefox' and \
+ browser != 'edge' and browser != 'safari':
+ browser_name = browser
+
+ if browser_name is not None:
+ msg = render_template(
+ MODULE_NAME + "/browser.html",
+ version=version,
+ browser=browser_name
+ )
+
+ flash(msg, 'warning')
+
# Get the current version info from the website, and flash a message if
# the user is out of date, and the check is enabled.
if config.UPGRADE_CHECK_ENABLED:
view thread (19+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Proposal: Drop support for Internet Explorer
In-Reply-To: <CA+OCxowbi+rOK6gxfCd7d9+Dr3Wka27aRmAh7g7=sC1QdQhGqg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox