Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ATL-1106: Made all non-workspace editors read-only. #264

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
kittaakos merged 1 commit into main from atl-1106--readonly-on-monaco-peek
Mar 25, 2021

Conversation

Copy link
Contributor

@kittaakos kittaakos commented Mar 24, 2021

What it does:

This PR makes all editors that are not in the current workspace (sketch folder) read-only.

Try the Peek > Peek Definiton functionality on Serial#begin and bar. (Note the cursor location: <|>):

Sketch.ino:

#include "other.h"
void setup() {
 ba<|>r();
 Serial.begi<|>n(9600);
}
void loop() { }

Other.h:

void bar() {}

Serial#begin should open in a read-only embedded editor. You should be able to edit in the embedded editor if you peek at the definition of bar. Opening an editor should behave the same as the embedded peek editor. Please review. Thank you!

Signed-off-by: Akos Kitta kittaakos@typefox.io

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos kittaakos force-pushed the atl-1106--readonly-on-monaco-peek branch from 4ba8bb9 to c6a1db4 Compare March 24, 2021 11:48
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

This is really great Akos. Thanks!

I did find a related problem, which is that the tab control menu allows me to delete or rename the files opened via "Go to Definition". I could see a user using "delete" to remove what appears to be an unwanted file from their sketch. But I'm guessing that is out of scope for this PR, so I'm giving a resounding thumbs up on this.

Copy link

Downloading now, but I share @per1234 's opinion that non-workspace files should not be deleted.
I see one problem ahead: are files in the Sketch's src folder considered Workspace file?
Those ones should be editable and deletable.
Can of worms, anyone?

Copy link
Contributor Author

kittaakos commented Mar 25, 2021
edited
Loading

opinion that non-workspace files should not be deleted.

I open a follow-up.

are files in the Sketch's src folder considered Workspace file?

Yes. They're part of the Theia/VS Code workspace (== current sketch folder.)

Those ones should be editable and deletable.

You should be able to delete and modify them. If no, it's a bug.

Copy link
Contributor Author

opinion that non-workspace files should not be deleted.

I open a follow-up.

Here is the follow-up: #274

per1234 and ubidefeo reacted with thumbs up emoji

Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

Tested and working

@kittaakos kittaakos merged commit f712ec9 into main Mar 25, 2021
@kittaakos kittaakos deleted the atl-1106--readonly-on-monaco-peek branch March 25, 2021 15:45
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ubidefeo ubidefeo ubidefeo approved these changes

@per1234 per1234 per1234 approved these changes

@fstasi fstasi Awaiting requested review from fstasi

Assignees
No one assigned
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /