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

hint text in stan editor #150

Merged
merged 3 commits into from
Jul 25, 2024
Merged

hint text in stan editor #150

merged 3 commits into from
Jul 25, 2024

Conversation

magland
Copy link
Collaborator

@magland magland commented Jul 24, 2024

If stan editor is empty, display hint message in the editor "Begin editing or select an example from the left panel" using monaco's addContentWidget.

And... no longer abuses syntax error window for this purpose.

See discussion in #149

image

Copy link
Collaborator

@WardBrian WardBrian left a comment

Choose a reason for hiding this comment

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

Overall looks great! One comment on styling, but otherwise should be good to go

Comment on lines 249 to 252
node.style.width = "max-content";
node.style.pointerEvents = "none";
node.textContent = hintText;
node.style.fontStyle = "italic";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thoughts on pulling these .styles into a class? In particular, it would also be nice to make the text slightly lower contrast than it is currently, as vscode does

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have created a css class EditorHintText for the italics and color. I feel like pointerEvents still belongs inline though.

@WardBrian WardBrian merged commit 3522deb into main Jul 25, 2024
2 checks passed
@WardBrian WardBrian deleted the stan-editor-text-hint branch July 25, 2024 14:21
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