Обсуждение: Regarding removal for wcDocker and replace it with rc-dock #6479

Поиск
Список
Период
Сортировка

Regarding removal for wcDocker and replace it with rc-dock #6479

От
Aditya Toshniwal
Дата:
Hi Hackers,

I am working on removing the jQuery based wcDocker with ReactJS based rc-dock.
The new lib allows us to reset layout without reloading pgAdmin. The one thing it doesn't provide is adding a panel using tab bar context menu. I was able to add a custom context menu but only on the tabs and not on the complete tab bar.
So my question is, do we need something to add a panel back or reset layout should be enough as we'll not reload pgAdmin?
If yes, please suggest on how we can do it without using the context menu. One way is to have a menu with check menu items for each default panel.
Attached is a screen recording to show the current behavior.



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"
Вложения

Re: Regarding removal for wcDocker and replace it with rc-dock #6479

От
Nikhil Mohite
Дата:
Hi Aditya,

On Fri, Aug 11, 2023 at 12:56 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

I am working on removing the jQuery based wcDocker with ReactJS based rc-dock.
The new lib allows us to reset layout without reloading pgAdmin. The one thing it doesn't provide is adding a panel using tab bar context menu. I was able to add a custom context menu but only on the tabs and not on the complete tab bar.
So my question is, do we need something to add a panel back or reset layout should be enough as we'll not reload pgAdmin?
If yes, please suggest on how we can do it without using the context menu. One way is to have a menu with check menu items for each default panel.
Attached is a screen recording to show the current behavior.

If we add a button in browser explorer(We can change the location of a button) and click on it will show a drop-down menu with a list of all closed tabs, and selecting it will open the selected tab on the right side.
Something like this, click on the (+) plus button on Object Explorer and select the tab name from drop-down options. (I know there are Query Tool, Search, and PSQL Tool buttons already there we can change the location of the button)
image.png


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"

Thanks,
Nikhil Mohite 
Вложения

Re: Regarding removal for wcDocker and replace it with rc-dock #6479

От
Aditya Toshniwal
Дата:
Hi Nikhil,

On Fri, Aug 11, 2023 at 11:06 AM Nikhil Mohite <nikhil.mohite@enterprisedb.com> wrote:
Hi Aditya,

On Fri, Aug 11, 2023 at 12:56 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

I am working on removing the jQuery based wcDocker with ReactJS based rc-dock.
The new lib allows us to reset layout without reloading pgAdmin. The one thing it doesn't provide is adding a panel using tab bar context menu. I was able to add a custom context menu but only on the tabs and not on the complete tab bar.
So my question is, do we need something to add a panel back or reset layout should be enough as we'll not reload pgAdmin?
If yes, please suggest on how we can do it without using the context menu. One way is to have a menu with check menu items for each default panel.
Attached is a screen recording to show the current behavior.

If we add a button in browser explorer(We can change the location of a button) and click on it will show a drop-down menu with a list of all closed tabs, and selecting it will open the selected tab on the right side.
Something like this, click on the (+) plus button on Object Explorer and select the tab name from drop-down options. (I know there are Query Tool, Search, and PSQL Tool buttons already there we can change the location of the button)
I think we can do that, but on the main panel and not on object explorer and with some relevant icon. 
Any other suggestions/ideas?
image.png


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"

Thanks,
Nikhil Mohite 


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"
Вложения

Re: Regarding removal for wcDocker and replace it with rc-dock #6479

От
Dave Page
Дата:


On Fri, 11 Aug 2023 at 07:42, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Nikhil,

On Fri, Aug 11, 2023 at 11:06 AM Nikhil Mohite <nikhil.mohite@enterprisedb.com> wrote:
Hi Aditya,

On Fri, Aug 11, 2023 at 12:56 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

I am working on removing the jQuery based wcDocker with ReactJS based rc-dock.
The new lib allows us to reset layout without reloading pgAdmin. The one thing it doesn't provide is adding a panel using tab bar context menu. I was able to add a custom context menu but only on the tabs and not on the complete tab bar.
So my question is, do we need something to add a panel back or reset layout should be enough as we'll not reload pgAdmin?
If yes, please suggest on how we can do it without using the context menu. One way is to have a menu with check menu items for each default panel.
Attached is a screen recording to show the current behavior.

If we add a button in browser explorer(We can change the location of a button) and click on it will show a drop-down menu with a list of all closed tabs, and selecting it will open the selected tab on the right side.
Something like this, click on the (+) plus button on Object Explorer and select the tab name from drop-down options. (I know there are Query Tool, Search, and PSQL Tool buttons already there we can change the location of the button)
I think we can do that, but on the main panel and not on object explorer and with some relevant icon. 
Any other suggestions/ideas?

I'm surprised a man of your talents can't catch the right-click - any particular reason it's giving you problems?

Assuming it really is that hard, can we do something like Chrome (similar to Nikhil's suggestion)?

Screenshot 2023-08-11 at 09.33.53.png
 
image.png


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"

Thanks,
Nikhil Mohite 


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"


--
Вложения

Re: Regarding removal for wcDocker and replace it with rc-dock #6479

От
Aditya Toshniwal
Дата:
Hi Dave,

On Fri, Aug 11, 2023 at 2:05 PM Dave Page <dpage@pgadmin.org> wrote:


On Fri, 11 Aug 2023 at 07:42, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Nikhil,

On Fri, Aug 11, 2023 at 11:06 AM Nikhil Mohite <nikhil.mohite@enterprisedb.com> wrote:
Hi Aditya,

On Fri, Aug 11, 2023 at 12:56 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

I am working on removing the jQuery based wcDocker with ReactJS based rc-dock.
The new lib allows us to reset layout without reloading pgAdmin. The one thing it doesn't provide is adding a panel using tab bar context menu. I was able to add a custom context menu but only on the tabs and not on the complete tab bar.
So my question is, do we need something to add a panel back or reset layout should be enough as we'll not reload pgAdmin?
If yes, please suggest on how we can do it without using the context menu. One way is to have a menu with check menu items for each default panel.
Attached is a screen recording to show the current behavior.

If we add a button in browser explorer(We can change the location of a button) and click on it will show a drop-down menu with a list of all closed tabs, and selecting it will open the selected tab on the right side.
Something like this, click on the (+) plus button on Object Explorer and select the tab name from drop-down options. (I know there are Query Tool, Search, and PSQL Tool buttons already there we can change the location of the button)
I think we can do that, but on the main panel and not on object explorer and with some relevant icon. 
Any other suggestions/ideas?

I'm surprised a man of your talents can't catch the right-click - any particular reason it's giving you problems?
Thank you for your appreciation. The problem here is rc-dock doesn't provide any API to allow the onContextMenu event on the tab bar. I could hack and add using JS native querySelector and addListener, but that is error prone and not the right way to do it in React. I have used a custom component for tab title, so I was able to capture the event on the tabs.

Assuming it really is that hard, can we do something like Chrome (similar to Nikhil's suggestion)?

Screenshot 2023-08-11 at 09.33.53.png
Chrome has only one type of tab, but pgAdmin has many. I am thinking of something similar to PyCharm.
image.png
 
 
image.png


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"

Thanks,
Nikhil Mohite 


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"


--


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | enterprisedb.com
"Don't Complain about Heat, Plant a TREE"
Вложения

Re: Regarding removal for wcDocker and replace it with rc-dock #6479

От
Dave Page
Дата:


On Fri, 11 Aug 2023 at 09:48, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Dave,

I think we can do that, but on the main panel and not on object explorer and with some relevant icon. 
Any other suggestions/ideas?

I'm surprised a man of your talents can't catch the right-click - any particular reason it's giving you problems?
Thank you for your appreciation. The problem here is rc-dock doesn't provide any API to allow the onContextMenu event on the tab bar. I could hack and add using JS native querySelector and addListener, but that is error prone and not the right way to do it in React. I have used a custom component for tab title, so I was able to capture the event on the tabs.

Assuming it really is that hard, can we do something like Chrome (similar to Nikhil's suggestion)?

Screenshot 2023-08-11 at 09.33.53.png
Chrome has only one type of tab, but pgAdmin has many. I am thinking of something similar to PyCharm.
image.png

That works for me.


--
Вложения