-
Notifications
You must be signed in to change notification settings - Fork 616
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
Dev console #1721
Dev console #1721
Conversation
a6e9b58
to
e3e5564
Compare
Thanks @christianvogt. Exciting to see this! Some things I noticed clicking around: The experience seems weird when there are no applications: Somehow I got the wrong content when clicking the topology nav item. (Not sure how I got in this state.) |
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 @christianvogt! A few initial comments. I haven't dug into the dev console itself yet.
@@ -180,7 +181,7 @@ $dropdown-link-hover-border: 1px solid #bee1f4; | |||
} | |||
|
|||
.co-namespace-selector { | |||
max-width: 60%; | |||
max-width: 100%; |
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.
@rhamilto Do you know why this was 60% before?
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 was 60% before because when on mobile it would shrink the project dropdown and use ellipsis to keep it and the import yaml button on a single line.
With the addition of the app selector trying to fit all on one line is not feasible.
What I could do actually is add a class to change the behavior only for when the app selector is included in this bar. I would pass in an additional className to apply for our use case.
"file-saver": "1.3.x", | ||
"font-awesome": "4.7.x", | ||
"formik": "2.0.1-rc.1", |
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.
We're locking to a prerelease version?
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.
@spadgett We are using V2 because it comes with support for custom formik hooks and it makes creating custom components wrapped around formik context much easier. They're actually at 2.0.1-rc..5 but because of a bug related to validations i had to downgrade to rc-1. I'll keep track of it and update the version to latest as soon as there's fix.
I saw this error trying to open the "Application" dropdown in the Git form.
|
Expand/collapse sections in forms can get confusing. We had some usability bugs on that in the past.
(Not saying we need to change it in this PR, just giving feedback from past experience.) |
I see now that the topology view is meant to show the "add" options as an empty state. That's super confusing imo. I thought it was a bug! We should at least add a message saying there are no workloads in your project. |
e3e5564
to
d05419b
Compare
@spadgett the expand collapse of sections in the form is temporary while we work on a new design from UX this sprint. |
@spadgett with regards to the topology view showing the empty state. That is currently changing. I'll share the design doc with you. |
onChange?: (name: string, key: string) => void; | ||
} | ||
|
||
class ResourceDropdown extends React.Component<ResourceDropdownProps, State> { |
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.
Note that we have an existing ResourceListDropdown
. We should look at the differences and try to avoid having multiple components that do the same thing.
buttonClassName?: string; | ||
title?: React.ReactNode; | ||
titlePrefix?: string; | ||
allApplicationsKey?: string; |
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.
Looks like there are props here that aren't used?
controlId={`${props.name}-field`} | ||
validationState={getValidationState(error, touched)} | ||
> | ||
<Checkbox {...field} {...props} checked={field.value} aria-describedby={`${props.name}-help`}> |
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.
aria-describedby
will be invalid if there is no helpText
<Checkbox {...field} {...props} checked={field.value} aria-describedby={`${props.name}-help`}> | ||
{label} | ||
</Checkbox> | ||
{helpText && <HelpBlock id={`${props.name}-help`}>{helpText}</HelpBlock>} |
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.
Consider _.uniqueId
to make sure the id
is unique on the page.
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.
Unique IDs is something we need to tackle across the app and we should be generating IDs in the underlying form components and at least having a component that helps manage the ID generation such as the one used in PF4. I'd like to tackle this post merge.
<CardHeader>Import from Git</CardHeader> | ||
<CardBody>Import code from your git repository, to be built and deployed </CardBody> | ||
<CardFooter> | ||
<Link className="pf-c-button pf-m-secondary" to="/import"> |
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.
We should consider adding RBAC checks. What should the user experience be if I don't have authority to add to the project?
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 point. I've raised your concern with UX. This is something we can add to our backlog for 4.2. We have a story to rework the empty state patterns with new UX. I've added your concerns there.
frontend/packages/dev-console/src/components/pipelines/PipelineDetailsPage.tsx
Outdated
Show resolved
Hide resolved
import { ColHead, ListHeader } from '@console/internal/components/factory'; | ||
|
||
const PipelineHeader = (props) => ( | ||
<ListHeader> |
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 should switch to PF4 tables, which recently landed in master.
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.
Damn. Missed the boat lol
I can look at updating our lists....
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 wasn't aware that had landed yet - sorry, thought Patrick was still working on those :]
<div className="col-lg-2 col-md-2 hidden-sm hidden-xs"> | ||
<Timestamp | ||
timestamp={ | ||
pipeline.latestRun && |
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.
_.get
?
selected: ['Succeeded'], | ||
reducer: pipelineRunFilterReducer, | ||
items: [ | ||
{ id: 'Succeeded', title: 'Complete' }, |
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.
Any reason not to match the title to id?
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.
AFAIK this was done according to UX. I can followup with the dev who works on pipelines.
@serenamarie125
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.
Abhi confirmed this is intentional after discussing the values with UX and the tekton team
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 @spadgett @christianvogt the decision was to match what's in the upstream
frontend/packages/dev-console/src/components/pipelines/PipelineVisualizationStepList.scss
Outdated
Show resolved
Hide resolved
d05419b
to
e7df530
Compare
e7df530
to
8c71f1a
Compare
8c71f1a
to
8a58604
Compare
|
||
componentDidMount() { | ||
// eslint-disable-next-line promise/catch-or-return | ||
k8sGet(PipelineModel, this.props.name, this.props.namespace).then((res) => { |
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.
Error handling?
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 will create separate bugs for the team to address these.
}).then((listres) => { | ||
this.setState({ | ||
menuActions: [ | ||
triggerPipeline(res, getLatestRun({ data: listres }, 'creationTimestamp'), 'pipelines'), |
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.
We should add RBAC checks to the menu items. For example,
For new code, we're moving to functional components and hooks instead of class-based components. Pretty sure you're aware and most of this was written before we bumped React versions, but I wanted to mention it. |
rebased |
@christianvogt |
@christianvogt fyi, needs rebase again :/ |
76e0d39
to
382e7fb
Compare
I just rebased everything again :) |
@ppitonak I just and it works for me |
CI will fail if |
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 get this integrated and address any additional issues in follow-up PRs. Thanks @christianvogt 👍
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, divyanshiGupta, karthikjeeyar, rohitkrai03, spadgett, vikram-raj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributes the dev console package as a plugin extension.
Note: there are many comments on this PR. Most have been addressed. Then any comment that requires larger changes will be taken up as separate bugs logged against the dev console component in Jira
There are several changes to console that have been broken into small commits. Most of which could be contributed as separate PRs.
Commits
add action item feature to dropdown
add knative icon
update eslint rules
add perspective header to main nav
support redirect to perspective landing page
/
update vscode settings for tsdk and debug.node.autoAttach
update types for page extensions
change Administrator perspective icon to PF CogsIcon
support children in namespace bar
support namespace redirect for any URL that supports namespaces
add active application redux state, action, reducer
update ownerReference types
export routes#getRouteWebURL
export create-secret#SSHAuthSubform
add dev-console dependencies
support highlighting active root nav items outside of a section
contribute dev-console plugin
enable dev-console plugin in console-app
dev-console
package dependency toconsole-app
fyi @rohitkrai03 @vojtechszocs @spadgett