-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat(ws): Notebooks 2.0 // Frontend // Workspaces details // Pod template tab #173 #197
base: notebooks-v2
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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 PR, @liavweiss !
isLineNumbersVisible | ||
isFullHeight | ||
isReadOnly | ||
code={podTemplateYaml || '# No podTemplate data available'} |
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.
code={podTemplateYaml || '# No podTemplate data available'} | |
code={podTemplateYaml || '# No pod template data available'} |
@@ -72,7 +73,9 @@ export const WorkspaceDetails: React.FunctionComponent<WorkspaceDetailsProps> = | |||
aria-label="Pod template" | |||
> | |||
<TabContent id="podTemplateBodyPadding"> | |||
<TabContentBody hasPadding>Pod template</TabContentBody> | |||
<TabContentBody hasPadding style={{ height: '500px' }}> |
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.
Ideally, the tab content body should fill the remaining height of the drawer until the bottom of the drawer, while keeping the scroll in the code editor.
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.
@liavweiss great work on this! I've added a suggested workaround below to fix the issue you were running into with the drawer height.
workspaces/frontend/src/app/pages/Workspaces/Details/WorkspaceDetailsPodTemplate.tsx
Show resolved
Hide resolved
workspaces/frontend/src/app/pages/Workspaces/Details/WorkspaceDetails.tsx
Outdated
Show resolved
Hide resolved
…late tab kubeflow#173 Signed-off-by: Liav Weiss (EXT-Nokia) <[email protected]>
…late tab kubeflow#173 Signed-off-by: Liav Weiss (EXT-Nokia) <[email protected]>
80a8464
to
26ce0e8
Compare
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 @liavweiss @jenny-s51 , thanks for the PR and changes. I tried it locally, and I get the behavior below. Was the code editor supposed to adjust its height to align with the bottom of the screen?
codeeditorheight.webm
@@ -94,10 +94,13 @@ | |||
"webpack-merge": "^5.10.0" | |||
}, | |||
"dependencies": { | |||
"@patternfly/react-code-editor": "^6.1.0", |
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.
Probably best to keep it at 6.0.0
atm to align with the other PatternFly dependencies.
"@patternfly/react-code-editor": "^6.1.0", | |
"@patternfly/react-code-editor": "^6.0.0", |
<TabContentBody hasPadding> | ||
<WorkspaceDetailsPodTemplate /> | ||
</TabContentBody> |
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.
<TabContentBody hasPadding> | |
<WorkspaceDetailsPodTemplate /> | |
</TabContentBody> | |
<TabContentBody className="pf-v6-u-h-100" hasPadding> | |
<WorkspaceDetailsPodTemplate codeEditorHeight="100%" /> | |
</TabContentBody> |
@@ -72,7 +73,9 @@ export const WorkspaceDetails: React.FunctionComponent<WorkspaceDetailsProps> = | |||
aria-label="Pod template" | |||
> | |||
<TabContent id="podTemplateBodyPadding"> |
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.
<TabContent id="podTemplateBodyPadding"> | |
<TabContent style={{ flex: 1 }} className="pf-v6-u-h-100" id="podTemplateBodyPadding"> | |
As requested I added a code editor for the Pod Template section under the workspace details.
![image](https://private-user-images.githubusercontent.com/74174727/410424109-eb7cb395-e757-40a8-8244-6ab88da52264.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MDAwMDIsIm5iZiI6MTczOTU5OTcwMiwicGF0aCI6Ii83NDE3NDcyNy80MTA0MjQxMDktZWI3Y2IzOTUtZTc1Ny00MGE4LTgyNDQtNmFiODhkYTUyMjY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA2MDgyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ3MTViNGI2NDVhYTQ2ZDZlNDUzNWZmNmQ0M2I2ODU4MzkzNjRmNTgyNTg3YTRhMGUxMGEzZTAyODAzNDZlMGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.8XHEKLAI8PkynVPwTUxQOU3CeOjyFWLVPtkohKN2yXw)
The editor will display the all yaml (mocked in the code) as read-only and will utilize the full height of its parent.