Skip to content
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

Minor refactorings #942

Merged
merged 13 commits into from
Nov 22, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import fetchAPI from 'utils/http/fetchAPI';
import GEM2SLoadingScreen from 'components/GEM2SLoadingScreen';
import '__test__/test-utils/setupTests';

const { Title, Text } = Typography;
const { Title } = Typography;

const mockStore = configureMockStore([thunk]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const CellSetsTool = (props) => {
setTreeData(composeTree(hierarchy, properties));
}, [hierarchy, properties]);

const [numSelectedCellSetKeys, setNumSelectedCellSetKeys] = useState(0);
const [selectedCellsCount, setSelectedCellsCount] = useState(0);

useEffect(() => {
const louvainClusters = hierarchy.find(({ key }) => key === 'louvain')?.children;
Expand All @@ -94,7 +94,7 @@ const CellSetsTool = (props) => {
const numSelectedFiltered = new Set([...selectedCells]
.filter((cellIndex) => filteredCellIds.current.has(cellIndex)));

setNumSelectedCellSetKeys(numSelectedFiltered.size);
setSelectedCellsCount(numSelectedFiltered.size);
}, [selectedCellSetKeys, properties]);

const onNodeUpdate = useCallback((key, data) => {
Expand Down Expand Up @@ -124,7 +124,7 @@ const CellSetsTool = (props) => {
const renderContent = () => {
let operations = null;

if (numSelectedCellSetKeys > 0) {
if (selectedCellSetKeys.length > 0) {
operations = (
<Space style={{ marginBottom: '10px' }}>
<SubsetCellSetsOperation
Expand Down Expand Up @@ -164,7 +164,7 @@ const CellSetsTool = (props) => {
helpTitle='Create new cell set from the complement of the selected sets in the current tab.'
/>
<Text type='primary' id='selectedCellSets'>
{`${numSelectedCellSetKeys} cell${numSelectedCellSetKeys === 1 ? '' : 's'} selected`}
{`${selectedCellsCount} cell${selectedCellsCount === 1 ? '' : 's'} selected`}
</Text>
</Space>
);
Expand Down
4 changes: 3 additions & 1 deletion src/utils/upload/validateSeurat.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const validateSeurat = async () => {};
const validateSeurat = async () => {
// Currently there is no content checking for H5 files
};

export default validateSeurat;
Loading