public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Page <[email protected]>
To: Neel Patel <[email protected]>
Cc: Khushboo Vashi <[email protected]>
Cc: 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: Tue, 14 Apr 2020 15:46:56 +0100
Message-ID: <CA+OCxoxJktjHXcLYBbFpQHva8NHNUJN14UV8GhbMJeZaYguskg@mail.gmail.com> (raw)
In-Reply-To: <CACCA4P3DYZJjx+_zNxhHfjzftN7no9QAvwWfyzCsBa+HjoMspg@mail.gmail.com>
References: <CA+OCxowooZqhT3BBLo5KshKjWJZNN7ERQydBmUrRLz=n+1LQKA@mail.gmail.com>
	<[email protected]>
	<CA+OCxowbi+rOK6gxfCd7d9+Dr3Wka27aRmAh7g7=sC1QdQhGqg@mail.gmail.com>
	<[email protected]>
	<CAFOhELcYLbVTW-FM+VHTzPTW86qP-zj+Cc9-Yh+JsPU3w7=3Pg@mail.gmail.com>
	<CA+OCxozTYRaa12yA95P58FeYDZ1MPLhJ=KHLqR_DuPBPWu_44w@mail.gmail.com>
	<CACCA4P3DYZJjx+_zNxhHfjzftN7no9QAvwWfyzCsBa+HjoMspg@mail.gmail.com>

Ooops. Thanks for catching that. Here it is.

On Tue, Apr 14, 2020 at 3:45 PM Neel Patel <[email protected]>
wrote:

> Hi Dave,
>
> Looks like patch is missing in attachment.
>
> Thanks,
> Neel Patel
>
>
> On Tue 14 Apr, 2020, 6:53 PM Dave Page, <[email protected]> wrote:
>
>> Here's an updated patch that gives a slightly different message if the
>> browser is unknown vs. unsupported/deprecated. As with the previous patch,
>> the check can be disabled in the config.
>>
>> On Fri, Apr 10, 2020 at 5:07 AM Khushboo Vashi <
>> [email protected]> wrote:
>>
>>>
>>>
>>> On Thu, Apr 9, 2020 at 11:57 PM Darren Duncan <[email protected]>
>>> wrote:
>>>
>>>> The patch looks good as much as I understand it, but this raises an
>>>> important
>>>> question:
>>>>
>>>> How should one best handle minority browsers that may be completely
>>>> modern but
>>>> you may not specifically know about them?  Such as the newer crop of
>>>> browsers
>>>> that emphasize stronger privacy or may have fewer identifiers?
>>>>
>>>> While going on a whitelist as the patch essentially does for known good
>>>> browsers
>>>> is conservative, I feel that an alteration would be good.
>>>>
>>>> I propose dividing the browsers/environments into 3 categories, which
>>>> are
>>>> recognized-supported, recognized-unsupported, and unrecognized.
>>>>
>>>
>>>> So the unsupported older versions of supported browsers get a stronger
>>>> message
>>>> encouraging a browser switch as they are recognized as unsupported,
>>>> while
>>>> unrecognized browsers get a different weaker message saying they
>>>> weren't
>>>> recognized so we can't determine if they'd work; both can point to the
>>>> list of
>>>> known supported browsers.
>>>>
>>>> I do agree with this suggestion.
>>>
>>>
>>>> Related to this, there could be an application toggle that affects the
>>>> unrecognized category where users can basically say, yes I understand
>>>> you don't
>>>> recognize this browser, please hide the warning, or something like that.
>>>>
>>>> Also, it probably goes without saying, but the code/templates will need
>>>> to be
>>>> structured in such a way that the warning message uses about plain as
>>>> possible
>>>> HTML so that if the browser doesn't support displaying the UI in
>>>> general it can
>>>> at least display the message.
>>>>
>>>> -- Darren Duncan
>>>>
>>>> On 2020-04-09 4:36 a.m., Dave Page wrote:
>>>> > Hi
>>>> >
>>>> > On Thu, Apr 9, 2020 at 12:26 AM Darren Duncan 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
>>>>
>>>>
>>>>
>>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>

-- 
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_v2.patch (3.6K, 3-Warn_if_using_a_deprecated_or_unsupported_browser_v2.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 1586870426046)
+++ web/pgadmin/browser/templates/browser/browser.html	(date 1586870426046)
@@ -0,0 +1,13 @@
+{% if known %}
+<p>{{ _('Your browser was detected as <strong>{0}</strong> version
+    <strong>{1}</strong>, which is either deprecated or not supported by
+    pgAdmin 4.').format(browser, version) }}</p>
+{% else %}
+<p>{{ _('Your browser was detected as <strong>{0}</strong> version
+    <strong>{1}</strong>, which pgAdmin has not been tested with. pgAdmin may
+    not work as expected, and any issues reported when using this browser may
+    not be fixed.').format(browser, version) }}</p>
+{% endif %}
+<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 65bc196ebab314178bf9523f91ef9f9f07d5e4e8)
+++ web/config.py	(date 1586869660607)
@@ -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 65bc196ebab314178bf9523f91ef9f9f07d5e4e8)
+++ web/pgadmin/browser/__init__.py	(date 1586870498522)
@@ -543,6 +543,41 @@
             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
+        browser_known = True
+        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 != 'chrom' and browser != 'firefox' and \
+                browser != 'edge' and browser != 'safari':
+            browser_name = browser
+            browser_known = False
+
+        if browser_name is not None:
+            msg = render_template(
+                MODULE_NAME + "/browser.html",
+                version=version,
+                browser=browser_name,
+                known=browser_known
+            )
+
+            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], [email protected], [email protected]
  Subject: Re: Proposal: Drop support for Internet Explorer
  In-Reply-To: <CA+OCxoxJktjHXcLYBbFpQHva8NHNUJN14UV8GhbMJeZaYguskg@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