Skip to content

Commit

Permalink
EPMRPP-93091 | conde review -1
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-hambardzumian committed Jul 23, 2024
1 parent 7f83c54 commit 9e76eb0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ ClusterColumn.defaultProps = {
cluster: {},
};

export const ClusterItemsGridRow = ({
data,
onEditItem,
onUnlinkSingleTicket,
onEditDefect,
isSelectedOptionAll,
}) => {
export const ClusterItemsGridRow = ({ data, onEditItem, onUnlinkSingleTicket, onEditDefect }) => {
const { id, matchedTests } = data;
const { formatMessage } = useIntl();
const dispatch = useDispatch();
Expand Down Expand Up @@ -140,10 +134,7 @@ export const ClusterItemsGridRow = ({
<ClusterColumn cluster={data} />
</div>
{extensions.map((extension) => (
<div
className={cx('table-cell', 'extension-col', { large: isSelectedOptionAll })}
key={extension.name}
>
<div className={cx('table-cell', 'extension-col')} key={extension.name}>
<ExtensionLoader extension={extension} data={data} />
</div>
))}
Expand Down Expand Up @@ -206,7 +197,6 @@ ClusterItemsGridRow.propTypes = {
onEditItem: PropTypes.func,
onUnlinkSingleTicket: PropTypes.func,
onEditDefect: PropTypes.func,
isSelectedOptionAll: PropTypes.bool,
};
ClusterItemsGridRow.defaultProps = {
data: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
}

&.extension-col {
width: 130px;

&.large {
width: 165px;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ import styles from './uniqueErrorsGrid.scss';

const cx = classNames.bind(styles);
const MATCHED_TESTS_COLUMN_ID = 'matchedTests';
const ALL_UNIQUE_ERRORS = 'all';

export const UniqueErrorsGridWrapped = ({ parentLaunch, data, loading, ...rest }) => {
const { formatMessage } = useIntl();
const query = useSelector(querySelector);
const hasNamespacedQuery = Object.keys(extractNamespacedQuery(query, NAMESPACE)).length;
const { mode: selectedErrorType = ALL_UNIQUE_ERRORS } = extractNamespacedQuery(query, NAMESPACE);
const extensions = useSelector(uniqueErrorGridHeaderCellComponentSelector);
const columns = [
{
Expand Down Expand Up @@ -69,7 +67,7 @@ export const UniqueErrorsGridWrapped = ({ parentLaunch, data, loading, ...rest }

return extensions.map((extension) => {
const MemoizedComponent = (params) => (
<div className={cx('extension-col', { large: selectedErrorType === ALL_UNIQUE_ERRORS })}>
<div className={cx('extension-col')}>
<ExtensionLoader extension={extension} {...params} />
</div>
);
Expand All @@ -80,7 +78,7 @@ export const UniqueErrorsGridWrapped = ({ parentLaunch, data, loading, ...rest }
},
};
});
}, [extensions, selectedErrorType]);
}, [extensions]);

columns.push(...memoizedExtensionsColumns, {
id: MATCHED_TESTS_COLUMN_ID,
Expand All @@ -107,7 +105,6 @@ export const UniqueErrorsGridWrapped = ({ parentLaunch, data, loading, ...rest }
loading={loading}
nestedGridRow={ClusterItemsGridRow}
nestedView
isSelectedOptionAll={selectedErrorType === ALL_UNIQUE_ERRORS}
{...rest}
/>
{!loading && !data.length && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,5 @@
}

.extension-col{
width: 130px;

&.large{
width: 165px;
}
width: 165px;
}

0 comments on commit 9e76eb0

Please sign in to comment.