-
Notifications
You must be signed in to change notification settings - Fork 1
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
some ideas for making placeholders read only #2
base: main
Are you sure you want to change the base?
Conversation
size-limit report 📦
|
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.
- Styling needs to be parameterized
- Read only behavior needs to be parameterized
- open questions
- can you delete a read only void element in a snippet? If I backspace in a placeholder maybe lock backspace to the placeholder, same with navigated (left, right arrow etc),
- If you click on a part of a snippet that isn't a placeholder should you select the entire snippet? should you select the nearest placeholder?
- can we normalize void elements so they are merged together if they are adjacent to each other with no placeholder in between
- can we link the void element text to the "snippet definition" following the component metaphor?
<span | ||
style={{ | ||
padding: '0px 1px', | ||
border: `2px solid ${leaf.isFinalTabStop ? 'grey' : placeholderColor}`, |
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.
final tab stop styling should be parameterized, also styling for empty/non empty placeholders should be parameterized
style={{ | ||
padding: '3px 3px 2px', | ||
margin: '0 1px', | ||
verticalAlign: 'baseline', | ||
display: 'inline-block', | ||
borderRadius: '4px', | ||
backgroundColor: '#eee', | ||
fontSize: '0.9em', | ||
boxShadow: selected && focused ? '0 0 0 2px #B4D5FF' : 'none', |
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.
styling for read only snippet should be parameterized
result.push({ | ||
children: [{ text: v }], | ||
type: 'SnippetReadonlyText', | ||
label: v, | ||
}); |
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.
should parameterize whether or not snippet text is read only
No description provided.