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: Replace deprecated Tooltip and Popover components with Tooltip2 … #1667

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/renderer/components/commands-action-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
IToastProps,
Menu,
MenuItem,
Popover,
Position,
Toaster,
} from '@blueprintjs/core';
import { Popover2 } from '@blueprintjs/popover2';
import { when } from 'mobx';
import { observer } from 'mobx-react';

Expand Down Expand Up @@ -396,9 +396,9 @@ export const GistActionButton = observer(
);

return (
<Popover content={menu} position={Position.BOTTOM}>
<Popover2 content={menu} position={Position.BOTTOM}>
<Button icon="wrench" />
</Popover>
</Popover2>
);
};

Expand Down Expand Up @@ -429,9 +429,9 @@ export const GistActionButton = observer(
);

return (
<Popover content={privacyMenu} position={Position.BOTTOM}>
<Popover2 content={privacyMenu} position={Position.BOTTOM}>
<Button icon={privacyIcon} />
</Popover>
</Popover2>
);
};

Expand Down
18 changes: 9 additions & 9 deletions src/renderer/components/settings-electron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
Icon,
IconName,
Spinner,
Tooltip,
} from '@blueprintjs/core';
import { Tooltip2 } from '@blueprintjs/popover2';
import { observer } from 'mobx-react';

import {
Expand Down Expand Up @@ -238,7 +238,7 @@ export const ElectronSettings = observer(
return (
<FormGroup label="Channels:">
{Object.values(channels).map((channel) => (
<Tooltip
<Tooltip2
content={`Can't disable channel of selected version (${appState.version})`}
disabled={!getIsCurrentVersionReleaseChannel(channel)}
position="bottom"
Expand All @@ -253,9 +253,9 @@ export const ElectronSettings = observer(
disabled={getIsCurrentVersionReleaseChannel(channel)}
inline={true}
/>
</Tooltip>
</Tooltip2>
))}
<Tooltip
<Tooltip2
content={`Include versions that have reached end-of-life (older than ${window.ElectronFiddle.getOldestSupportedMajor()}.0.0)`}
position="bottom"
intent="primary"
Expand All @@ -267,7 +267,7 @@ export const ElectronSettings = observer(
label="Obsolete"
onChange={this.handleShowObsoleteChange}
/>
</Tooltip>
</Tooltip2>
</FormGroup>
);
}
Expand Down Expand Up @@ -371,7 +371,7 @@ export const ElectronSettings = observer(

if (version === appState.currentElectronVersion.version) {
return (
<Tooltip
<Tooltip2
position="auto"
intent="primary"
content={`Can't remove currently active Electron version (${version})`}
Expand All @@ -382,11 +382,11 @@ export const ElectronSettings = observer(
text={buttonProps.text}
icon={buttonProps.icon}
/>
</Tooltip>
</Tooltip2>
);
} else if (disableDownload(version)) {
return (
<Tooltip
<Tooltip2
position="auto"
intent="primary"
content={`Version is not available on your current OS`}
Expand All @@ -397,7 +397,7 @@ export const ElectronSettings = observer(
text={buttonProps.text}
icon={buttonProps.icon}
/>
</Tooltip>
</Tooltip2>
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/renderer/components/version-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
Intent,
Menu,
MenuItem,
Tooltip,
} from '@blueprintjs/core';
import { Tooltip2 } from '@blueprintjs/popover2';
import {
ItemListPredicate,
ItemListRenderer,
Expand Down Expand Up @@ -178,7 +178,7 @@ export const renderItem: ItemRenderer<RunnableVersion> = (

if (disableDownload(item.version)) {
return (
<Tooltip
<Tooltip2
className="disabled-menu-tooltip"
modifiers={{
flip: { enabled: false },
Expand All @@ -197,7 +197,7 @@ export const renderItem: ItemRenderer<RunnableVersion> = (
label={getItemLabel(item)}
icon={getItemIcon(item)}
/>
</Tooltip>
</Tooltip2>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`ElectronSettings component renders 1`] = `
<Blueprint3.FormGroup
label="Channels:"
>
<Blueprint3.Tooltip
<Blueprint3.Tooltip2
content="Can't disable channel of selected version (2.0.1)"
disabled={false}
hoverCloseDelay={0}
Expand All @@ -30,8 +30,8 @@ exports[`ElectronSettings component renders 1`] = `
label="Stable"
onChange={[Function]}
/>
</Blueprint3.Tooltip>
<Blueprint3.Tooltip
</Blueprint3.Tooltip2>
<Blueprint3.Tooltip2
content="Can't disable channel of selected version (2.0.1)"
disabled={true}
hoverCloseDelay={0}
Expand All @@ -50,8 +50,8 @@ exports[`ElectronSettings component renders 1`] = `
label="Beta"
onChange={[Function]}
/>
</Blueprint3.Tooltip>
<Blueprint3.Tooltip
</Blueprint3.Tooltip2>
<Blueprint3.Tooltip2
content="Can't disable channel of selected version (2.0.1)"
disabled={true}
hoverCloseDelay={0}
Expand All @@ -70,8 +70,8 @@ exports[`ElectronSettings component renders 1`] = `
label="Nightly"
onChange={[Function]}
/>
</Blueprint3.Tooltip>
<Blueprint3.Tooltip
</Blueprint3.Tooltip2>
<Blueprint3.Tooltip2
content="Include versions that have reached end-of-life (older than 9.0.0)"
hoverCloseDelay={0}
hoverOpenDelay={100}
Expand All @@ -87,7 +87,7 @@ exports[`ElectronSettings component renders 1`] = `
label="Obsolete"
onChange={[Function]}
/>
</Blueprint3.Tooltip>
</Blueprint3.Tooltip2>
</Blueprint3.FormGroup>
</Blueprint3.Callout>
<br />
Expand Down Expand Up @@ -281,7 +281,7 @@ exports[`ElectronSettings component renders 1`] = `
<td
className="action"
>
<Blueprint3.Tooltip
<Blueprint3.Tooltip2
content="Can't remove currently active Electron version (2.0.1)"
hoverCloseDelay={0}
hoverOpenDelay={100}
Expand All @@ -296,7 +296,7 @@ exports[`ElectronSettings component renders 1`] = `
icon="cloud-download"
text="Download"
/>
</Blueprint3.Tooltip>
</Blueprint3.Tooltip2>
</td>
</tr>
<tr
Expand Down
Loading