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

chore: remove simplebar #4943

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 0 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
"react-virtualized": "^9.22.5",
"reactour": "^1.19.1",
"recharts": "^2.8.0",
"simplebar": "^5.3.9",
"simplebar-react": "^2.4.3",
"styled-components": "^5.3.11"
},
"devDependencies": {
Expand Down
4 changes: 0 additions & 4 deletions packages/components/src/SidePanel/SidePanel.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import classNames from 'classnames';
import { withTranslation } from 'react-i18next';

import 'simplebar';
import 'simplebar/dist/simplebar.css';

import I18N_DOMAIN_COMPONENTS from '../constants';
import '../translate';
import Action from '../Actions/Action';
Expand Down Expand Up @@ -149,7 +146,6 @@
{injected('before-actions')}
{actions && (
<div
data-simplebar
className={classNames(
theme['action-list-container'],
'tc-side-panel-action-list-container',
Expand Down Expand Up @@ -181,7 +177,7 @@
minimised: false,
};

if (process.env.NODE_ENV !== 'production') {

Check warning on line 180 in packages/components/src/SidePanel/SidePanel.component.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/components/src/SidePanel/SidePanel.component.js#L180

[no-undef] 'process' is not defined.
const actionPropType = PropTypes.shape({
id: PropTypes.string,
active: PropTypes.bool,
Expand Down
8 changes: 7 additions & 1 deletion packages/components/src/SidePanel/SidePanel.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ $large-docked-width: 7rem;
}

.action-list-container {
flex: 1;
height: calc(100vh - 12rem); // specific to Safari
overflow-y: auto;
overflow-x: hidden;

&::-webkit-scrollbar {
background-color: tokens.$coral-color-branding-navigation;
width: tokens.$coral-sizing-minimal;
}

:global .tc-side-panel-list {
background: transparent;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/SidePanel/SidePanel.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@

export const WithALargeAmountOfItems = () => (
<SidePanel
actions={[...items, ...other, ...other, ...other]}
actions={[...items, ...other, ...other, ...other, ...other]}
onSelect={action('onItemSelect')}
selected={items[1]}
tooltipPlacement="top"
Expand Down Expand Up @@ -192,7 +192,7 @@
/>
);

export const _WithLayout = () => {

Check warning on line 195 in packages/components/src/SidePanel/SidePanel.stories.js

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/components/src/SidePanel/SidePanel.stories.js#L195

[@typescript-eslint/naming-convention] Variable name `_WithLayout` must match one of the following formats: camelCase, PascalCase, UPPER_CASE
class WithLayout extends Component {
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ exports[`SidePanel should render 1`] = `
</div>
<div
class="theme-action-list-container tc-side-panel-action-list-container"
data-simplebar="true"
>
<ul
class="nav nav-pills nav-stacked theme-tc-action-list tc-action-list theme-tc-side-panel-list tc-side-panel-list"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ exports[`SidePanel should render 1`] = `
</div>
<div
class="theme-action-list-container tc-side-panel-action-list-container"
data-simplebar="true"
>
<ul
class="nav nav-pills nav-stacked theme-tc-action-list tc-action-list theme-tc-side-panel-list tc-side-panel-list"
Expand Down
34 changes: 2 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6841,11 +6841,6 @@ camelize@^1.0.0:
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.1.tgz#89b7e16884056331a35d6b5ad064332c91daa6c3"
integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==

can-use-dom@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/can-use-dom/-/can-use-dom-0.1.0.tgz#22cc4a34a0abc43950f42c6411024a3f6366b45a"
integrity sha512-ceOhN1DL7Y4O6M0j9ICgmTYziV89WMd96SvSl0REd8PMgrY0B/WBOPoed5S1KUmJqXgUXh8gzSe6E3ae27upsQ==

caniuse-api@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0"
Expand Down Expand Up @@ -7508,7 +7503,7 @@ core-js@^2.4.0:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==

core-js@^3.0.0, core-js@^3.0.1, core-js@^3.32.2:
core-js@^3.0.0, core-js@^3.32.2:
version "3.32.2"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.32.2.tgz#172fb5949ef468f93b4be7841af6ab1f21992db7"
integrity sha512-pxXSw1mYZPDGvTQqEc5vgIb83jGQKFGYWY76z4a7weZXUolw3G+OvpZqSRcfYOoOVUQJYEPsWeQK8pKEnUtWxQ==
Expand Down Expand Up @@ -12853,11 +12848,6 @@ lodash.startcase@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8"
integrity sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==

lodash.throttle@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==

lodash.topath@^4.5.2:
version "4.5.2"
resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009"
Expand Down Expand Up @@ -15109,7 +15099,7 @@ prop-types-extra@^1.0.1, prop-types-extra@^1.1.1:
react-is "^16.3.2"
warning "^4.0.0"

prop-types@15.7.2, prop-types@15.x, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
prop-types@15.7.2, prop-types@15.x, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
Expand Down Expand Up @@ -16834,26 +16824,6 @@ simple-update-notifier@^2.0.0:
dependencies:
semver "^7.5.3"

simplebar-react@^2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/simplebar-react/-/simplebar-react-2.4.3.tgz#79c830711c23a5ae457ef73420f5752d4a1b3133"
integrity sha512-Ep8gqAUZAS5IC2lT5RE4t1ZFUIVACqbrSRQvFV9a6NbVUzXzOMnc4P82Hl8Ak77AnPQvmgUwZS7aUKLyBoMAcg==
dependencies:
prop-types "^15.6.1"
simplebar "^5.3.9"

simplebar@^5.3.9:
version "5.3.9"
resolved "https://registry.yarnpkg.com/simplebar/-/simplebar-5.3.9.tgz#168ea0eb6d52f29f03960e40d9b69a1b28cf6318"
integrity sha512-1vIIpjDvY9sVH14e0LGeiCiTFU3ILqAghzO6OI9axeG+mvU/vMSrvXeAXkBolqFFz3XYaY8n5ahH9MeP3sp2Ag==
dependencies:
"@juggle/resize-observer" "^3.3.1"
can-use-dom "^0.1.0"
core-js "^3.0.1"
lodash.debounce "^4.0.8"
lodash.memoize "^4.1.2"
lodash.throttle "^4.1.1"

sinon@^11.1.2:
version "11.1.2"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-11.1.2.tgz#9e78850c747241d5c59d1614d8f9cbe8840e8674"
Expand Down
Loading