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

improve gui for pipeline job creation #1141

Merged
merged 10 commits into from
Nov 27, 2024
Merged

Conversation

nilsgstrabo
Copy link
Contributor

@nilsgstrabo nilsgstrabo commented Nov 22, 2024

  • Make links in environment card wrap if long text
  • Show info alert on pipeline job and environments summary page when no environments (no radixconfig)
  • Default to apply-config on "create new" pipeline job when no environments (no radixconfig)
  • Misc styling fixes

Richard87
Richard87 previously approved these changes Nov 26, 2024
Copy link
Contributor

@Richard87 Richard87 left a comment

Choose a reason for hiding this comment

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

La inn ett par kommentarer, useMemo og useCallback tror jeg ikke er nødvendig?

(fun fact, React 19 vil komme med en compiler som automatisk legger inn useMemo/useCallback overalt, så vi trenger ikke håndtere det manuelt)

!nonErrorCodes?.includes(getFetchErrorCode(asyncState.error))
asyncState.isError ||
(asyncState.error &&
!nonErrorCodes?.includes(getFetchErrorCode(asyncState.error)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Vil dette fungera? asyncState.isError vil alltid ver sann når asyncState.error e satt, så nonErrorCodes vil vel aldri ha en effekt lengre? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Comment on lines 62 to 70
const setPipelineType = useCallback(
(pipeline: string) => {
setSearchParams((prev) => {
prev.set(pipelineSearchParam, pipeline);
return prev;
});
},
[setSearchParams]
);
Copy link
Contributor

Choose a reason for hiding this comment

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

e det nødvendig med useCallback?

Suggested change
const setPipelineType = useCallback(
(pipeline: string) => {
setSearchParams((prev) => {
prev.set(pipelineSearchParam, pipeline);
return prev;
});
},
[setSearchParams]
);
const setPipelineType = (pipeline: string) => {
setSearchParams((prev) => {
prev.set(pipelineSearchParam, pipeline);
return prev;
});
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@nilsgstrabo nilsgstrabo marked this pull request as ready for review November 26, 2024 14:16
Copy link
Contributor

@Richard87 Richard87 left a comment

Choose a reason for hiding this comment

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

LGTM!

@nilsgstrabo nilsgstrabo merged commit 38aa961 into master Nov 27, 2024
5 checks passed
@nilsgstrabo nilsgstrabo deleted the improve-pipeline-components branch November 27, 2024 07:49
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.

2 participants