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

[Extensions, II] Continous Slicing and Error Messages #125

Open
EagleoutIce opened this issue Nov 7, 2024 · 1 comment
Open

[Extensions, II] Continous Slicing and Error Messages #125

EagleoutIce opened this issue Nov 7, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request ux User experience

Comments

@EagleoutIce
Copy link
Member

Let's suppose i mark the second x (alt+p or via the context menu) for continuous slicing within the following example:

x <- 4

print(x)

So far so good:
Screenshot_20241107_101026

Now, let's suppose i start editing the file, writing something sensible as (please type this out to see the effect):

x <- 4
x xxxxxx
print(x)

Starting from the second x in the second line, the code is syntactically incorrect and will produce parsing errors. However, in this state every new keystroke triggers a new error message as produced in

if(showErrorMessage){
void vscode.window.showErrorMessage(`There was an error while extracting a slice: ${(e as Error)?.message}. See the flowR output for more information.`)
}

Screenshot_20241107_101137

Showing such an error is good and important, however it would be better to do this in batches (e.g., suppress the output of a new/equivalent error whenever the last one happened <1s ago). Similarly it is probably better to automatically hide these messages again after ~5-10 seconds at the latest.

@EagleoutIce EagleoutIce added the enhancement New feature or request label Nov 7, 2024
@EagleoutIce EagleoutIce added the ux User experience label Nov 7, 2024
@EagleoutIce
Copy link
Member Author

EagleoutIce commented Nov 27, 2024

  • Only show errors if repeat after X seconds (maybe configurable)
  • Keep previous "graying out" of the slice whenever the code becomes syntactically invalid (maybe again for X seconds)
  • fade out existing error messaages/remove them (after X seconds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux User experience
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants