Skip to content

feat: add error toggle #98

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

Merged
merged 13 commits into from
Jun 24, 2023
Merged

feat: add error toggle #98

merged 13 commits into from
Jun 24, 2023

Conversation

Blackman99
Copy link
Contributor

@Blackman99 Blackman99 commented Jun 19, 2023

Motivation

When focused on coding the error message might be an obstacle in the editor.
So maybe it is better to add a control to let the user decide whether to show the message or not.

Changes

  • Fix the codeType in CodeMirrorEditor
  • Add MessageToggle component
  • Add showMessage ref and use MessageToggle in EditorContaner to control Message render

Screenshots

add-message-toggles

This PR can possibly solve #64

@yyx990803
Copy link
Member

Thanks for the PR - we just merged a major PR that lands Monaco editor support which seems to have caused some conflict. Would you mind rebasing your PR?

@Blackman99
Copy link
Contributor Author

Oh, sure thing!

@Blackman99
Copy link
Contributor Author

Rebase done. I noticed that the codeType in CodeMirrorEditor is wrong. I also added the fix code. Hope it is OK

@yyx990803
Copy link
Member

I tried it, but not sure if the top-right corner is the right place to put the toggle. It's quite far from the messages themselves so the connection is not obvious.

Maybe it should be floating in the bottom-left corner of the editor - so when the user dismisses an error when they don't want it, they can instantly find the toggle to turn it off.

@Blackman99
Copy link
Contributor Author

Blackman99 commented Jun 22, 2023

Indeed
And I've tried placing the toggle at the bottom-left corner of the editor.
It would cover up some of the message content.
So I move it to the bottom-right corner.
Right now it looks like this:

add-message-toggles

@sxzz sxzz merged commit 51819cc into vuejs:main Jun 24, 2023
@sxzz sxzz changed the title feat: add message toggle feat: add error toggle Jun 24, 2023
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.

3 participants