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

Add error message on config paste failure #1375

Merged
merged 1 commit into from Mar 27, 2023

Conversation

omidmogasemi
Copy link
Collaborator

Addresses a smaller issue a user had where they couldn't tell why a notebook config paste had failed - it should ideally be surfaced in the UI.

@@ -71,7 +72,8 @@ export class NotebookConfigEl extends Disposable {
const conf = new NotebookConfig(dependencies.conf, exclusions.conf, resolvers.conf, spark.conf, spark.template, kernel.envVars, kernel.scalaVersion, kernel.jvmArgs);
this.copyConfig(conf);
}),
button([], {}, ['Paste & Save Configuration']).click(() => this.pasteConfig())
button([], {}, ['Paste & Save Configuration']).click(() => this.pasteConfig()),
this.pasteErrorMessage = para(['hide', 'error-message'], ['Paste failed - your clipboard does not contain valid JSON'])
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, is it bad for the error message to always be hanging out in the DOM?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably not bad (since it's so small), but no reason for it to either. I'll change it to be added in/out of the DOM instead.

@omidmogasemi omidmogasemi merged commit 0cb06e7 into master Mar 27, 2023
@omidmogasemi omidmogasemi deleted the config-paste-failure-message branch March 27, 2023 22:40
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.

None yet

2 participants