-
Notifications
You must be signed in to change notification settings - Fork 350
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
Create metadata editor #589
Conversation
Opens a dialog that allows user to edit the name / description / language / code of a code snippet. Still need to implement deleting code snippets. Known bug that when editing code in the text area of the dialog, the dialog submits when the return key is pressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Martha - these changes look good to me so far. Would you mind tossing in a few screenshots of a code-snippet's lifecycle? I think that would be helpful to reviewers - especially those of us that have no idea what this typescript stuff is doing. 😄
Adds a delete button to each code snippet. Add code editor to the code snippet editor dialog. Move CodeSnippetDisplay into its own file.
Does this bring a new dialog for creating the code-snippet? How hard would it be to make the dialog to take control of the code-snippet panel and let the user create a new thing from there, this way he can easily navigate and copy+paste code from a notebook or python file? |
@marthacryan nice progress on this so far. i would tend to agree with @lresende that have the add/edit form in the sidebar would be more helpful than in a new dialog. i understand the PR is a WIP (and you are probably aware of these) but wanted to mention a couple things i noticed at first pass-through:
|
+1 to Luciano's idea, although I think we should still have a dialog option as well. I guess I'd like a wider dialog. Perhaps a layout that resembles something akin to this...
I know that's poorly conveyed, but you get the idea:
Should we let users bring their own language? Seems like we should. In that case, the language seems like it would need to be a combination edit/dropdown thing if that's possible. |
@lresende @kevin-bates I could definitely make it available in the code snippets panel, although I think we'd need to choose between opening the dialog and making it available in the code snippets panel, right? We could talk about this at the scrum if you think we should have a conversation about it. We sort of discussed this in the issue #556. |
@vabarbosa Thoughts on this one for inserting code? |
@marthacryan that one could also work |
Still need to clean up code and fix merge conflicts. Screenshots to come after cleanup. |
Here's what the most current UI looks like: Changes should automatically update in the left side pane when the "Save Snippet" button is pressed. On clicking the language dropdown: |
I want to make the form less hard-coded to the fields of code snippets, not sure if that needs to be in this PR? |
@lresende Just tried it out and it definitely would need some work: |
@vabarbosa on @marthacryan comment above, did you learn how to make css conditional to the current theme in your pr? (Ie add/remove |
@lresende @marthacryan @ajbozarth will take a look at dark mode this morning |
When changing themes toggle the `bp3-dark` class
the best way to do that would be to use JupyterLab's ThemeManager and listen to changes in theme and then programmatically add/remove the |
@vabarbosa Thank you, it looks great! Just added a couple little changes as well (colors of icons / buttons added in this PR for the code snippets were a little off) and here's what it looks like in light / dark mode: |
The vertical spacing looks a bit off in those screenshots, perhaps it has to do with the around the text "Code Snippet" |
or the icon's css may just need some tweaking to match the changes you made to the header in this pr @vabarbosa insight? |
this is how the icons currently line up: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the latest updates and it works great!
Very nice work :)
Adds a new metadata editor extension that enables adding/editing entries from metadata service. Co-authored-by: Alex Bozarth <ajbozart@us.ibm.com> Co-authored-by: Kevin Bates <kevin.bates@us.ibm.com> Co-authored-by: va barbosa <va@us.ibm.com>
Opens a dialog that allows user to edit the name / description /
language / code of a code snippet.
Still need to implement/fix:
Fixes #556
Screenshots to come after implementing delete.
Developer's Certificate of Origin 1.1