-
Notifications
You must be signed in to change notification settings - Fork 15
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
chore(KFLUXUI-296): remove workspace dependency from Components #103
base: main
Are you sure you want to change the base?
Conversation
a183e08
to
eb63f5f
Compare
const applicationBreadcrumbs = useApplicationBreadcrumbs(); | ||
const showModal = useModalLauncher(); | ||
const [component, loaded, componentError] = useComponent(namespace, workspace, componentName); | ||
const [component, loaded, componentError] = useComponent(namespace, workspaceName, componentName); |
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 need to remove the usage of workspace. No need to get it from route params. that will be removed later.
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 in new version.
const customizePipeline = () => { | ||
track(TrackEvents.ButtonClicked, { | ||
link_name: 'manage-build-pipeline', | ||
link_location: 'component-list-label', | ||
component_name: component.metadata.name, | ||
app_name: component.spec.application, | ||
workspace, | ||
workspace: workspaceName, |
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 workspace usage
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 replaced by namespace
, is it correct?
const track = useTrackEvent(); | ||
const showModal = useModalLauncher(); | ||
const [component] = useComponent(namespace, workspace, componentName); | ||
const [component] = useComponent(namespace, workspaceName, componentName); |
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 workspaceName
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 in new version.
@@ -101,7 +104,11 @@ const ComponentLatestBuild: React.FC<React.PropsWithChildren<ComponentLatestBuil | |||
{commit ? ( | |||
<> | |||
<Link | |||
to={`/workspaces/${workspace}/applications/${commit.application}/commit/${commit.sha}`} | |||
to={COMMIT_DETAILS_PATH.createPath({ | |||
workspaceName, |
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 namespace here
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 occurrences of workspaceName
in a createPath function are now workspaceName: namespace
src/routes/utils.ts
Outdated
@@ -8,6 +8,7 @@ export const RouterParams = { | |||
taskRunName: 'taskRunName', | |||
componentName: 'componentName', | |||
commitName: 'commitName', | |||
commitSha: 'commitSha', |
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 use commitName as the commitSha
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 Sahil! I deleted commitSha
and replace its use by commitName
if these changes are correct then I will adjust the unit tests |
e80a549
to
1c25dbd
Compare
1c25dbd
to
baa6680
Compare
Fixes
KFLUXUI-296
Description
WIP: Just replace workspace for namespace
Type of change
Screen shots / Gifs for design review
Browser conformance: