public inbox for [email protected]  
help / color / mirror / Atom feed
Forcing autocomplete on keypress
3+ messages / 2 participants
[nested] [flat]

* Forcing autocomplete on keypress
@ 2024-12-03 19:15 Zac Warham <[email protected]>
  2024-12-04 03:53 ` Re: Forcing autocomplete on keypress Aditya Toshniwal <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Zac Warham @ 2024-12-03 19:15 UTC (permalink / raw)
  To: [email protected] <[email protected]>

We have a docker setup for pgadmin and we want to force autocomplete on keypress at launch (not through the preferences) using an environment variable or config of some sort. I tried modifying the file at https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/tools/sqleditor/utils/query_tool_pre... and replacing False with True and this works but then breaks postgres in other ways. Is there a proper way of doing this beyond modifying this file?



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Forcing autocomplete on keypress
  2024-12-03 19:15 Forcing autocomplete on keypress Zac Warham <[email protected]>
@ 2024-12-04 03:53 ` Aditya Toshniwal <[email protected]>
  2024-12-04 05:06   ` Re: Forcing autocomplete on keypress Aditya Toshniwal <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Aditya Toshniwal @ 2024-12-04 03:53 UTC (permalink / raw)
  To: Zac Warham <[email protected]>; +Cc: [email protected] <[email protected]>

Hi Zac,

You can use PGADMIN_PREFERENCES_JSON_FILE in
https://www.pgadmin.org/docs/pgadmin4/8.13/container_deployment.html

On Wed, Dec 4, 2024 at 12:45 AM Zac Warham <[email protected]> wrote:

> We have a docker setup for pgadmin and we want to force autocomplete on
> keypress at launch (not through the preferences) using an environment
> variable or config of some sort. I tried modifying the file at
> https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/tools/sqleditor/utils/query_tool_pre... and
> replacing False with True and this works but then breaks postgres in other
> ways. Is there a proper way of doing this beyond modifying this file?
>
>

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


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Forcing autocomplete on keypress
  2024-12-03 19:15 Forcing autocomplete on keypress Zac Warham <[email protected]>
  2024-12-04 03:53 ` Re: Forcing autocomplete on keypress Aditya Toshniwal <[email protected]>
@ 2024-12-04 05:06   ` Aditya Toshniwal <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Aditya Toshniwal @ 2024-12-04 05:06 UTC (permalink / raw)
  To: Zac Warham <[email protected]>; +Cc: pgadmin-support

Hi Zac,

You can raise a feature request here
https://github.com/pgadmin-org/pgadmin4/issues/new if you have any
improvement suggestions.

On Wed, Dec 4, 2024 at 10:13 AM Zac Warham <[email protected]> wrote:

> Thank you for the advice Aditya. I managed to get it working by adding an
> extra line in my docker entrypoint although it does slow the process down a
> little when launching the container
>
> python3 /usr/local/lib/python3.10/dist-packages/pgadmin4/setup.py
> load-servers
> "/usr/local/lib/python3.10/dist-packages/pgadmin4/servers.json"
> python3 /usr/local/lib/python3.10/dist-packages/pgadmin4/setup.py
> set-prefs [email protected]
> sqleditor:auto_completion:autocomplete_on_key_press=true
>
> My concerns with overriding the preference file path was that I then have
> to manage the ownership permissions of the file that is created which is
> tedious as we run various different users in production.
>
> Thank you for pointing me in the right direction though!
> ------------------------------
> *From:* Aditya Toshniwal <[email protected]>
> *Sent:* Tuesday, 3 December 2024 7:53 PM
> *To:* Zac Warham <[email protected]>
> *Cc:* [email protected] <
> [email protected]>
> *Subject:* Re: Forcing autocomplete on keypress
>
> Hi Zac,
>
> You can use PGADMIN_PREFERENCES_JSON_FILE in
> https://www.pgadmin.org/docs/pgadmin4/8.13/container_deployment.html
>
> On Wed, Dec 4, 2024 at 12:45 AM Zac Warham <[email protected]> wrote:
>
> We have a docker setup for pgadmin and we want to force autocomplete on
> keypress at launch (not through the preferences) using an environment
> variable or config of some sort. I tried modifying the file at
> https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/tools/sqleditor/utils/query_tool_pre... and
> replacing False with True and this works but then breaks postgres in other
> ways. Is there a proper way of doing this beyond modifying this file?
>
>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com*
> <https://www.enterprisedb.com/;
> "Don't Complain about Heat, Plant a TREE"
>


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


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-12-04 05:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-03 19:15 Forcing autocomplete on keypress Zac Warham <[email protected]>
2024-12-04 03:53 ` Aditya Toshniwal <[email protected]>
2024-12-04 05:06   ` Aditya Toshniwal <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox