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 #1260

Merged
merged 2 commits into from
Jul 20, 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.
Jump to
Jump to file
Failed to load files.
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.14.1",
"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
99 changes: 51 additions & 48 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 @@ -80,7 +80,7 @@
showServiceNameSetting: boolean;
showMessageBadgesEvenWhenMuted: boolean;
isAppMuted: boolean;
isMenuCollapsed: boolean;

Check warning on line 83 in src/components/layout/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / ubuntu

'isMenuCollapsed' PropType is defined but prop is never used

Check warning on line 83 in src/components/layout/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / macos

'isMenuCollapsed' PropType is defined but prop is never used

Check warning on line 83 in src/components/layout/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / windows

'isMenuCollapsed' PropType is defined but prop is never used
isWorkspaceDrawerOpen: boolean;
isTodosServiceActive: boolean;
actions?: Actions;
Expand All @@ -90,7 +90,7 @@
toggleCollapseMenu: () => void;
toggleWorkspaceDrawer: () => void;
openSettings: (args: { path: string }) => void;
closeSettings: () => void;

Check warning on line 93 in src/components/layout/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / ubuntu

'closeSettings' PropType is defined but prop is never used

Check warning on line 93 in src/components/layout/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / macos

'closeSettings' PropType is defined but prop is never used

Check warning on line 93 in src/components/layout/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / windows

'closeSettings' PropType is defined but prop is never used
setActive: (args: { serviceId: string }) => void;
reorder: (args: { oldIndex: number; newIndex: number }) => void;
reload: (args: { serviceId: string }) => void;
Expand Down Expand Up @@ -123,10 +123,6 @@
};
}

componentDidUpdate() {
ReactTooltip.rebuild();
}

enableToolTip() {
this.setState({ tooltipEnabled: true });
}
Expand Down Expand Up @@ -232,7 +228,8 @@
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 @@
});
}}
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 @@
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 @@
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 @@
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 @@
},
});
}}
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 @@
) : 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