Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data-export] Add new option for default height for query editor #659

Open
wants to merge 1 commit into
base: releaseCandidate
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add compatibility for force.com domain for Sf internal orgs
- Restyle Org Limits [feature 626](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/626) request by [Vincent FINET](https://github.com/VinceFINET)
- Add new options to hide buttons in popup [feature 618](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/618)
- Added ability to set default height for the data export query editor [feature 656](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/656)

## Version 1.25

Expand Down
4 changes: 4 additions & 0 deletions addon/data-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,10 @@ class App extends React.Component {
}
addEventListener("resize", resize);
resize();

// Set initial query editor height from localStorage
const defaultHeight = localStorage.getItem("defaultQueryEditorHeight") || "100";
document.getElementById("query").style.height = `${defaultHeight}px`;
}
componentDidUpdate() {
this.recalculateSize();
Expand Down
3 changes: 2 additions & 1 deletion addon/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ class OptionsTabSelector extends React.Component {
{option: Option, props: {type: "toggle", title: "Include formula fields from suggestion", key: "includeFormulaFieldsFromExportAutocomplete", default: true}},
{option: Option, props: {type: "number", title: "Number of queries stored in the history", key: "numberOfQueriesInHistory", default: 100}},
{option: Option, props: {type: "number", title: "Number of saved queries", key: "numberOfQueriesSaved", default: 50}},
{option: Option, props: {type: "text", title: "Query Templates", key: "queryTemplates", placeholder: "SELECT Id FROM// SELECT Id FROM WHERE//SELECT Id FROM WHERE IN//SELECT Id FROM WHERE LIKE//SELECT Id FROM ORDER BY//SELECT ID FROM MYTEST__c//SELECT ID WHERE"}}
{option: Option, props: {type: "text", title: "Query Templates", key: "queryTemplates", placeholder: "SELECT Id FROM// SELECT Id FROM WHERE//SELECT Id FROM WHERE IN//SELECT Id FROM WHERE LIKE//SELECT Id FROM ORDER BY//SELECT ID FROM MYTEST__c//SELECT ID WHERE"}},
{option: Option, props: {type: "number", title: "Default Query Editor Height (in pixels)", key: "defaultQueryEditorHeight", default: 100}},
]
},
{
Expand Down