-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Binding V2 Updates #10732
Binding V2 Updates #10732
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## develop #10732 +/- ##
========================================
Coverage 60.15% 60.15%
========================================
Files 245 245
Lines 7521 7521
Branches 1405 1405
========================================
Hits 4524 4524
Misses 2757 2757
Partials 240 240 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Awesome work @deanhannigan. Love how self contained the new editor is, and how nicely it integrates with the existing bindings. Played with this manually a good bit as well and it feels great, so let's get this in!
Just run a yarn install
to fix the conflict lines leftover in yarn.lock
and we're good to go.
lineHeight: "1.3", | ||
border: | ||
"var(--spectrum-alias-border-size-thin) solid var(--spectrum-alias-border-color)", | ||
borderRadius: "var(--border-radius-s)", |
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.
I'm sure discovering the correct variables for everything here was fun!
@@ -101,7 +101,12 @@ | |||
} | |||
// Ignore events when typing | |||
const activeTag = document.activeElement?.tagName.toLowerCase() | |||
if (["input", "textarea"].indexOf(activeTag) !== -1 && e.key !== "Escape") { | |||
const inCodeEditor = | |||
document.activeElement?.classList?.contains("cm-content") |
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 catch to account for that.
@@ -3531,6 +3609,104 @@ | |||
validate-npm-package-name "^4.0.0" | |||
yargs-parser "20.2.4" | |||
|
|||
<<<<<<< HEAD |
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.
Conflict looks like its been committed accidentally!
Description
General updates to the Bindings UX in the builder and automations. Bindings can now also be browsed and added via a new autocomplete menu
Note: The "Handlebars" tab in the binding drawer has been renamed the "Text" tab.
{{
will prompt the bindings list to open. Clicking on an option will add it to the editor.$
with autocomplete to$("")
Addresses:
Screenshots
The Updated look for the bindings drawer.
The collapsable menu
Text mode editing
Previously, the handlebars editor was just a text field. Now it utilises CodeMirror to provide autocomplete functionality and contextual highlighting
Mode Switch Check
Before switching tabs in the binding menu, the user is now altered to the fact that, that means switching editor modes.
You are now given the option clear the previous mode value and proceed, or to abort the switch.
JavaScript mode editing
Editing in the JavaScript mode behaves much the same as before, with the addition of the autocomplete suggestions when adding a new binding. Some visual tweaks have also been added for the darker themes in the builder.
Binding field focus
When altering the binding for a particular property, that property will remain in focus as long as the drawer remains open