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

fix: LEAP-930: Changes to ML settings UI #5712

Merged
merged 11 commits into from
Apr 18, 2024
Prev Previous commit
Next Next commit
Improve style and mock-ups
  • Loading branch information
hlomzik committed Apr 10, 2024
commit 026b594fe9dc0e8e69bc89abd042c18efec34b17
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,3 @@

&_large
margin 40px 0

&_alert
&_warning
background-color rgb(255, 251, 230);
border 1px solid rgb(255, 229, 143);
border-radius 8px
padding 10px
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
.ml-settings
.form
margin-top: 32px

.description
line-height: 1.5

&__callout
color: #9e9e9e;
background-color rgb(255, 251, 230);
border 1px solid rgb(255, 229, 143);
border-radius 8px;
padding 10px;
line-height: 1.5;
display: flex;
gap: 5px;

.backend-card
width 100%
padding 15px
border-radius 5px
marginTop 0
background #FAFAFA
border 1px solid rgba(137, 128, 152, 0.16)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useContext, useEffect, useState } from 'react';
import { NavLink } from 'react-router-dom';
import { Button, Spinner } from '../../../components';
import { Description } from '../../../components/Description/Description';
import { Divider } from '../../../components/Divider/Divider';
import { Form, Label, Toggle } from '../../../components/Form';
import { modal } from '../../../components/Modal/Modal';
import { EmptyState } from '../../../components/EmptyState/EmptyState';
Expand Down Expand Up @@ -132,24 +132,26 @@ export const MachineLearningSettings = () => {
backends={backends}
/>

<Divider height={32} />

{backends.length > 0 && (
<>
<Description style={{ marginTop: 0, maxWidth: 680, lineHeight: "1.5em" }}>
<Description>
A connected model has been detected! If you wish to fetch
predictions from this model, please follow these steps:
<br />
<br />
1. Navigate to the <i>Data Manager</i>.<br />
2. Select the desired tasks.<br />
3. Click on <i>Retrieve predictions</i> from the{' '}
<i>Actions</i> menu.
</Description>
<Description style={{ marginTop: 0, display: "flex", gap: "5px" }} className="description_alert_warning">
<IconInfo width="20" height="20" />
If you want to use the model predictions for prelabeling, please configure this in the Annotation settings.
3. Click on <i>Retrieve predictions</i> from the <i>Actions</i> menu.
</Description>
<Elem name="callout">
<IconInfo width="24" height="24" />
<span>
If you want to use the model predictions for prelabeling, please configure this in the
{" "}
<NavLink to="annotation">Annotation settings</NavLink>
.
</span>
</Elem>
</>
)}

Expand Down