-
Notifications
You must be signed in to change notification settings - Fork 100
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
feature: new page for notebook create #1308
Conversation
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
…o notebooks-integration
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Codecov Report
@@ Coverage Diff @@
## 2.x opensearch-project/observability#1308 +/- ##
============================================
- Coverage 41.71% 37.33% -4.38%
============================================
Files 298 257 -41
Lines 17753 15377 -2376
Branches 4280 4039 -241
============================================
- Hits 7405 5741 -1664
+ Misses 10176 9605 -571
+ Partials 172 31 -141
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
…lity into notebooks-integration
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
@@ -81,4 +81,39 @@ describe('<NoteTable /> spec', () => { | |||
utils.getByText('Actions').click(); | |||
utils.getByText('Rename').click(); | |||
}); | |||
}); | |||
|
|||
it('create notebook', () => { |
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.
Do we need to add or modify any cypress tests?
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.
Good call out let me check
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.
@mengweieric fixed in: 3dc8296. Do we want to run cypress test as a part of github action? It's a bit long but we should know about it somehow/they should be updated on any changes or flakiness or they should be removed in my opinion - why do we have tests that don't run on a regular basis?
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.
Thanks for the changes, yes that's one task I currently have on plate, just need to resolve all the failing tests which may need some helping hands. Not sure if we should simply just add it to run on every PR or something like a nightly run.
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.
@mengweieric I vote for nightly run 👍🏽 😄
Signed-off-by: Derek Ho <[email protected]>
dashboards-observability/.cypress/integration/2_notebooks.spec.js
Outdated
Show resolved
Hide resolved
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.
I left some comments. In general, we need some UX feedback here. In my opinion, it is a bad experience to create a whole page for 1 input box.
.click(); | ||
cy.wait(delay); | ||
|
||
cy.get('.euiToastHeader__title').contains('Invalid notebook name').should('exist'); |
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.
I think we should keep the invalid notebook toast here. Any reason we removed this?
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.
Removed this because now the create button will not be clickable unless they have entered in some non-empty string. This is to keep the page on parity with the application analytics create page, as I was thinking to keep a consistent experience across the plugin, but I can change it back if folks think that's not appropriate. @ps48 @mengweieric
|
||
const onCreate = (name: string) => { | ||
createNotebook(name); | ||
sessionStorage.setItem('NotebooksName', ''); |
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.
Is there a hard requirement to use sessionStorage
here? Side Question: Why are we resetting NotebooksName
in sessionStorage after creation?
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.
No hard requirement, but again wanted to keep some parity between application analytics and notebooks. I think only reason is to not lose page content on refresh, but not sure how valuable that is. The reset is so that if they create something and then try to create another one they will not see their old notebook name when trying to create a new one.
renameNotebook: (name: string, id: string) => void | ||
} | ||
|
||
export const CreateNotebook = (props: CreateNotebookProps) => { |
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.
Let's change the name here CreateNotebook
-> CreateNotebookPage
Maybe? We already have createNotebook
function. This would be confusing for other developers if not changed.
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.
Sure. Changed in 1e6978c
@ps48 this PR is coming from opensearch-project/dashboards-observability#110, as part of the integration we need a new landing page when creating/editing notebooks. @pjfitzgibbons can you chime in here? I agree we may need UX on how to layout the page in a better way... |
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho [email protected]
Description
Creates a new page (with unique URL) for dashboards integration.
Issues Resolved
relates to opensearch-project/dashboards-observability#110 ,
solves opensearch-project/dashboards-observability#9
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.