Skip to content

Commit

Permalink
Merge pull request #206 from lokanandaprabhu/feature/SRVKP-6898-1
Browse files Browse the repository at this point in the history
SRVKP-6898: Replace font awesome with custom css in dynamic plugin #204
  • Loading branch information
openshift-merge-bot[bot] authored Dec 11, 2024
2 parents 6478102 + b1c277d commit d57d113
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export const pipelineBuilderPage = {
pipelineBuilderPage.AddTask(taskName);
},
clickOnTask: (taskName: string) => {
cy.get('.co-spin', { timeout: 80000 }).should('not.exist');
cy.get('.pipelines-console-plugin__spin', { timeout: 80000 }).should(
'not.exist',
);
cy.get(`[data-id="${taskName}"] text`).click({ force: true });
},
selectParallelTask: (taskName: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const InstallingNodeDecorator: React.FC<InstallingNodeDecoratorProps> = ({
className="opp-installing-node-decorator__circle"
/>
<g transform="translate(-5, -7)">
<InProgressIcon className="co-spin" />
<InProgressIcon className="pipelines-console-plugin__spin" />
</g>
</g>
</Tooltip>
Expand Down
5 changes: 4 additions & 1 deletion src/components/pipeline-topology/StatusIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export const StatusIcon: React.FC<StatusIconProps> = ({
case ComputedStatus['In Progress']:
case ComputedStatus.Running:
return (
<SyncAltIcon {...props} className={cx({ 'co-spin': !disableSpin })} />
<SyncAltIcon
{...props}
className={cx({ 'pipelines-console-plugin__spin': !disableSpin })}
/>
);

case ComputedStatus.Succeeded:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const TaskComponent: React.FC<TaskProps> = ({
>
<g
className={cx({
'co-spin odc-pipeline-vis-task--icon-spin':
'pipelines-console-plugin__spin odc-pipeline-vis-task--icon-spin':
status.reason === ComputedStatus.Running,
'odc-pipeline-vis-task--icon-stop':
status.reason !== ComputedStatus.Running,
Expand Down
4 changes: 3 additions & 1 deletion src/components/pipelines-details/StatusIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const StatusIcon: React.FC<StatusIconProps> = ({
return (
<SyncAltIcon
{...props}
className={classnames({ 'co-spin': !disableSpin })}
className={classnames({
'pipelines-console-plugin__spin': !disableSpin,
})}
/>
);

Expand Down
2 changes: 1 addition & 1 deletion src/components/status/StatusIconAndText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const StatusIconAndText: React.FC<StatusIconAndTextProps> = ({
{icon &&
React.cloneElement(icon, {
className: classNames(
spin && 'co-spin',
spin && 'pipelines-console-plugin__spin',
icon.props.className,
!iconOnly && 'co-icon-and-text__icon co-icon-flex-child',
),
Expand Down
10 changes: 4 additions & 6 deletions src/components/styles/common.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@keyframes co-spin {
@keyframes pipelines-console-plugin__spin {
0% {
transform: rotate(0deg);
}
Expand All @@ -7,12 +7,10 @@
}
}

.co-spin {
animation: co-spin 2s infinite linear;
}
.pipelines-console-plugin__spin {
animation: pipelines-console-plugin__spin 2s infinite linear;

@media (prefers-reduced-motion: reduce) {
.co-spin {
@media (prefers-reduced-motion: reduce) {
animation: none;
}
}

0 comments on commit d57d113

Please sign in to comment.