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

Improvements in the AotF GQL Playground Component #3290

Closed
carcruz opened this issue Apr 18, 2024 · 1 comment
Closed

Improvements in the AotF GQL Playground Component #3290

carcruz opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels
Frontend Relates to Open Targets backend team Platform Issues related to Open Targets Platform

Comments

@carcruz
Copy link

carcruz commented Apr 18, 2024

Current Implementation:
The current API AotF Playground feature is built-in each specific entity associations page (Target - Disease), this makes difficult to keep consistency between both components and is a scalability blocker. It may generate unnecessary re-renders because of the call of the useAotfContext hook in a high-level component.

Expected Implementation:
A component ( <AotfApiPlayground /> ) that takes advantage of the useAoffContex hook consuming the query and building the variables parameter of the APIPlayGround component in its context.

This will facilitate the Disease/Target Associations page to be written in a clearer way:

/* DISEASE ASSOCIATION  */
function DiseaseAssociations({ efoId }) {
  return (
    <AssociationsProvider id={efoId} entity={ENTITIES.DISEASE} query={DISEASE_ASSOCIATIONS_QUERY}>
      <ControlsSection>
        <Box sx={{ display: "flex", flexWrap: "wrap" }}>
          <SearhInput />
          <OptionsControlls>
            <AdvanceOptionsMenu />
            <PrivateWrapper>
              <DataUploader />
            </PrivateWrapper>
            <Divider orientation="vertical" />
            <DataDownloader fileStem={`OT-${efoId}-associated-targets`} />
            {/* This is the component to be created */}
            <AotfApiPlayground/>
          </OptionsControlls>
        </Box>
        <Box>
          <TargetPrioritisationSwitch />
        </Box>
      </ControlsSection>
      <TableAssociations />
    </AssociationsProvider>
  );
}
@carcruz carcruz changed the title Improvements in AotF GraphQL Play ground Improvements in the AotF GQL Playground Component Apr 18, 2024
@carcruz carcruz added Frontend Relates to Open Targets backend team Platform Issues related to Open Targets Platform labels Apr 18, 2024
@prashantuniyal02
Copy link

released in 24.06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Relates to Open Targets backend team Platform Issues related to Open Targets Platform
Projects
None yet
Development

No branches or pull requests

3 participants