-
Notifications
You must be signed in to change notification settings - Fork 6
Fix preview not updating when autosave is off - issue 120 #125
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #125 +/- ##
========================================
Coverage 87.61% 87.62%
========================================
Files 46 46
Lines 1470 1471 +1
Branches 322 334 +12
========================================
+ Hits 1288 1289 +1
Misses 180 180
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| limit: string; | ||
| errors: List<Map>; | ||
| unsupported: List<Map>; | ||
| originalSoqlStatement: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The preview component is reactive to this property. Previously, we were only displaying the soql query from the text document when we got a onDidChangeTextDocument event. But when the user interacts with the UI, we also generate the soql statement. So we can use the soql statement generated by the user interaction with the form to also display the soql statement in the preview by adding this property to the immutable model when we update it.
| "name": "@salesforce/soql-builder-ui", | ||
| "description": "SOQL Builder UI with LWC", | ||
| "version": "0.0.28", | ||
| "version": "0.0.29", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready to publish a new version once this is QAd
jonnyhork
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this looks good. I can't remember why we didn't do it this way before? Also, do we know the source of the bug, when and what changed?
So we used to always show the preview from the soql statement that was generated by the UI. But then we had that issue where the user could open a soql query from a text editor that we didn't support...but we still wanted to show them the soql statement and allow them to run what they see. So we switched it to only update the preview from the incoming soql statement. I think what we want is show the soql statement from the text editor when the change event happens. But also, when the user interacts with our form, immediately update the soql statement. Since we are sending that to the text editor anyway. It's like the best of both worlds now. I hope. |
|
QA Passed for me |
* Fix preview not updating when autosave is off - issue 120 (#125) * add soql-statement to model * verify that we include the soql statement in the model * update the package version so we can publish and consume * Add smarter completion on GROUP BY clause and WHERE literals (#126) * Initial support for Aggregate functions. Also: * Fix: Propose "COUNT()" only if right after "SELECT" * Remove special-case for "SELECT (SELECT ), | FROM Foo". Not worth it * Add completion inside function expression Example: SELECT AVG(|) FROM Also: * Improve ANTLR error recovery to better extract FROM expresssions * Make completions inside function expression type-aware * Add smarter completion on GROUP BY clause Also: * Complete only with "groupable" fields. * Give priority to complete GROUP BY with fields which appear on SELECT and are not aggregated or groupped. * On ORDER BY: Complete only with "sortable" fields * Add completion on semi-join SELECTs (in WHERE clauses) * Fix defect when cursor is around multiple newlines * Improve query analysis impl * Pre-select "WHERE" option if provided * Improve support for queries with semi-joins * Refactor: move soql operator semantics to LSP server-side * Add more code-completion proposals for literal values Including: * Range date literals (LAST_YEAR, YESTERDAY, LAST_N_DAYS:n, etc.) * Simple templates for: int, double, string, currency * Quiet completion on HAVING clause * Add a space before opening parenthesis after INCLUDES/EXCLUDES * New soql lsp version 0.3.3 (#140) Co-authored-by: dehru <599418+dehru@users.noreply.github.com> Co-authored-by: Fernando Dobladez <fernandodobladez@salesforce.com>
* Fix preview not updating when autosave is off - issue 120 (#125) * add soql-statement to model * verify that we include the soql statement in the model * update the package version so we can publish and consume * Add smarter completion on GROUP BY clause and WHERE literals (#126) * Initial support for Aggregate functions. Also: * Fix: Propose "COUNT()" only if right after "SELECT" * Remove special-case for "SELECT (SELECT ), | FROM Foo". Not worth it * Add completion inside function expression Example: SELECT AVG(|) FROM Also: * Improve ANTLR error recovery to better extract FROM expresssions * Make completions inside function expression type-aware * Add smarter completion on GROUP BY clause Also: * Complete only with "groupable" fields. * Give priority to complete GROUP BY with fields which appear on SELECT and are not aggregated or groupped. * On ORDER BY: Complete only with "sortable" fields * Add completion on semi-join SELECTs (in WHERE clauses) * Fix defect when cursor is around multiple newlines * Improve query analysis impl * Pre-select "WHERE" option if provided * Improve support for queries with semi-joins * Refactor: move soql operator semantics to LSP server-side * Add more code-completion proposals for literal values Including: * Range date literals (LAST_YEAR, YESTERDAY, LAST_N_DAYS:n, etc.) * Simple templates for: int, double, string, currency * Quiet completion on HAVING clause * Add a space before opening parenthesis after INCLUDES/EXCLUDES * New soql lsp version 0.3.3 (#140) * Feature/custom select (#148) * Jhork/custom select fields (#111) * Jhork/custom select from (#130) * Jhork/custom select order by (#134) * set the error overlay to be on top of all other form elements (#150) * set the error overlay to be on top of all other form elements * add z-index to .unsupported-syntax * prepare to publish 0 .0.30 (#151) Co-authored-by: Fernando Dobladez <fernandodobladez@salesforce.com> Co-authored-by: Jonny Hork <jhork@salesforce.com>
* Jhork: Support for Simple WHERE Expressions (#101) * move rule to css common (#108) * Preventing webview re-rendering when soql statement has not changed (#105) * Revert "Disable WHERE in model (#113)" * Type-aware where (#109) * Fix preview not updating when autosave is off - issue 120 (#125) * Recognize recoverable where errors (#116) * Operator and Criteria Error Tooltips (#122) * Support IN, NOT IN, INCLUDES, EXCLUDE operators (#123) * Add smarter completin on GROUP BY clause and WHERE literals (#126) * Feature/custom select (#148) * Jhork/custom select fields (#111) * Jhork/custom select from (#130) * Jhork/custom select order by (#134) * set the error overlay to be on top of all other form elements (#150) * prepare to publish 0 .0.30 (#151) * Feature/where (#154) * Jhork: Support for Simple WHERE Expressions (#101) * move rule to css common (#108) * Preventing webview re-rendering when soql statement has not changed (#105) * Revert "Disable WHERE in model (#113)" * Type-aware where (#109) * Recognize recoverable where errors (#116) * Operator and Criteria Error Tooltips (#122) * Support IN, NOT IN, INCLUDES, EXCLUDE operators (#123) * Revert "Feature/where (#154)" (#157) * Add support for line comments ( `//` ) at the top of SOQL files (#132) * Jhork/where custom select (#161) * Fix: 'undefined' in SOQL string (#162) * Clear tooltip when object changes, fix empty soql statement error blocker (#165) * Track to force render on condition change - fix rebase conflict (#166) * do not send event when user still adding input' (#169) * Jhork/clear modifier field bug fix (#168) * handle a option selection event (#178) * cler tooltip error when X is clicked (#180) * Jhork/workflow updates (#163) * Bump versions for release (#181) Co-authored-by: Jonny Hork <jhork@salesforce.com> Co-authored-by: dehru <599418+dehru@users.noreply.github.com> Co-authored-by: Dehru Cromer <dehru.cromer@salesforce.com> Co-authored-by: Fernando Dobladez <fernandodobladez@salesforce.com>
What does this PR do?
This PR address this issue that was introduced in newly published version 50.14.0. The issue is captured here. #120
What issues does this PR fix or reference?
#120