@@ -349,12 +337,8 @@ class MainSideNav extends React.Component {
}
- {isSidePanelFolded ?

: (
- <>
-

-
{gettext('Fold the sidebar')}
- >
- )}
+

+
{gettext('Fold the sidebar')}
diff --git a/frontend/src/components/side-nav-icon-tip.js b/frontend/src/components/side-nav-icon-tip.js
new file mode 100644
index 0000000000..bb82d155d9
--- /dev/null
+++ b/frontend/src/components/side-nav-icon-tip.js
@@ -0,0 +1,43 @@
+import React, { useCallback, useState } from 'react';
+import PropTypes from 'prop-types';
+import { Tooltip } from 'reactstrap';
+import '../css/side-nav-icon-tip.css';
+
+function SideNavIconTip(props) {
+
+ const [showTooltip, setShowTooltip] = useState(false);
+ const [showAnimation, setShowAnimation] = useState(false);
+
+ const toggleTooltip = useCallback(() => {
+ if (!showTooltip) {
+ setShowTooltip(true);
+ setTimeout(() => {
+ setShowAnimation(true);
+ }, 10);
+ } else {
+ setShowTooltip(false);
+ setShowAnimation(false);
+ }
+ }, [showTooltip]);
+
+ return (
+
+ {props.text}
+
+ );
+}
+
+SideNavIconTip.propTypes = {
+ text: PropTypes.string.isRequired,
+ target: PropTypes.string.isRequired,
+};
+
+export default SideNavIconTip;
diff --git a/frontend/src/components/side-panel.js b/frontend/src/components/side-panel.js
index d1b0a5e596..faec87c119 100644
--- a/frontend/src/components/side-panel.js
+++ b/frontend/src/components/side-panel.js
@@ -4,6 +4,7 @@ import classnames from 'classnames';
import MediaQuery from 'react-responsive';
import Logo from './logo';
import MainSideNav from './main-side-nav';
+import MainSideNavFolded from './main-side-nav-folded';
import { SIDE_PANEL_FOLDED_WIDTH } from '../constants';
const propTypes = {
@@ -32,14 +33,22 @@ class SidePanel extends React.Component {
- {children ? children : (
+ {children ? children : null}
+ {(!children && !isSidePanelFolded) &&
- )}
+ }
+ {(!children && isSidePanelFolded) &&
+
+ }
);
diff --git a/frontend/src/components/header.css b/frontend/src/css/header.css
similarity index 100%
rename from frontend/src/components/header.css
rename to frontend/src/css/header.css
diff --git a/frontend/src/css/main-side-nav-folded.css b/frontend/src/css/main-side-nav-folded.css
new file mode 100644
index 0000000000..c54ba2f397
--- /dev/null
+++ b/frontend/src/css/main-side-nav-folded.css
@@ -0,0 +1,11 @@
+.side-panel .side-nav-folded {
+ overflow: visible;
+}
+
+.side-panel .side-nav-folded .side-nav-con {
+ overflow: visible;
+}
+
+.side-panel .side-nav-folded .nav-item .nav-link:hover {
+ transition: all 250ms cubic-bezier(0.25, 0.1, 0.25, 0.1);
+}
diff --git a/frontend/src/css/side-nav-icon-tip.css b/frontend/src/css/side-nav-icon-tip.css
new file mode 100644
index 0000000000..8fad4fb478
--- /dev/null
+++ b/frontend/src/css/side-nav-icon-tip.css
@@ -0,0 +1,10 @@
+.side-nav-icon-tip {
+ opacity: 0;
+ transform: translateX(0px);
+ transition: all 250ms cubic-bezier(0.25, 0.1, 0.25, 0.1);
+}
+
+.side-nav-icon-tip.side-nav-icon-tip-animation {
+ opacity: 1;
+ transform: translateX(20px);
+}
diff --git a/frontend/src/utils/repo-trash-api.js b/frontend/src/utils/repo-trash-api.js
index 6635fc2022..d29f1fc286 100644
--- a/frontend/src/utils/repo-trash-api.js
+++ b/frontend/src/utils/repo-trash-api.js
@@ -40,7 +40,7 @@ class RepotrashAPI {
page: page || 1,
per_page: per_page
};
- return this.req.get(url, {params: params});
+ return this.req.get(url, { params: params });
}
}