Skip to content
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

fix(ui): UI bug fixes #4895

Merged
merged 6 commits into from Jan 18, 2021
Merged

fix(ui): UI bug fixes #4895

merged 6 commits into from Jan 18, 2021

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Jan 17, 2021

Checklist:

Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: Alex Collins <alex_collins@intuit.com>
alexec and others added 4 commits January 18, 2021 11:32
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: Alex Collins <alex_collins@intuit.com>
@@ -38,7 +38,7 @@ export const EventFlowPage = ({history, location, match}: RouteComponentProps<an
// state for URL and query parameters
const [namespace, setNamespace] = useState(match.params.namespace || '');
const [showFlow, setShowFlow] = useState(queryParams.get('showFlow') === 'true');
const [showWorkflows, setShowWorkflows] = useState(queryParams.get('showWorkflows') === 'true');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default this low risk feature on

@@ -2,9 +2,15 @@ import {GetUserInfoResponse, Info, Version} from '../../../models';

import requests from './requests';

let info: Promise<Info>; // we cache this globally rather than in localStorage so it is request once per page refresh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cache info in memory so we don't retrieve it repeatedly

</button>
</div>
</Notice>
<textarea ref={hiddenText} style={{width: 0, height: 0, opacity: 0}} defaultValue={text} />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove a React warning

@@ -47,7 +47,7 @@ export const WidgetGallery = ({namespace, name, label}: {namespace: string; name
</div>
<ul>
{parameters.map(p => (
<li>
<li key={p.name}>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove a React warning

@@ -26,7 +26,7 @@ export const WorkflowCreator = ({namespace, onCreate}: {namespace: string; onCre
.list(namespace)
.then(setWorkflowTemplates)
.catch(setError);
}, []);
}, [namespace]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct deps

@@ -195,7 +196,7 @@ export const WorkflowDetails = ({history, location, match}: RouteComponentProps<
);
retryWatch.start(workflow.metadata.resourceVersion);
return () => retryWatch.stop();
}, [workflow]);
}, [namespace, name]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a pretty nasty bug, every time we got a changed workflow, we re-established the watch, resulting in a hot loop

@@ -81,7 +81,8 @@ export const WorkflowDetails = ({history, location, match}: RouteComponentProps<
if (workflowOperation.title === 'DELETE') {
navigation.goto(uiUrl(`workflows/${workflow.metadata.namespace}`));
} else {
navigation.goto(uiUrl(`workflows/${wf.metadata.namespace}/${wf.metadata.name}`));
// navigation.goto does not seem to work here
document.location.href = uiUrl(`workflows/${wf.metadata.namespace}/${wf.metadata.name}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why, not a big enough issue to properly

@alexec alexec merged commit c1f9280 into argoproj:master Jan 18, 2021
@alexec alexec deleted the ui-fix-2 branch January 18, 2021 20:45
This was referenced Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants