Open jsoref opened 1 year ago
So, this would do two of the things I'd like to do:
diff --git a/ui/src/app/applications/components/application-operation-state/application-operation-state.tsx b/ui/src/app/applications/components/application-operation-state/application-operation-state.tsx
index 0f5bbac2..6a3fdfe2 100644
--- a/ui/src/app/applications/components/application-operation-state/application-operation-state.tsx
+++ b/ui/src/app/applications/components/application-operation-state/application-operation-state.tsx
@@ -156,4 +156,4 @@ export const ApplicationOperationState: React.StatelessComponent<Props> = ({appl
<div className='row'>
- <div className='columns large-1 show-for-large application-operation-state__icons_container_padding'>KIND</div>
- <div className='columns large-2 show-for-large'>NAMESPACE</div>
+ <div className='columns large-2 show-for-large application-operation-state__icons_container_padding'>KIND</div>
+ <div className='columns large-1 show-for-large'>NAMESPACE</div>
<div className='columns large-2 small-2'>NAME</div>
@@ -172,3 +172,3 @@ export const ApplicationOperationState: React.StatelessComponent<Props> = ({appl
</div>
- <span title={getKind(resource)}>{getKind(resource)}</span>
+ <span title={getKind(resource)}>{breakPunctuation(getKind(resource))}</span>
</div>
@@ -178,3 +178,3 @@ export const ApplicationOperationState: React.StatelessComponent<Props> = ({appl
<div className='columns large-2 small-2' title={resource.name}>
- {resource.name}
+ {breakPunctuation(resource.name)}
</div>
@@ -202,2 +202,6 @@ export const ApplicationOperationState: React.StatelessComponent<Props> = ({appl
+const breakPunctuation = (value: string): string => {
+ return value.replace(/([/\.-])/g, "$1<wbr>");
+};
+
const getKind = (resource: models.ResourceResult): string => {
I don't have the energy to figure out how to properly deal w/ the css side of things... The last cell seems to have the right magic...
Hey @jsoref, Is this issue still open? If yes, I would like to contribute.
There's a PR that implements a part of this, if you can do the whole thing, that'd be welcome.
Hey @jsoref, I think I might be able to help with the css part. Although, I need help on how to see the webpage live on my browser.
I have cloned the repo to my local. What would be the next steps to see the webpage live?
Thanks :)
@akshat-g-07 this guide is pretty good for UI changes: https://argo-cd.readthedocs.io/en/latest/developer-guide/contributors-quickstart/
Thanks for the help @crenshaw-dev . I will start right away.
Hey @jsoref,
I was working on this and wondering if i can get your input on approach. If we use the breakPunctuation function implemented above we will have to use react's dangerouslySetInnerHTML to allow the
thanks
shouldn't you be able to escape &
+ <
(or even everything?)?
Obviously I don't want any XSSs introduced, but it feels like you shouldn't need to add lots of library dependencies to address this issue.
I don't want to microspecify implementation details...
Checklist:
argocd version
.Describe the bug
To Reproduce
Expected behavior
Screenshots
Version
Logs