Re: Improve UX of YUM/DNF download form

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Improve UX of YUM/DNF download form
Date: 2020-06-09 11:58:25
Message-ID: CA+OCxoyvcrWPKGgTDQj8Qw47kc62abJA=+iH+kBfiPV71qt7xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

So here's the updated patch following some discussion with Magnus:

- Make the copyScript function more generic so it can be used elsewhere.
- Don't include comments and blank lines in the copied text.
- Move the css into main.css.
- Add the actual install step to the Debian/Ubuntu instructions.
- Improve naming of vars, classes, ids etc.
- Ensure the copyScript function works fine with < > and so-on in the
script.

On Tue, Jun 9, 2020 at 12:49 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Tue, Jun 9, 2020 at 12:20 PM Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
> wrote:
>
>> I took a peek at the updated yum.js. There's a couple unused variables in
>> the script generation and it doesn't escape the generated text before
>> assigning it to the DOM node. Not an issue now as there's nothing that'd
>> break it, but if it's ever updated to include a redirect ("<") or something
>> else hokey it'd break.
>>
>
>> How about the attached? It splits the script generation into its own
>> function returning a string and has the archChanged() only handle updating
>> the DOM. It uses jQuery .text(...) for the DOM update so that the contents
>> are escaped.
>>
>> I don't have the full site running locally but adding the new DOM node
>> and copy / pasting in the browser to manipulate the live site with this
>> code seems to work fine.
>>
>
> Thanks. The code has changed massively since the last patch (thanks to
> Magnus harassing me about more changes on IM). New patch to follow - I'll
> look to incorporate your tweaks.
>
> --
> 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

Attachment Content-Type Size
pgweb-rh-setup-v4.diff application/octet-stream 11.6 KB

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Jonathan S. Katz 2020-06-09 12:27:43 Re: Improve UX of YUM/DNF download form
Previous Message Dave Page 2020-06-09 11:49:29 Re: Improve UX of YUM/DNF download form