Skip to content

Commit

Permalink
Add some icon tooltips (fixes #143)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrott committed Nov 5, 2023
1 parent b99a1e1 commit a1fc0b6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
7 changes: 7 additions & 0 deletions FtcDashboard/dash/src/assets/icons/connected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions FtcDashboard/dash/src/assets/icons/disconnected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions FtcDashboard/dash/src/components/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { saveLayoutPreset, getLayoutPreset } from '@/store/actions/settings';
import { RootState } from '@/store/reducers';

import { BaseViewIconButton } from '@/components/views/BaseView';
import { ReactComponent as ConnectedIcon } from '@/assets/icons/wifi.svg';
import { ReactComponent as DisconnectedIcon } from '@/assets/icons/wifi_off.svg';
import { ReactComponent as ConnectedIcon } from '@/assets/icons/connected.svg';
import { ReactComponent as DisconnectedIcon } from '@/assets/icons/disconnected.svg';
import { ReactComponent as SettingsIcon } from '@/assets/icons/settings.svg';
import SettingsModal from './SettingsModal';
import { startSocketWatcher } from '@/store/middleware/socketMiddleware';
Expand Down Expand Up @@ -71,6 +71,7 @@ export default function Dashboard() {
<DisconnectedIcon className="ml-4 h-10 w-10 py-1" />
)}
<BaseViewIconButton
title="Settings"
className="icon-btn group ml-3 h-8 w-8 hover:border-white/50"
onClick={() => setIsSettingsModalOpen(true)}
>
Expand Down
2 changes: 1 addition & 1 deletion FtcDashboard/dash/src/components/views/CameraView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CameraView extends React.Component {
Camera
</BaseViewHeading>
<BaseViewIcons>
<BaseViewIconButton>
<BaseViewIconButton title="Rotate">
<RefreshIcon
className="h-6 w-6"
onClick={() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const ConfigView = ({
</BaseViewHeading>
<BaseViewIcons>
<BaseViewIconButton
title="Save Changes"
onClick={() => {
const configDiff = validAndModified(configRoot);
if (configDiff != null) {
Expand All @@ -111,6 +112,7 @@ const ConfigView = ({
<SaveIcon className="h-6 w-6" />
</BaseViewIconButton>
<BaseViewIconButton
title="Reload Values"
onClick={() =>
dispatch({
type: 'REFRESH_CONFIG',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ class GraphView extends Component<GraphViewProps, GraphViewState> {
</BaseViewHeading>
<BaseViewIcons>
{this.state.graphing && this.state.selectedKeys.length !== 0 && (
<BaseViewIconButton className="icon-btn h-8 w-8">
<BaseViewIconButton
title={this.state.paused ? 'Resume Graphing' : 'Pause Graphing'}
className="icon-btn h-8 w-8"
>
{this.state.paused ? (
<PlayIcon className="h-6 w-6" onClick={this.play} />
) : (
Expand All @@ -195,7 +198,9 @@ class GraphView extends Component<GraphViewProps, GraphViewState> {
</BaseViewIconButton>
)}

<BaseViewIconButton>
<BaseViewIconButton
title={this.state.graphing ? 'Stop Graphing' : 'Start Graphing'}
>
{this.state.graphing ? (
<CloseIcon className="h-6 w-6" onClick={this.stop} />
) : (
Expand Down

0 comments on commit a1fc0b6

Please sign in to comment.