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
Bug 1780338: fix(che-icon): add che Icon in the topology #3629
Conversation
<SVGDefs id={FILTER_ID}> | ||
<filter id={FILTER_ID}> | ||
<feOffset result="nw" in="SourceAlpha" dx="-0.5" dy="-0.5" /> | ||
<feOffset result="ne" in="SourceAlpha" dx="0.5" dy="-0.5" /> | ||
<feOffset result="se" in="SourceAlpha" dx="0.5" dy="0.5" /> | ||
<feOffset result="sw" in="SourceAlpha" dx="-0.5" dy="0.5" /> | ||
<feMerge result="blackborder"> | ||
<feMergeNode in="nw" /> | ||
<feMergeNode in="ne" /> | ||
<feMergeNode in="se" /> | ||
<feMergeNode in="sw" /> | ||
</feMerge> | ||
<feFlood floodColor="#FFFFFF" /> | ||
<feComposite in2="blackborder" operator="in" result="offsetColor" /> | ||
<feMerge> | ||
<feMergeNode in="offsetColor" /> | ||
<feMergeNode in="SourceGraphic" /> | ||
</feMerge> | ||
</filter> | ||
</SVGDefs> |
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.
What's the purpose here? none of our other icons do this.
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.
It was adding white background to the che icon, but since the decorator base color is also white, i have removed it.
frontend/public/imgs/logos/che.svg
Outdated
<metadata> | ||
<rdf:RDF> | ||
<cc:Work rdf:about=""> | ||
<dc:format>image/svg+xml</dc:format> | ||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> | ||
<dc:title/> | ||
</cc:Work> | ||
</rdf:RDF> | ||
</metadata> |
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 think this can be removed from the icon.
frontend/public/imgs/logos/che.svg
Outdated
<path d="M0.032227,30.88l-0.032227-17.087,23.853-13.793,23.796,13.784-14.691,8.51-9.062-5.109-23.864,13.695z" fill="#fdb940"/> | ||
<path d="M0,43.355l23.876,13.622,23.974-13.937v-16.902l-23.974,13.506-23.876-13.506v17.217z" fill="#525c86"/> | ||
</g> | ||
</svg> |
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.
nit: missing line at EOF
@@ -102,6 +103,7 @@ const logos = new Map() | |||
.set('icon-capedwarf', capedwarfImg) | |||
.set('icon-catalog', catalogImg) | |||
.set('icon-cassandra', cassandraImg) | |||
.set('icon-che', cheImg) |
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'd prefer that we put the icon in our own package for now as it's not part of the catalog.
@@ -100,6 +100,7 @@ export interface ConnectedWorkloadPipeline { | |||
export interface WorkloadData { | |||
url?: string; | |||
editUrl?: string; | |||
cheEnabled?: boolean; |
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 wonder if we're better off having a cheUrl
here and in the react component check if cheUrl
is present then use it and the che icon, else do the status quo.
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.
editUrl is already determining the correct url to pick, this cheEnabled variable is used only to pick the right icons.
4d66de1
to
fe4a5ab
Compare
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.
verified changes locally.
tested the changes locally, was able to see the Che icon |
x={cx - radius * 1.07} | ||
y={cx - radius * 1.02} | ||
width={radius * 0.39} | ||
height={radius * 0.31} |
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.
Why all these magic numbers?
The PF icons have a height and width of 1em
so we control them using the font-size and set it to the radius.
I would expect the width and height here to also be the radius and the che svg itself be adjusted to fit appropriately similar to the PF icons.
The fact that the width and height aren't the same here means the icon is distorted no?
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.
@christianvogt The icon is not distorted , i have updated the code to have width and height as 1em and adjusting the cheIcon now using the fontsize similar to the PF Icons.
fe4a5ab
to
61cf310
Compare
61cf310
to
faf8c1e
Compare
/retitle Bug 1780338: fix(che-icon): add che Icon in the topology |
@karthikjeeyar: This pull request references Bugzilla bug 1780338, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@karthikjeeyar: No Bugzilla bug is referenced in the title of this pull request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
); | ||
}; | ||
|
||
export default React.memo(CheIcon); |
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.
memo
is fairly useless here because style
is passed in as a new object each time.
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 it.
/approve make the small fix and have someone else give a lgtm |
/retitle Bug 1780338: fix(che-icon): add che Icon in the topology |
@karthikjeeyar: This pull request references Bugzilla bug 1780338, which is valid. The bug has been moved to the POST state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
faf8c1e
to
f00612b
Compare
/kind bug |
/lgtm Verified locally seems good, was able to see che icon however on click of that che opens up in new tab it says |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, debsmita1, invincibleJai, karthikjeeyar, sahil143 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@invincibleJai we need to register the user to che workspace by clicking on the che(deployment) route icon for the first time, an authentication token will be generated. Once it is generated this error will not occur. |
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
@karthikjeeyar: All pull requests linked via external trackers have merged. Bugzilla bug 1780338 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherrypick release-4.3 |
@karthikjeeyar: new pull request created: #3721 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
If the eclipse che operator is installed and configured, then show the che icon instead of git source icon.
Fixes: https://jira.coreos.com/browse/ODC-2383