Skip to content

Commit

Permalink
EPMRPP-92352 || sonar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-hambardzumian committed Sep 11, 2024
1 parent 6e657cf commit 82a8eb3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,24 @@ export const DefectDetails = ({ fetchFunc, debugMode, logItem }) => {
</div>
</div>
)}

<div className={cx('defect-type')}>
{isDefectTypeVisible && (
<>
{expanded ? null : (
<div className={cx('collapsed-info')}>
<span className={cx('expand-more')} onClick={toggleExpanded}>
<button
className={cx('expand-more')}
onClick={toggleExpanded}
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
toggleExpanded();
}
}}
>
<span className={cx('icon')}>{Parser(ArrowDownIcon)}</span>
{formatMessage(messages.more)}
</span>
</button>
<span className={cx('issues-info', 'with-separator')}>
<span className={cx('icon')}>{Parser(BugIcon)}</span>
{logItem.issue.externalSystemIssues.length}
Expand Down Expand Up @@ -370,10 +378,19 @@ export const DefectDetails = ({ fetchFunc, debugMode, logItem }) => {
</div>
)}
{expanded && logItem.issue && (
<span className={cx('expand-more', 'collapse')} onClick={toggleExpanded}>
<button
className={cx('expand-more', 'collapse')}
onClick={toggleExpanded}
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
toggleExpanded();
}
}}
>
<span className={cx('icon')}>{Parser(ArrowDownIcon)}</span>
{formatMessage(messages.showLess)}
</span>
</button>
)}
</div>
</div>
Expand All @@ -388,6 +405,4 @@ DefectDetails.propTypes = {

DefectDetails.defaultProps = {
logItem: null,
isBtsPluginsExist: false,
enabledBtsPlugins: [],
};
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,16 @@
line-height: 16px;
padding-right: 16px;
color: $COLOR--topaz;
background: none;
border: none;
font-size: 13px;
font-family: $FONT-SEMIBOLD;
cursor: pointer;

&:focus-visible {
outline-color: $COLOR--topaz;
}

.icon {
width: 13px;
height: 13px;
Expand All @@ -146,6 +152,7 @@
.defect-item {
border: none;
cursor: default;

&:hover {
border: none;
}
Expand Down

0 comments on commit 82a8eb3

Please sign in to comment.