Re: [pgAdmin4][Patch]: RM 1253 - Store and reload current location in treeview

From: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: RM 1253 - Store and reload current location in treeview
Date: 2018-10-01 10:06:26
Message-ID: CAFOhELfm-zoGFQSaK+8fqR9TEyjW8fd6sAy=dJ9O3tUSZLAFqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Sep 25, 2018 at 6:26 PM Khushboo Vashi <
khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:

>
>
> On Tue, Sep 25, 2018 at 6:17 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>>
>>
>> On Tue, Sep 25, 2018 at 3:00 AM Khushboo Vashi <
>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>
>>> Hi Dave,
>>>
>>> On Tue, Sep 25, 2018 at 12:15 AM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>
>>>> Hi
>>>> On Mon, Sep 24, 2018 at 2:05 AM Khushboo Vashi <
>>>> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Please find the attached updated patch.
>>>>>
>>>>> Feature Details:
>>>>> - The current tree state as well as the previous will be stored in the
>>>>> sqlite database.
>>>>> - The time interval to store the tree state is configurable via
>>>>> preferences and the default is 30 secs.
>>>>> -1 can be used to stop the tree saving functionality,
>>>>> - Jasmine test cases are included.
>>>>>
>>>>> Thanks,
>>>>> Khushboo
>>>>>
>>>>
>>>> This is looking good, however there are a couple of cases where I think
>>>> it's not quite working as I would expect:
>>>>
>>>> 1) As soon as the user opens pgAdmin, the tree state should be restored.
>>>>
>>>> As per our initial discussion, we have decided that once the user
>>> connects / expands the server, then we will restore that server state.
>>>
>>> *"If the user has switched network that may cause a whole bunch of
>>> connection failures after some period of time. Perhaps we should only
>>> restore when opening a particular server." *
>>>
>>
>> Yeah, I remember that now. I guess it just seems less than ideal - but
>> I'm not sure how we could open everything by default without risking
>> connection failures. Let's stick with the original plan (ie. what you've
>> implemented).
>>
> Okay.
>
>>
>>
>>>
>>> 2) If a database or server is disconnected, I would expect it's state to
>>>> be stored. When it is explicitly re-connected by the user, the state should
>>>> be restored.
>>>>
>>>> This is already implemented and working. Am I missing any particular
>>> scenario?
>>>
>>
>> I tried disconnecting a server and database, and when I re-opened it, the
>> state wasn't restored. Do we explicitly save the state on disconnect, or
>> was it that I needed to wait up to 30 seconds (or should have waited 30
>> seconds before disconnecting)?
>>
> I have explicitly saved the state on the server disconnection. So, on the
> reconnection of the server, the state should be restored.
> But this logic is only applicable on server not on the databases. So, once
> you disconnect the database the state will not be restored.
> Should I include databases also ?
>
>
>>
>>
>>> I think that covers the different cases I'm imagining.
>>>>
>>>
>> I wrote that to try to convince myself I hadn't forgotten anything - I
>> think I had though. When the state is restored on any given branch of the
>> tree, the previously selected node should be re-selected. That doesn't seem
>> to be happening at the moment.
>>
>> This means even if I have opened multiple servers/databases, the selected
item will remain only one.
Is this correct?

> Will do.
>
>> Thanks!
>>
>>
>>>
>>>> Thanks, Dave.
>>>>
>>>> Thanks,
>>> Khushboo
>>>
>>>> --
>>>> 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
>>
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2018-10-01 10:32:46 Re: [pgAdmin4][Patch]: RM 1253 - Store and reload current location in treeview
Previous Message Dave Page 2018-10-01 09:25:24 pgAdmin 4 commit: Bump version number for release.