public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][Patch] - Bug #6945 - JSON Editor code mode scrolling issue, 6944 - JSON editor preview colours have inappropriate contrast in dark mode
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][Patch] - Bug #6945 - JSON Editor code mode scrolling issue, 6944 - JSON editor preview colours have inappropriate contrast in dark mode
@ 2021-11-12 13:53 Yogesh Mahajan <[email protected]>
2021-11-15 07:27 ` Re: [pgAdmin][Patch] - Bug #6945 - JSON Editor code mode scrolling issue, 6944 - JSON editor preview colours have inappropriate contrast in dark mode Akshay Joshi <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Yogesh Mahajan @ 2021-11-12 13:53 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
Please find the attached patch which fixes issues related to scrolling in
jsoneditor and color issue in preview mode in dark theme.
Thanks,
Yogesh Mahajan
EnterpriseDB
Attachments:
[application/octet-stream] RM6945_6944_v1.patch (2.4K, 3-RM6945_6944_v1.patch)
download | inline diff:
diff --git a/web/pgadmin/static/js/slickgrid/editors.js b/web/pgadmin/static/js/slickgrid/editors.js
index e2e6cd2c9..4167b29b5 100644
--- a/web/pgadmin/static/js/slickgrid/editors.js
+++ b/web/pgadmin/static/js/slickgrid/editors.js
@@ -327,6 +327,12 @@ import Alertify from 'pgadmin.alertifyjs';
}
};
+ this.resizeJsoneditorObserver = new ResizeObserver(() => {
+ if ($editor){
+ $editor.resize();
+ }
+ });
+
this.save = function() {
args.commitChanges();
};
@@ -352,6 +358,7 @@ import Alertify from 'pgadmin.alertifyjs';
};
this.destroy = function() {
+ this.resizeJsoneditorObserver.unobserve(document.getElementById('pg-json-editor'));
$editor.destroy();
$wrapper.remove();
};
@@ -408,6 +415,7 @@ import Alertify from 'pgadmin.alertifyjs';
throw(error);
}, 'jsoneditorchunk');
}
+ this.resizeJsoneditorObserver.observe(document.getElementById('pg-json-editor'));
};
this.serializeValue = function() {
@@ -641,6 +649,7 @@ import Alertify from 'pgadmin.alertifyjs';
};
this.destroy = function() {
+ this.resizeJsoneditorObserver.unobserve(document.getElementById('pg-json-editor'));
$editor.destroy();
$wrapper.remove();
};
@@ -649,6 +658,13 @@ import Alertify from 'pgadmin.alertifyjs';
$editor.focus();
};
+ // listen to resize event for json editor
+ this.resizeJsoneditorObserver = new ResizeObserver(() => {
+ if ($editor){
+ $editor.resize();
+ }
+ });
+
this.loadValue = function(item) {
var data = defaultValue = item[args.column.field];
tmpdata = data;
@@ -689,6 +705,7 @@ import Alertify from 'pgadmin.alertifyjs';
}, function(error){
throw(error);
}, 'jsoneditorchunk');
+ this.resizeJsoneditorObserver.observe(document.getElementById('pg-json-editor'));
};
this.serializeValue = function() {
diff --git a/web/pgadmin/static/scss/_jsoneditor.overrides.scss b/web/pgadmin/static/scss/_jsoneditor.overrides.scss
index 93c1d1feb..4c27e5b3a 100644
--- a/web/pgadmin/static/scss/_jsoneditor.overrides.scss
+++ b/web/pgadmin/static/scss/_jsoneditor.overrides.scss
@@ -230,7 +230,9 @@ div.jsoneditor td.jsoneditor-tree {
}
pre.jsoneditor-preview{
- background-color: $color-gray-lighter !important;
+ background-color: $color-gray-lighter !important;
+ opacity: 0.8;
+ color: $color-fg;
}
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][Patch] - Bug #6945 - JSON Editor code mode scrolling issue, 6944 - JSON editor preview colours have inappropriate contrast in dark mode
2021-11-12 13:53 [pgAdmin][Patch] - Bug #6945 - JSON Editor code mode scrolling issue, 6944 - JSON editor preview colours have inappropriate contrast in dark mode Yogesh Mahajan <[email protected]>
@ 2021-11-15 07:27 ` Akshay Joshi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2021-11-15 07:27 UTC (permalink / raw)
To: Yogesh Mahajan <[email protected]>; +Cc: pgadmin-hackers
Thanks, the patch applied.
On Fri, Nov 12, 2021 at 7:24 PM Yogesh Mahajan <
[email protected]> wrote:
> Hi,
>
> Please find the attached patch which fixes issues related to scrolling in
> jsoneditor and color issue in preview mode in dark theme.
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-11-15 07:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 13:53 [pgAdmin][Patch] - Bug #6945 - JSON Editor code mode scrolling issue, 6944 - JSON editor preview colours have inappropriate contrast in dark mode Yogesh Mahajan <[email protected]>
2021-11-15 07:27 ` Akshay Joshi <[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