Subject: Require sugeestion for #1235

From: Yogesh Mahajan <[email-masked]>
Date: Thu, 30 Jan 2025 16:03:31 +0530

Hi,

For issue #1235 <https://github.com/pgadmin-org/pgadmin4/issues/1235> - Query
Tool - Open file should open file in a new tab, here are two the options to
set preference for opening file.
1.Provide split button beside Open file button -
Pros -
a.Provides an easy way to set up the preference.
Cons -
a.One more addition of icon.

2.Provide option with save button dropdown -
Pros -
a.No need to add a split button for the open icon.
Cons -
a.Open operation is listed under save options.

3.Combine all file operations menu in single dropdown -

Pros -
a.All file related options are clubbed together like most of the editors.
b.Allows to add more file operations with the same dropdown.(Like Open
recent - however this is out of scope of this issue.)
Cons -
c.Can't think of any.

Could you please share your suggestions?

Thanks,
Yogesh Mahajan
EnterpriseDB

---

From: Yogesh Mahajan <[email-masked]>
Date: Fri, 7 Feb 2025 11:26:19 +0530

Hi,

Could you please provide your feedback/suggestions?

Thanks,
Yogesh Mahajan
EnterpriseDB

---

From: Aditya Toshniwal <[email-masked]>
Date: Fri, 7 Feb 2025 12:00:55 +0530

Hi Yogesh,

I am in favor of the "Combine all file operations menu in single dropdown"
solution. It is more in-line with menus of other editors and is more
intuitive.

-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com*
<https://www.enterprisedb.com/>
"Don't Complain about Heat, Plant a TREE"

---

From: Usman Khan <[email-masked]>
Date: Fri, 7 Feb 2025 11:42:53 +0500

Hi Yogesh,

I am in favour of the third option you pointed out above but in that case I
suggest changing the icon accordingly as the current icon usually gives
clue about 'file-opening' operation.

Thanks

---

From: Yogesh Mahajan <[email-masked]>
Date: Wed, 12 Feb 2025 16:13:14 +0530

Dave/Team,

I think, major votes are on the design #3 - Combine all file operations
menu in single dropdown.

Thanks,
Yogesh Mahajan
EnterpriseDB

On Fri, Feb 7, 2025 at 12:13 PM Usman Khan <[email-masked]> wrote:

> Hi Yogesh,
>
> I am in favour of the third option you pointed out above but in that case
> I suggest changing the icon accordingly as the current icon usually gives
>> I am in favor of the "Combine all file operations menu in single
>> dropdown" solution. It is more in-line with menus of other editors and is
>> more intuitive.
>>
>>>> For issue #1235 <https://github.com/pgadmin-org/pgadmin4/issues/1235>
>>>>  - Query Tool - Open file should open file in a new tab, here are two
>>>> the options to set preference for opening file.

---

From: Dave Page <[email-masked]>
Date: Wed, 12 Feb 2025 11:05:37 +0000

> I think, major votes are on the design #3 - Combine all file operations

I don't recall ever seeing that design pattern. Do you have any examples?

-- 
Dave Page
pgAdmin: https://www.pgadmin.org
PostgreSQL: https://www.postgresql.org
pgEdge: https://www.pgedge.com

---

From: Yogesh Mahajan <[email-masked]>
Date: Wed, 12 Feb 2025 16:54:27 +0530

Hi Dave,

Design was inspired by the File menu of different editors. Here is a
screenshot for VS code. However, the Open option here always opens the file
in a new tab.

Thanks,
Yogesh Mahajan
EnterpriseDB

On Wed, Feb 12, 2025 at 4:35 PM Dave Page <[email-masked]> wrote:

>>> I am in favour of the third option you pointed out above but in that
>>> case I suggest changing the icon accordingly as the current icon usually
>>> gives clue about 'file-opening' operation.
>>>
>>> Thanks
>>>
>>>>>>  - Query Tool - Open file should open file in a new tab, here are
>>>>>> two the options to set preference for opening file.
>>>>>> b.Allows to add more file operations with the same dropdown.(Like
>>>>>> Open recent - however this is out of scope of this issue.)
>>>>>> Cons -
>>>>>> c.Can't think of any.
>>>>>>

---

From: Dave Page <[email-masked]>
Date: Wed, 12 Feb 2025 12:08:54 +0000

