Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,21 @@ th.ant-table-cell {
vertical-align: unset;
}


.packs-view-root tr td:first-child,
.packs-view-root tr th:first-child {
padding-left: 24px !important;
}

.packs-view-root .ant-table-wrapper {
padding-top: 4px;
}

.active-layer {
background-color: var(--vscode-editor-activeSelectionBackground);
}

.inactive-layer {
background-color: var(--vscode-editor-inactiveSelectionBackground);
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,13 @@

.packs-view-root .description-column {
max-width: 65vw;
}

.active-layer {
background-color: var(--vscode-editor-activeSelectionBackground);
}

.inactive-layer {
background-color: var(--vscode-editor-inactiveSelectionBackground);
opacity: 0.5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export const PacksView: React.FC<PacksProps> = ({ state, openFile, messageHandle
const relativePath = state.selectedTargetType?.relativePath || '';
const selectedInCurrentTarget = referenceFromContext(relativePath, record).length > 0;

return !selectedInCurrentTarget ? '' : 'ant-table-row-disabled';
return selectedInCurrentTarget ? 'active-layer' : 'inactive-layer';
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ export const isInActiveLayer = (record: ComponentRowDataType, state: { activeLay
export const rowClassName = (record: ComponentRowDataType, state: { activeLayer?: string, selectedTargetType: TargetSetData | undefined }): string => {
const isLeaf = !(record.children && record.children.length);
const inActiveLayer = isInActiveLayer(record, state);
return `${isLeaf ? 'leaf-node ' : ''}${!inActiveLayer ? 'active-layer ' : 'ant-table-row-disabled '}`.trim();
const selectable = inActiveLayer
|| !record.aggregate?.options?.layer!.length
|| record.aggregate?.options?.layer === getActiveLayer(state);
return `${isLeaf ? 'leaf-node ' : ''}${selectable ? 'active-layer ' : 'inactive-layer '}`.trim();
};

export const codiconIcon = (name: string, title?: string, color?: string): React.ReactNode => {
Expand Down
Loading