diff --git a/client/app/assets/less/ant.less b/client/app/assets/less/ant.less index 6f5a924494..37c1dd1224 100644 --- a/client/app/assets/less/ant.less +++ b/client/app/assets/less/ant.less @@ -374,4 +374,16 @@ line-height: 20px; margin-top: 9px; } +} + +.@{menu-prefix-cls} { + // invert stripe position with class .invert-stripe-position + &-inline.invert-stripe-position { + .@{menu-prefix-cls}-item { + &::after { + right: auto; + left: 0; + } + } + } } \ No newline at end of file diff --git a/client/app/assets/less/inc/list-group.less b/client/app/assets/less/inc/list-group.less index ce32187ed6..f451c8be7e 100755 --- a/client/app/assets/less/inc/list-group.less +++ b/client/app/assets/less/inc/list-group.less @@ -17,31 +17,6 @@ } } -tags-list { - a { - line-height: 1.1; - } -} - -.tags-list__name { - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; - width: 88%; - line-height: 1.3; -} - -.tags-list { - .badge-light { - background: fade(@redash-gray, 10%); - color: fade(@redash-gray, 75%); - } - - a:hover { - cursor: pointer; - } -} - .max-character { .text-overflow(); } diff --git a/client/app/components/TagsList.jsx b/client/app/components/TagsList.jsx index e2f63a4f50..8367fbf642 100644 --- a/client/app/components/TagsList.jsx +++ b/client/app/components/TagsList.jsx @@ -2,9 +2,12 @@ import { map } from 'lodash'; import React from 'react'; import PropTypes from 'prop-types'; import { react2angular } from 'react2angular'; -import classNames from 'classnames'; +import Badge from 'antd/lib/badge'; +import Menu from 'antd/lib/menu'; import getTags from '@/services/getTags'; +import './TagsList.less'; + export class TagsList extends React.Component { static propTypes = { tagsUrl: PropTypes.string.isRequired, @@ -59,17 +62,17 @@ export class TagsList extends React.Component { const { allTags, selectedTags } = this.state; if (allTags.length > 0) { return ( -
- {map(allTags, tag => ( - this.toggleTag(event, tag.name)} - > - {tag.count} - {tag.name} - - ))} +
+ + {map(allTags, tag => ( + + this.toggleTag(event, tag.name)}> + {tag.name} + + + + ))} +
); } diff --git a/client/app/components/TagsList.less b/client/app/components/TagsList.less new file mode 100644 index 0000000000..3a997a2c03 --- /dev/null +++ b/client/app/components/TagsList.less @@ -0,0 +1,15 @@ +@import '~@/assets/less/ant'; + +.tags-list { + .ant-badge-count { + background-color: fade(@redash-gray, 10%); + color: fade(@redash-gray, 75%); + } + + .ant-menu-item-selected { + .ant-badge-count { + background-color: @primary-color; + color: white; + } + } +} \ No newline at end of file diff --git a/client/app/components/items-list/components/Sidebar.jsx b/client/app/components/items-list/components/Sidebar.jsx index c850c28adb..66c3017641 100644 --- a/client/app/components/items-list/components/Sidebar.jsx +++ b/client/app/components/items-list/components/Sidebar.jsx @@ -1,8 +1,8 @@ import { isFunction, isString, filter, map } from 'lodash'; import React from 'react'; import PropTypes from 'prop-types'; -import classNames from 'classnames'; import Input from 'antd/lib/input'; +import AntdMenu from 'antd/lib/menu'; import Select from 'antd/lib/select'; import { TagsList } from '@/components/TagsList'; @@ -50,21 +50,21 @@ export function Menu({ items, selected }) { return null; } return ( -
- {map(items, item => ( - - { - isString(item.icon) && (item.icon !== '') && -