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

MDE/PKFE-31 #57

Merged
merged 14 commits into from
Sep 10, 2024
Merged

MDE/PKFE-31 #57

merged 14 commits into from
Sep 10, 2024

Conversation

@mantvydasdeltuva mantvydasdeltuva added the enhancement New feature or request label Sep 7, 2024
@mantvydasdeltuva mantvydasdeltuva self-assigned this Sep 7, 2024
@justinnas
Copy link
Collaborator

Visual bug

image
image

if (!gnomadFile) {
gnomadErrorStateUpdate('Please select a gnomAD file');
return;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no files are selected and a button is clicked, it only highlights the first file as missing. Would be better to remove both return checks and after that add if (!gnomadFile || !lovdFile) return;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, the 'Please select a X file' should be removed since it's not fully readable anyways. Keeping the selection component the same and just changing the border color and text color to red should be enough.

Copy link
Collaborator Author

@mantvydasdeltuva mantvydasdeltuva Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!clinvarFile) {
clinvarErrorStateUpdate('Please select a ClinVar file');
return;
}
Copy link
Collaborator

@justinnas justinnas Sep 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no files are selected and a button is clicked, it only highlights the first file as missing. Would be better to remove both return checks and after that add if (!lovdFile || !clinvarFile) return;

In addition, the 'Please select a X file' should be removed since it's not fully readable anyways. Keeping the selection component the same and just changing the border color and text color to red should be enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

};
const applySpliceAiClick = useCallback(async () => {
if (!applyTo) {
applyErrorStateUpdate('Please select a file');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the long text inside a file selector, could just leave the component red

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


const applyCaddClick = useCallback(async () => {
if (!applyTo) {
applyErrorStateUpdate('Please select a file');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the long text inside a file selector, could just leave the component red

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}, [fileTree]);

return (
<Box sx={{ display: 'grid', gridTemplateColumns: '50% 50%', p: '1rem' }}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use a Grid component?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's personal

? Theme.palette.error.main
: Theme.palette.text.primary,
}}
>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's being reused elsewhere in the code, maybe it should've been made as a seperate component with parameters? Passing 'error' parameter would be enough since it could take 'blocked' from context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/>
}
label={
<StyledGroupParamsTypography sx={{ color: blocked ? Theme.palette.action.disabled : 'initial' }}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'initial' color needs to be changed to Theme.palette.text.primary

}
label={
<StyledGroupParamsTypography sx={{ color: blocked ? Theme.palette.action.disabled : 'initial' }}>
Override
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be nice to rename 'Override' to 'Override file' for clarity

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

})}
</StyledGroupParamsSelect>
</FormControl>
<FormControlLabel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have this component hidden when the value selected is "New file..."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</StyledGroupParamsTypography>
}
labelPlacement='start'
/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Override component changes like in applyGroupParams also apply here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</StyledGroupParamsTypography>
}
labelPlacement='start'
/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Override component changes like in applyGroupParams also apply here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@justinnas justinnas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phenomenal work! Just need a few small changes

@mantvydasdeltuva
Copy link
Collaborator Author

Visual bug

image image

Fixed with MDE/PKFE-31 visual bug-fix

@mantvydasdeltuva
Copy link
Collaborator Author

Created new story PKFE-50 for further development of this field using autocomplete mui component.

Copy link
Collaborator

@justinnas justinnas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@mantvydasdeltuva mantvydasdeltuva merged commit 1c7e137 into main Sep 10, 2024
0 of 3 checks passed
@mantvydasdeltuva mantvydasdeltuva deleted the MDE/PKFE-31 branch September 10, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants