Conversation
Genarito
left a comment
There was a problem hiding this comment.
@juanNH para hacerlo más simple, encará todo esto de:
- Documentar los métodos y componentes
- Renombres para que sean acorde a los demás componentes del proyecto
- Pasar todos los awaits que haya en este PR a then/catch
Después de eso lo chequeo de nuevo, así no duplico tanto los comentarios y nos llenamos de ruido mutuamente
| onApplyFilters: () => void; | ||
| } | ||
|
|
||
| export const ActiveGraphFiltersPanel = ({ |
There was a problem hiding this comment.
Agregar documentación sobre qué es lo que renderiza
| { key: 'both', value: 'both', text: traversalLabels.both }, | ||
| ] | ||
|
|
||
| type Props = { |
There was a problem hiding this comment.
En todos los componentes nuestro estándar es llamarlo con el nombre del componente + "Props": ActiveGraphFiltersPanelProps
| } | ||
|
|
||
| export const ActiveGraphFiltersPanel = ({ | ||
| filters, |
There was a problem hiding this comment.
El desglose de las props hacelo en el cuerpo del componente, acá solo dejá props: ActiveGraphFiltersPanelProps
| maxLevels: 3, | ||
| } | ||
|
|
||
| export const GeneExpressionRegulationAssociationNetworkPanel = ({ |
There was a problem hiding this comment.
Mismos comentarios que gene-association-network/ActiveGraphFiltersPanel.tsx
| maxLevels: draftFilters[0]?.maxLevels ?? DEFAULT_ROOT_FILTER.maxLevels, | ||
| }), [draftFilters]) | ||
|
|
||
| const queryParams = useMemo(() => ({ |
There was a problem hiding this comment.
Esto no tiene sentido, está cacheando una constante pasándole el valor a esa constante
| }) | ||
| } | ||
|
|
||
| const handleUpdateFilter = (rootNodeId: string, partialFilter: Partial<GraphQueryFilter>) => { |
There was a problem hiding this comment.
Documentar los métodos, después es imposible de mantener hasta para la IA
| /> | ||
| )} | ||
|
|
||
| {!loading && !error && data && ( |
There was a problem hiding this comment.
La condición !loading && !error && data && se repite varias veces, refactorizar a una constante
| export const fetchGeneGraph = async ( | ||
| params: FetchGeneGraphParams | ||
| ): Promise<FetchGeneGraphResponse> => { | ||
| await sleep(350) |
There was a problem hiding this comment.
No usamos await en todo el proyecto, usar then/catch y eliminar sleep que no sirve para nada
| } | ||
| } | ||
|
|
||
| const collectResponse = (filters: GraphQueryFilter[]): FetchGeneGraphResponse => { |
There was a problem hiding this comment.
Documentar este y cada uno de los métodos de este archivo
No description provided.