Skip to content

Commit

Permalink
Wrap disabled buttons with tooltips in divs. Add debug message.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmhunter committed Jun 11, 2024
1 parent 2ce70b0 commit 4f78784
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 46 deletions.
2 changes: 1 addition & 1 deletion arduino-serial/Baud115200Test/Baud115200Test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void loop() {
Serial.println("fast ");
// Wait until data is sent
Serial.flush();
// delay(DISPLAY_PERIOD);
delay(DISPLAY_PERIOD);
}


Expand Down
98 changes: 53 additions & 45 deletions src/view/Settings/ProfileSettings/ProfileSettingsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,49 +94,55 @@ function ProfileSettingsView(props: Props) {
enterDelay={500}
arrow
>
<Button
variant="contained"
color="primary"
startIcon={<PublishIcon />}
disabled={profilesSettings.selectedProfiles.length !== 1}
onClick={async () => {
await profilesSettings.loadProfile();
}}
>
Load Profile
</Button>
<div>
<Button
variant="contained"
color="primary"
startIcon={<PublishIcon />}
disabled={profilesSettings.selectedProfiles.length !== 1}
onClick={async () => {
await profilesSettings.loadProfile();
}}
>
Load Profile
</Button>
</div>
</Tooltip>

<Tooltip title="Saves the current app state to the selected profile above." enterDelay={500} arrow>
<Button
variant="contained"
color="primary"
startIcon={<SaveIcon />}
disabled={profilesSettings.selectedProfiles.length !== 1}
onClick={() => {
profilesSettings.saveCurrentAppStateToProfile();
}}
>
Save App State To Profile
</Button>
<div>
<Button
variant="contained"
color="primary"
startIcon={<SaveIcon />}
disabled={profilesSettings.selectedProfiles.length !== 1}
onClick={() => {
profilesSettings.saveCurrentAppStateToProfile();
}}
>
Save App State To Profile
</Button>
</div>
</Tooltip>

{/* =============================================================================== */}
{/* PROFILE NAME */}
{/* =============================================================================== */}
<Tooltip title="Use this to rename the selected profile's name." enterDelay={500} arrow>
<TextField
label="Profile name"
variant="outlined"
size="small"
value={profilesSettings.profileNameText}
error={profilesSettings.profileNameErrorMsg !== ''}
helperText={profilesSettings.profileNameErrorMsg}
disabled={profilesSettings.selectedProfiles.length !== 1}
onChange={(event) => {
profilesSettings.setProfileName(event.target.value);
}}
></TextField>
<div>
<TextField
label="Profile name"
variant="outlined"
size="small"
value={profilesSettings.profileNameText}
error={profilesSettings.profileNameErrorMsg !== ''}
helperText={profilesSettings.profileNameErrorMsg}
disabled={profilesSettings.selectedProfiles.length !== 1}
onChange={(event) => {
profilesSettings.setProfileName(event.target.value);
}}
></TextField>
</div>
</Tooltip>
</div>

Expand All @@ -157,17 +163,19 @@ function ProfileSettingsView(props: Props) {
</Tooltip>

<Tooltip title="Deletes the selected profile above." enterDelay={500} arrow>
<Button
variant="contained"
color="primary"
startIcon={<DeleteIcon />}
disabled={profilesSettings.selectedProfiles.length !== 1}
onClick={() => {
profilesSettings.deleteProfile();
}}
>
Delete Profile
</Button>
<div>
<Button
variant="contained"
color="primary"
startIcon={<DeleteIcon />}
disabled={profilesSettings.selectedProfiles.length !== 1}
onClick={() => {
profilesSettings.deleteProfile();
}}
>
Delete Profile
</Button>
</div>
</Tooltip>
</div>

Expand Down
1 change: 1 addition & 0 deletions src/view/Terminals/SingleTerminal/SingleTerminalView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export default observer((props: Props) => {
if (!terminalDiv?.current?.offsetHeight) {
return;
}
console.log('handleResize() called');
terminal.setTerminalViewHeightPx(terminalDiv?.current?.offsetHeight);
};
handleResize();
Expand Down

0 comments on commit 4f78784

Please sign in to comment.