mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
chore: Better expression editor tooltip wording (#2805)
## Description - better expresion tooltip wording - better layout for empty state <img width="265" alt="image" src="https://github.com/webstudio-is/webstudio/assets/52824/1ad93c44-9bfa-4ee3-a6c5-945a3b3ed7e5"> <img width="492" alt="image" src="https://github.com/webstudio-is/webstudio/assets/52824/75d7ed46-0862-4174-b42d-1d735e07c5c0"> ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
This commit is contained in:
1 parent
a29605cc78
commit
cd5cd2126f
1 file changed
+6
-8
@@ -160,8 +160,8 @@ const BindingPanel = ({
|
||||
</Flex>
|
||||
{scopeEntries.length === 0 && (
|
||||
<Flex justify="center" align="center" css={{ py: theme.spacing[5] }}>
|
||||
<Text variant="labelsSentenceCase">
|
||||
No variables available in this scope
|
||||
<Text variant="labelsSentenceCase" align="center">
|
||||
No variables available
|
||||
</Text>
|
||||
</Flex>
|
||||
)}
|
||||
@@ -196,13 +196,11 @@ const BindingPanel = ({
|
||||
variant="wrapped"
|
||||
content={
|
||||
<Text>
|
||||
Compose variables, do math; the result of the expression will be
|
||||
used as a value.
|
||||
Use JavaScript syntax to access variables along with comparison
|
||||
and arithmetic operators.
|
||||
<br />
|
||||
Example: VariableA || VariableB || "DefaultValue"
|
||||
<br />
|
||||
Explanation: If VariableA is empty, use VariableB; otherwise use
|
||||
"DefaultValue".
|
||||
Use the dot notation to access nested object values:
|
||||
<Text variant="mono">Variable.nested.value</Text>
|
||||
</Text>
|
||||
}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user