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

update react-router-dom,react-tooltip& react-transition-group #1278

Merged
2 commits merged into from
Jul 23, 2023
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
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@
"react-jss": "10.10.0",
"react-loader": "2.4.7",
"react-modal": "3.16.1",
"react-router-dom": "6.4.2",
"react-router-dom": "6.11.2",
"react-sortable-hoc": "2.0.0",
"react-tooltip": "4.5.1",
"react-tooltip": "5.13.1",
"react-topbar-progress-indicator": "4.1.1",
"react-transition-group": "1.2.1",
"react-transition-group": "4.4.5",
"route-parser": "0.0.5",
"sanitize-filename": "1.6.3",
"semver": "7.5.4",
Expand All @@ -138,6 +138,7 @@
"@types/node": "18.15.3",
"@types/react": "18.2.12",
"@types/react-dom": "18.2.5",
"@types/react-transition-group": "4.4.6",
"@types/route-parser": "0.1.4",
"@types/tar": "6.1.5",
"@types/uuid": "9.0.2",
Expand Down
95 changes: 49 additions & 46 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 21 additions & 13 deletions src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from 'react';
import ReactTooltip from 'react-tooltip';
import { Tooltip as ReactTooltip } from 'react-tooltip';
import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl';
import { inject, observer } from 'mobx-react';
import {
Expand Down Expand Up @@ -123,10 +123,6 @@ class Sidebar extends Component<IProps, IState> {
};
}

componentDidUpdate() {
ReactTooltip.rebuild();
}

enableToolTip() {
this.setState({ tooltipEnabled: true });
}
Expand Down Expand Up @@ -232,7 +228,8 @@ class Sidebar extends Component<IProps, IState> {
type="button"
onClick={() => openSettings({ path: 'recipes' })}
className="sidebar__button sidebar__button--new-service"
data-tip={`${intl.formatMessage(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${intl.formatMessage(
messages.addNewService,
)} (${addNewServiceShortcutKey(false)})`}
>
Expand All @@ -251,7 +248,8 @@ class Sidebar extends Component<IProps, IState> {
});
}}
className="sidebar__button sidebar__button--split-mode-toggle"
data-tip={`${intl.formatMessage(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${intl.formatMessage(
messages.splitModeToggle,
)} (${splitModeToggleShortcutKey(false)})`}
>
Expand All @@ -268,7 +266,8 @@ class Sidebar extends Component<IProps, IState> {
className={`sidebar__button sidebar__button--workspaces ${
isWorkspaceDrawerOpen ? 'is-active' : ''
}`}
data-tip={`${intl.formatMessage(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${intl.formatMessage(
workspaceToggleMessage,
)} (${workspaceToggleShortcutKey(false)})`}
>
Expand All @@ -285,7 +284,8 @@ class Sidebar extends Component<IProps, IState> {
className={`sidebar__button sidebar__button--audio ${
isAppMuted ? 'is-muted' : ''
}`}
data-tip={`${intl.formatMessage(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${intl.formatMessage(
isAppMuted ? messages.unmute : messages.mute,
)} (${muteFerdiumShortcutKey(false)})`}
>
Expand All @@ -303,7 +303,8 @@ class Sidebar extends Component<IProps, IState> {
className={`sidebar__button sidebar__button--todos ${
todosStore.isTodosPanelVisible ? 'is-active' : ''
}`}
data-tip={`${intl.formatMessage(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${intl.formatMessage(
todosToggleMessage,
)} (${todosToggleShortcutKey(false)})`}
>
Expand All @@ -322,7 +323,8 @@ class Sidebar extends Component<IProps, IState> {
},
});
}}
data-tip={`${intl.formatMessage(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${intl.formatMessage(
messages.lockFerdium,
)} (${lockFerdiumShortcutKey(false)})`}
>
Expand All @@ -331,14 +333,20 @@ class Sidebar extends Component<IProps, IState> {
) : null}
</>
{this.state.tooltipEnabled && (
<ReactTooltip place="right" type="dark" effect="solid" />
<ReactTooltip
id="tooltip-sidebar-button"
place="right"
variant="dark"
style={{ height: 'auto', overflowY: 'unset' }}
/>
)}
{!hideSettingsButton && !isMenuCollapsed ? (
<button
type="button"
onClick={() => openSettings({ path: 'app' })}
className="sidebar__button sidebar__button--settings"
data-tip={`${intl.formatMessage(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${intl.formatMessage(
globalMessages.settings,
)} (${settingsShortcutKey(false)})`}
>
Expand Down
3 changes: 2 additions & 1 deletion src/components/services/tabs/TabItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ class TabItem extends Component<IProps, IState> {
onKeyDown={noop}
role="presentation"
onContextMenu={() => menu.popup()}
data-tip={`${service.name} ${acceleratorString(
data-tooltip-id="tooltip-sidebar-button"
data-tooltip-content={`${service.name} ${acceleratorString(
shortcutIndex,
cmdOrCtrlShortcutKey(false),
)}`}
Expand Down
9 changes: 7 additions & 2 deletions src/components/settings/account/AccountDashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from 'react';
import { observer } from 'mobx-react';
import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl';
import ReactTooltip from 'react-tooltip';
import { Tooltip as ReactTooltip } from 'react-tooltip';
import { H1, H2 } from '../../ui/headline';

import Loader from '../../ui/Loader';
Expand Down Expand Up @@ -215,7 +215,12 @@ class AccountDashboard extends Component<IProp> {
</>
)}
</div>
<ReactTooltip place="right" type="dark" effect="solid" />
<ReactTooltip
place="right"
variant="dark"
float
style={{ height: 'auto' }}
/>
</div>
);
}
Expand Down
Loading