-
Notifications
You must be signed in to change notification settings - Fork 667
Feat(CLI-terminal): Open terminal in new Tab #4946
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(CLI-terminal): Open terminal in new Tab #4946
Conversation
5c62097 to
575dab1
Compare
c30f4f9 to
2058a46
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.
Remove this comment.
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.
Remove comments.
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.
Remove comments.
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.
Use flex modifiers prop instead of style - https://www.patternfly.org/v4/documentation/react/layouts/flex
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.
@rohitkrai03 This portion is same as that in the CloudShellDrawerHeader
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.
@abhinandan13jan What is the need to specify the style like this in both the cases? Wouldn't this work - breakpointMods={[{modifier: FlexModifiers.grow}]} ?
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.
yes, it works...updated..thanks
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.
Remove comments.
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.
Remove comments.
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.
All the commented out portions are to be brought back.. these are being temporarily hidden till we work on the session thing.
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'll update the comments with the note
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.
Well, I would prefer no code instead of commented out code anyways. You can easily go back in git history and get the code back when needed.
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.
Updated this
a934b61 to
1b375d6
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.
Casing isn't consistent. Also it's spelt OpenShift.
Why a flex when there is only a single piece of text?
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'll correct the Case of the text,
The Flex is there as it had a RestoreLink FlexItem to the right. Also, we'll have to add it back again.
1b375d6 to
472ed96
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.
can we use pf variables for background-color as well
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.
updated
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.
can we avoid explicit return statement
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.
updated
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.
can we avoid explicit return statement and have type React.FC
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.
updated
472ed96 to
8632b63
Compare
|
/kind feature |
frontend/public/components/app.jsx
Outdated
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.
UX doesn't want terminology of cloud shell used anywhere. Use terminal instead:
| <Route path="/cloudshell" component={CloudShellTab} /> | |
| <Route path="/terminal" component={CloudShellTab} /> |
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.
| .co-cloud-shell-tab { | |
| .co-cloud-shell-tab { | |
| display: flex; | |
| flex-direction: column; |
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.
updated
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.
This styling should be applied to the CloudShellTabHeader instead of here.
| &__header { | |
| &__header { | |
| flex-shrink: 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.
updated..Removed CloudShellheader
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.
| padding-left: var(--pf-global--spacer--md); | |
| padding: 0 var(--pf-global--spacer--md); |
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.
updated
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.
| height: var(--pf-global--target-size--MinHeight); | |
| min-height: var(--pf-global--target-size--MinHeight); |
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.
updated
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.
Remove.
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.
updated
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 you can simplify the header to the following and remove CloudShellTabHeader.
| <div className="co-cloud-shell-tab__header"> | |
| <CloudShellTabHeader /> | |
| </div> | |
| <div className="co-cloud-shell-tab__header">OpenShift command line terminal</div> |
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.
updated
8632b63 to
ff7293a
Compare
ff7293a to
8df6980
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinandan13jan, christianvogt The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
|
/hold cancel |
Feature:
https://issues.redhat.com/browse/ODC-3056
The restore link has been removed after discussion with UX
This PR doesn't handle the session management for cloudshell terminal
Analysis / Root cause:
Launch Cloudshell in new Tab
Solution Description:
/cloudshellto load Terminal as a full page component at this URL.CloudshellTabcomponent with holds the Terminal and exposes it over the given route.To Do
ScreenShots
Unit Test
CloudShellTab.spec.tsx
Broswer conformance
Chrome 73
How to Review
Run the following commands from repo root