Commit Graph

33 Commits (b51eef12b7b2a167277c599336afe11e657dfbea)

Author SHA1 Message Date
Rohit Bhati 509c696aa3
Fixed an issue where the copy shortcut was not working in the Query Tool data grid. #7920 2024-10-09 17:06:51 +05:30
Rohit Bhati 4cb0f87dfd
Added support for auto-detecting and setting the End-of-line character (LF/CRLF) in the query tool editor. #7393 2024-09-24 16:39:08 +05:30
Ashesh Vashi e9af0c3226
Improved the extendability of the SchemaView and DataGridView. (#7876)
Restructured these modules for ease of maintenance and apply the single
responsibility principle (wherever applicable).

* SchemaView

 - Split the code based on the functionality and responsibility.
 - Introduced a new View 'InlineView' instead of using the
   'nextInline' configuration of the fields to have a better, and
   manageable view.
 - Using the separate class 'SchemaState' for managing the data and
   states of the SchemaView (separated from the 'useSchemaState'
   custom hook).
 - Introduced three new custom hooks 'useFieldValue',
   'useFieldOptions', 'useFieldError' for the individual control to
   use for each Schema Field.
 - Don't pass value as the parameter props, and let the
   'useFieldValue' and other custom hooks to decide, whether to
   rerender the control itself or the whole dialog/view. (single
   responsibility principle)
 - Introduced a new data store with a subscription facility.
 - Moving the field metadata (option) evaluation to a separate place
   for better management, and each option can be defined for a
   particular kind of field (for example - collection, row, cell,
   general, etc).
 - Allow to provide custom control for all kind of Schema field.

* DataGridView

 - Same as SchemaView, split the DataGridView call into smaller,
   manageable chunks. (For example - grid, row, mappedCell, etc).
 - Use context based approach for providing the row and table data
   instead of passing them as parameters to every component
   separately.
 - Have a facility to extend this feature separately in future.
   (for example - selectable cell, column grouping, etc.)
 - Separated the features like deletable, editable, reorder,
   expandable etc. cells using the above feature support.
 - Added ability to provide the CustomHeader, and CustomRow through the
   Schema field, which will extend the ability to customize better.
 - Removed the 'DataGridViewWithHeaderForm' as it has been achieved
   through providing 'CustomHeader', and also introduced
   'DataGridFormHeader' (a custom header) to achieve the same feature
   as 'DataGridViewWithHeaderForm'.
2024-09-09 14:27:31 +05:30
Aditya Toshniwal 1a1734cf5c Allow running non-continuous selected SQL code blocks in the query tool. #7293 2024-08-29 12:41:58 +05:30
Aditya Toshniwal 242dd48cbd Improve code highlighting in query editor. #7748 2024-08-14 16:48:51 +05:30
Pravesh Sharma 654dc0e2d7
Fixed an issue where the value in the find box is not updating with selected text in editor if find is already open and re-triggered. #7775 2024-08-06 11:59:22 +05:30
Rohit Bhati 8030bc708b
Add support for highlighting selection matches in the query editor. #7530 2024-07-18 17:51:20 +05:30
Aditya Toshniwal dbdea181a9 Fixed an issue where pop-up notifications from Object Explorer wouldn't get dismissed automatically if the Query Tool was opened. #6571 2024-07-09 16:25:04 +05:30
Aditya Toshniwal dcfef154ce
- Set the browser target to ES6 and reduce the JS bundle size considerably
- Upgrade ESLint to v9.x and migrate the .eslintrc.js file to make it work
2024-07-04 18:25:47 +05:30
Khushboo Vashi 4f415f9768
Added support for viewing PostgreSQL Server Logs in Text, CSV and JSON formats. #3981 2024-07-03 16:17:29 +05:30
Aditya Toshniwal 9279393dcd Add missing files from last commit. #7593 2024-06-19 17:57:34 +05:30
Aditya Toshniwal 439d6cb28f Fixed an issue where backslash breaks syntax highlighting. #7528 2024-06-17 16:16:15 +05:30
Aditya Toshniwal ad34ee2699 Fixed new line indentation in query editor and add a user preference to disable it. #7295 2024-06-13 18:06:13 +05:30
Aditya Toshniwal e03d65d547
Fixed an issue where query tool shortcuts for find/replace are not working. #7555 2024-06-13 17:26:47 +05:30
Akshay Joshi df2f3460f0 Fix the following SonarQube code smells:
1) Use the "RegExp.exec()" method instead.
2) Remove parameter form or provide default value.
3) Extract this nested ternary operation into an independent statement.
4) Replace this character class by the character itself.
5) Unnecessary use of conditional expression for default assignment.
6) Prefer using an optional chain expression instead, as it's more concise and easier to read.
2024-06-11 18:07:22 +05:30
Akshay Joshi 8857f0d179 Fix SonarQube code smells:
1) String literals should not be duplicated.
2) Prefer using an optional chain expression instead, as it's more concise and easier to read.
3) Expected the Promise rejection reason to be an Error.
2024-06-10 18:04:32 +05:30
Yogesh Mahajan cc999ae5a5
Remove the usage of MUI makeStyles as it doesn't support React 18. #7363 2024-06-06 17:13:12 +05:30
Anil Sahoo 6690b16f8a
Added support for executing the query at the cursor position in the query tool. #6841 2024-05-27 16:11:59 +05:30
Rohit Bhati 4e3ec91d23
Added support for the 'Add to macros' feature and fixed various usability issues. #4735 2024-05-24 15:30:31 +05:30
Aditya Toshniwal 9647482791 Fixed incorrect highlighting for C-Style escape strings in SQL editor. #7485 2024-05-20 10:13:30 +05:30
Akshay Joshi 3e0ade5a59 Fixed an issue where pressing backspace should remove the spaces and not the entire tab width, on enabling 'Use spaces?' in the preferences. #7317 2024-04-22 12:33:38 +05:30
Aditya Toshniwal 29ccdb3242 Fixed an issue where debugger was not scrolling automatically on stepping. #7275 2024-04-16 15:33:42 +05:30
Aditya Toshniwal ee0687ecd3 Add a function getQueryAt to get the SQL query at given cursor position from a CodeMirror input 2024-04-13 15:47:18 +05:30
Yogesh Mahajan 102e0a9839
- Update MUI v4 to v5
- Remove the SCSS dependency completely and use MUI for theming.
- Update - date-fns, @date-io, notistack. Remove - popper.js, sass-loader.
- Cleanup webpack config.
- Port PSQL tool to use MUI themes instead of SCSS theme.
- Theme change will reflect realtime without refreshing pgAdmin.
2024-04-09 08:21:14 +05:30
Aditya Toshniwal c9345ad618 Fixed an issue where double dollar quoted code is treated as string in syntax highlighter. #7294 2024-04-08 15:32:01 +05:30
Aditya Toshniwal c0a1429664 Fix failing feature tests 2024-03-26 11:20:04 +05:30
Aditya Toshniwal cc1ce09b73 More CodeMirror fixes. #7268
Fix query tool autocomplete results when cursor is in between the SQL query. #7299
Fix an issue in query tool where custom keyboard shortcuts are not working for some. #7305
2024-03-23 18:22:06 +05:30
Aditya Toshniwal f351b10ed0 Fix an issue in query tool where toggle case of selected text loses selection. #7277
Also make changes to give pgAdmin shortcuts higher priority over CodeMirror default shortcuts.
2024-03-14 18:18:53 +05:30
Aditya Toshniwal 794c7cb335 Fixed multiple editor related issues:
1. Replace option in query tool edit menu is not working on non-Mac OS. #7262
2. Format SQL shortcut and multiline selection are not working. #7268
3. "Use Spaces?" Preference of Editor is not working. #7269
2024-03-11 16:52:56 +05:30
Aditya Toshniwal a5530f59f7 Fix sonarqube issues for the rule - 'If' statement should not be the only statement in 'else' block 2024-02-26 11:55:36 +05:30
Aditya Toshniwal 29e85a6b06 Fix SonarQube issues 2024-02-22 16:54:20 +05:30
Aditya Toshniwal b5bd236387 Fix edit menu related issues of query tool codemirror 2024-02-21 15:54:57 +05:30
Aditya Toshniwal d3ede3151a
Upgrade CodeMirror from version 5 to 6. #7097 2024-02-21 11:15:25 +05:30