Skip to content

Commit

Permalink
Merging main branch into staging branch
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 8, 2024
2 parents 85adbec + 5504874 commit 408b487
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
3 changes: 1 addition & 2 deletions frontend/src/common/queries/wheresMyGene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { EMPTY_OBJECT } from "../constants/utils";
import { DEFAULT_FETCH_OPTIONS, JSON_BODY_FETCH_OPTIONS } from "./common";
import { ENTITIES } from "./entities";
import { Dataset } from "@mui/icons-material";
import { formatCitation } from "../utils/formatCitation";

interface RawOntologyTerm {
[id: string]: string;
Expand Down Expand Up @@ -1158,7 +1157,7 @@ function toEntity(item: RawOntologyTerm) {
function toCitationEntity(citation: string) {
return {
id: citation,
name: formatCitation(citation),
name: citation,
};
}

Expand Down
7 changes: 0 additions & 7 deletions frontend/src/common/utils/formatCitation.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
memo,
useCallback,
useContext,
useEffect,
useMemo,
useState,
} from "react";
import { memo, useCallback, useEffect, useMemo, useState } from "react";
import { track } from "src/common/analytics";
import { EVENTS } from "src/common/analytics/events";
import { EXCLUDE_IN_SCREENSHOT_CLASS_NAME } from "src/views/WheresMyGeneV2/components/GeneSearchBar/components/SaveExport";
Expand Down Expand Up @@ -47,8 +40,6 @@ import {
TISSUE_NAME_LABEL_CLASS_NAME,
CELL_TYPE_NAME_LABEL_CLASS_NAME,
} from "src/views/WheresMyGeneV2/components/HeatMap/components/YAxisChart/constants";
import { formatCitation } from "src/common/utils/formatCitation";
import { StateContext } from "src/views/WheresMyGeneV2/common/store";

interface Props {
cellTypes: CellTypeRow[];
Expand Down Expand Up @@ -81,7 +72,6 @@ export default memo(function YAxisChart({
const cellTypeMetadata = useMemo(() => {
return getAllSerializedCellTypeMetadata(cellTypes, tissue);
}, [cellTypes, tissue]);
const { compare } = useContext(StateContext);

return (
<Wrapper id={`${hyphenize(tissue)}-y-axis`}>
Expand All @@ -93,18 +83,14 @@ export default memo(function YAxisChart({
.slice()
.reverse()
.map((cellType) => {
const { name, isAggregated } = deserializeCellTypeMetadata(
const { name } = deserializeCellTypeMetadata(
cellType as CellTypeMetadata
);
const { fontWeight, fontSize, fontFamily } = SELECTED_STYLE;
const selectedFont = `${fontWeight} ${fontSize}px ${fontFamily}`;
const expanded = expandedTissueIds.includes(tissueID);
let formattedName = name;
if (compare && compare === "publication" && !isAggregated) {
formattedName = formatCitation(name);
}
const { text: paddedName } = formatLabel(
formattedName,
name,
Y_AXIS_CHART_WIDTH_PX - 90, // scale based on y-axis width
selectedFont // prevents selected style from overlapping count
);
Expand Down

0 comments on commit 408b487

Please sign in to comment.