Re: Bug in Database Nodes in the Tree

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Bug in Database Nodes in the Tree
Дата
Msg-id CA+OCxoxTCNev7Rb2ZMBN0dZOPW-jsFkOJQ0b=mjTM85ExKZSsw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bug in Database Nodes in the Tree  (Yosry Muhammad <yosrym93@gmail.com>)
Ответы Re: Bug in Database Nodes in the Tree  (Khushboo Vashi <khushboo.vashi@enterprisedb.com>)
Список pgadmin-hackers
Hi

On Thu, Jul 18, 2019 at 6:40 AM Yosry Muhammad <yosrym93@gmail.com> wrote:
Hi,

On Thu, Jul 18, 2019, 7:27 AM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi Yosry,

On Wed, Jul 17, 2019 at 10:49 PM Yosry Muhammad <yosrym93@gmail.com> wrote:
Hi Khushboo,

There's a minor bug that I noticed a while back that when you right click a disconnected database (to drop it for example) it automatically connects to the database and expands the node. This behaviour is a little annoying to users (me too), I am trying to fix it.

This behavior is by design as we have considered some of the pgAdmin III behavior. One behavior we can change is that on the selection of the database node, we can just connect it and not expand it and when we expand the database node (by arrow icon or double click), we can connect and expand both.

We need Dave's approval to change this.

I think this makes more sense.

pgAdmin 3 automatically connects databases on select but not servers. I'd be fine with only connecting databases and servers on expand, and not on select. That should not affect auto-expand and treeview state restore at all, but will mean you can right-click a database or server without it connecting. FYI, I've found this behaviour annoying too.

I can't imagine it would require hacking aciTree to make that happen - we'd basically just move the connect function call from the onSelect handler (or whatever it's called) to onExpand wouldn't we?
 


I looked around the code in the browser module (node.js, database.js, menu.js) and I couldn't find a way to modify this behaviour. Is this handled internally by jQuery? Is modifying this behaviour feasible?
 
I think the problem is that the right click event triggers the left event click too. Am I correct?

Basically, the browser tree is generated through the aciTree library, so when required, the public APIs (provided by aciTree) of the events are being called.
In this case, on the selection of the database node, the selected event is used in the database.js file.

Thanks for the clarification. 


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Akshay Joshi
Дата:
Сообщение: pgAdmin 4 commit: Correct the issue number and sequence in release note
Следующее
От: Khushboo Vashi
Дата:
Сообщение: Re: Bug in Database Nodes in the Tree