Hi

> screenshot for VS code. However, the Open option here always opens the file

A File menu is quite different from a toolbar button.

>>>>>>> For issue #1235
>>>>>>> <https://github.com/pgadmin-org/pgadmin4/issues/1235> - Query Tool
>>>>>>> - Open file should open file in a new tab, here are two the options to set
>>>>>>> preference for opening file.

---

From: Yogesh Mahajan <[email-masked]>
Date: Wed, 12 Feb 2025 17:49:59 +0530

Hi Dave,

Can you please provide your suggestions for the design? Does #1 or #2 look
good to you?

Thanks,
Yogesh Mahajan
EnterpriseDB

---

From: Dave Page <[email-masked]>
Date: Wed, 12 Feb 2025 13:14:27 +0000

> Can you please provide your suggestions for the design? Does #1 or #2 look

If the menu option in #1 is toggle-able, then I'd say that is the better
option.

>>>>> I think, major votes are on the design #3 - Combine all file
>>>>> operations menu in single dropdown.
>>>>>
>>>>
>>>>>>>>> <https://github.com/pgadmin-org/pgadmin4/issues/1235> - Query

---

From: Yogesh Mahajan <[email-masked]>
Date: Thu, 13 Feb 2025 14:59:13 +0530

Thanks Dave. Will go with #1 design.

Thanks,
Yogesh Mahajan
EnterpriseDB

On Wed, Feb 12, 2025 at 6:44 PM Dave Page <[email-masked]> wrote:

>> Can you please provide your suggestions for the design? Does #1 or #2
>> look good to you?
>>
>

---

From: Aditya Toshniwal <[email-masked]>
Date: Thu, 13 Feb 2025 16:20:43 +0530

Hi Yogesh/Dave,

> Thanks Dave. Will go with #1 design.
It's not entirely what Dave is suggesting. He's suggesting the split button
dropdown should have a checkmark to set the default behaviour of the button.
@Dave Page <[email-masked]> In that case it will contradict with Save
and Save As. Save As here is an extension of the menu and not the
behavioural option.

>>>>>>>> I am in favour of the third option you pointed out above but in
>>>>>>>> that case I suggest changing the icon accordingly as the current icon
>>>>>>>> usually gives clue about 'file-opening' operation.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>>>>> b.Allows to add more file operations with the same
>>>>>>>>>>> dropdown.(Like Open recent - however this is out of scope of this issue.)
>>>>>>>>>>> Cons -
>>>>>>>>>>> c.Can't think of any.
>>>>>>>>>>>

---

From: Dave Page <[email-masked]>
Date: Thu, 13 Feb 2025 11:00:17 +0000

On Thu, 13 Feb 2025 at 10:51, Aditya Toshniwal <
[email-masked]> wrote:

> It's not entirely what Dave is suggesting. He's suggesting the split
> button dropdown should have a checkmark to set the default behaviour of the
> button.

I don't think it contradicts. Open vs. Open In new Tab is, for the most
part, a choice that most users will generally build into their workflow,
whereas Save vs. Save As choices will more commonly depend on the situation
I believe.

In other words, I'm more likely to select the Open behaviour I prefer, and
use it all the time, but the Save behaviour is dependent on what I'm doing
at the time.

---

From: Aditya Toshniwal <[email-masked]>
Date: Thu, 13 Feb 2025 16:54:59 +0530

Hi Dave,

> use it all the time, but the Save behaviour is dependent on what I'm doing
And what about recent files? We're going to add that as well in future.

---

From: Dave Page <[email-masked]>
Date: Thu, 13 Feb 2025 11:36:23 +0000

On Thu, 13 Feb 2025 at 11:25, Aditya Toshniwal <
[email-masked]> wrote:

>>> @Dave Page <[email-masked]> In that case it will contradict with
>>> Save and Save As. Save As here is an extension of the menu and not the
>>> behavioural option.
>>>
>>
>> In other words, I'm more likely to select the Open behaviour I prefer,
>> and use it all the time, but the Save behaviour is dependent on what I'm
>> doing at the time.
>>

They can just be listed on the same menu no?

---

From: Aditya Toshniwal <[email-masked]>
Date: Fri, 14 Feb 2025 13:23:02 +0530

> They can just be listed on the same menu no?
OK.