Skip to content

Commit

Permalink
fix: Change run picker menu to use three dots and update stop timeser…
Browse files Browse the repository at this point in the history
…ies icon [PT-187736835]
  • Loading branch information
dougmartin committed Jul 2, 2024
1 parent 2dd55a1 commit bee817b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mobile-app/components/run-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const RunPicker: React.FC<IProps> = ({ runs, onRunSelect, onRunUpload, on
<div className={css.icon}><Icon name="upload" /></div><div className={css.text}>Upload</div></div> : undefined}
</div>
<div className={css.menuContainer}>
<MenuComponent>
<MenuComponent icon="more">
{onRunEdit ? <MenuItemComponent icon={"create"} onClick={onRunEdit.bind(null, run)}>Edit</MenuItemComponent> : undefined}
{onRunUpload ? <MenuItemComponent icon={"upload"} onClick={onRunUpload.bind(null, run)}>Upload</MenuItemComponent> : undefined}
{onRunDelete ? <MenuItemComponent icon={"delete"} onClick={onRunDelete.bind(null, run)}>Delete</MenuItemComponent> : undefined}
Expand Down
4 changes: 4 additions & 0 deletions src/shared/components/data-table-field.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ $headerBorder: #fff;
&.record {
background-color: $sensorGreenLight1;
}
&.timeSeriesStop {
background-color: #fff;
border: 4px solid #00a80a;
}
&:hover:not(.disabled) {
cursor: pointer;
}
Expand Down
1 change: 1 addition & 0 deletions src/shared/components/data-table-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ export const DataTableField: React.FC<FieldProps> = props => {
[css.refresh]: !sensorFieldsBlank,
[css.record]: sensorFieldsBlank,
[css.disabled]: buttonDisabled,
[css.timeSeriesStop]: iconName === "stopDataTrial",
});
const refreshBtnCell = <td key="refreshBtn" className={`${css.refreshSensorReadingColumn} ${css.readOnly}`}>
{
Expand Down
4 changes: 3 additions & 1 deletion src/shared/components/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import RecordDataTrial from "../icons/record-data-trial.svg";
import ReRecordDataTrial from "../icons/re-record-data-trial.svg";
import StopDataTrial from "../icons/stop-data-trial.svg";
import DeleteDataTrial from "../icons/delete-data-trial.svg";
import More from "../icons/more-button.svg";

const Icons = {
label: Label,
Expand All @@ -44,7 +45,8 @@ const Icons = {
recordDataTrial: RecordDataTrial,
reRecordDataTrial: ReRecordDataTrial,
stopDataTrial: StopDataTrial,
deleteDataTrial: DeleteDataTrial
deleteDataTrial: DeleteDataTrial,
more: More
};
export type IconName = keyof typeof Icons;

Expand Down
6 changes: 6 additions & 0 deletions src/shared/icons/more-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/shared/icons/stop-data-trial.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bee817b

Please sign in to comment.