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

[DEV-13254] Implement settings menu for variables with optional fallback #561

Merged

Conversation

kudlajz
Copy link
Contributor

@kudlajz kudlajz commented Aug 6, 2024

  • variables no longer show as %something% but instead use the label for better clarity
  • variables now have a menu when selected
  • variables that have withFallback: true can have a text fallback set for them

I still have to run this with the UX people so the UI might change.

Default:
Screenshot 2024-08-06 at 19 00 53

With fallback defined:
Screenshot 2024-08-06 at 19 01 03

Choosing different options:
Screenshot 2024-08-06 at 18 36 52

@kudlajz kudlajz self-assigned this Aug 6, 2024
@kudlajz kudlajz merged commit 6058cd5 into main Aug 7, 2024
9 checks passed
@kudlajz kudlajz deleted the feature/dev-13254-implement-settings-menu-for-variable-node branch August 7, 2024 14:36
@@ -5,6 +5,7 @@ export const VARIABLE_NODE_TYPE = 'variable';

export interface VariableNode extends ElementNode {
type: typeof VARIABLE_NODE_TYPE;
fallback?: string | null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kudlajz by the way, Slate does not allow null as a node property value. Setting a property to null with Transforms.setNodes() will remove it from the object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants