diff --git a/frontend/src/Projects/Project/Board/FilterMeta.tsx b/frontend/src/Projects/Project/Board/ControlFilter.tsx similarity index 98% rename from frontend/src/Projects/Project/Board/FilterMeta.tsx rename to frontend/src/Projects/Project/Board/ControlFilter.tsx index ff99218..48e83d4 100644 --- a/frontend/src/Projects/Project/Board/FilterMeta.tsx +++ b/frontend/src/Projects/Project/Board/ControlFilter.tsx @@ -108,7 +108,7 @@ const ActionItemLine = styled.div` margin: 0.25rem !important; `; -type FilterMetaProps = { +type ControlFilterProps = { filters: TaskMetaFilters; userID: string; projectID: string; @@ -116,7 +116,13 @@ type FilterMetaProps = { onChangeTaskMetaFilter: (filters: TaskMetaFilters) => void; }; -const FilterMeta: React.FC = ({ filters, onChangeTaskMetaFilter, userID, projectID, members }) => { +const ControlFilter: React.FC = ({ + filters, + onChangeTaskMetaFilter, + userID, + projectID, + members, +}) => { const [currentFilters, setFilters] = useState(filters); const [nameFilter, setNameFilter] = useState(filters.taskName ? filters.taskName.name : ''); const [currentLabel, setCurrentLabel] = useState(''); @@ -323,4 +329,4 @@ const FilterMeta: React.FC = ({ filters, onChangeTaskMetaFilter ); }; -export default FilterMeta; +export default ControlFilter; diff --git a/frontend/src/Projects/Project/Board/SortPopup.tsx b/frontend/src/Projects/Project/Board/ControlSort.tsx similarity index 87% rename from frontend/src/Projects/Project/Board/SortPopup.tsx rename to frontend/src/Projects/Project/Board/ControlSort.tsx index eb587d7..047f1ae 100644 --- a/frontend/src/Projects/Project/Board/SortPopup.tsx +++ b/frontend/src/Projects/Project/Board/ControlSort.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import styled from 'styled-components'; import { TaskSorting, TaskSortingType, TaskSortingDirection } from 'shared/utils/sorting'; -import { mixin } from 'shared/utils/styles'; import { Checkmark } from 'shared/icons'; const ActiveIcon = styled(Checkmark)` @@ -34,21 +33,12 @@ export const ActionTitle = styled.span` margin-left: 20px; `; -const ActionItemSeparator = styled.li` - color: ${(props) => mixin.rgba(props.theme.colors.text.primary, 0.4)}; - font-size: 12px; - padding-left: 4px; - padding-right: 4px; - padding-top: 0.75rem; - padding-bottom: 0.25rem; -`; - -type SortPopupProps = { +type ControlSortProps = { sorting: TaskSorting; onChangeTaskSorting: (taskSorting: TaskSorting) => void; }; -const SortPopup: React.FC = ({ sorting, onChangeTaskSorting }) => { +const ControlSort: React.FC = ({ sorting, onChangeTaskSorting }) => { const [currentSorting, setSorting] = useState(sorting); const handleSetSorting = (s: TaskSorting) => { setSorting(s); @@ -94,4 +84,4 @@ const SortPopup: React.FC = ({ sorting, onChangeTaskSorting }) = ); }; -export default SortPopup; +export default ControlSort; diff --git a/frontend/src/Projects/Project/Board/FilterStatus.tsx b/frontend/src/Projects/Project/Board/ControlStatus.tsx similarity index 96% rename from frontend/src/Projects/Project/Board/FilterStatus.tsx rename to frontend/src/Projects/Project/Board/ControlStatus.tsx index 65fb673..b291629 100644 --- a/frontend/src/Projects/Project/Board/FilterStatus.tsx +++ b/frontend/src/Projects/Project/Board/ControlStatus.tsx @@ -85,12 +85,12 @@ const ActiveIcon = styled(Checkmark)` position: absolute; `; -type FilterStatusProps = { +type ControlStatusProps = { filter: TaskStatusFilter; onChangeTaskStatusFilter: (filter: TaskStatusFilter) => void; }; -const FilterStatus: React.FC = ({ filter, onChangeTaskStatusFilter }) => { +const ControlStatus: React.FC = ({ filter, onChangeTaskStatusFilter }) => { const [currentFilter, setFilter] = useState(filter); const handleFilterChange = (f: TaskStatusFilter) => { setFilter(f); @@ -146,4 +146,4 @@ const FilterStatus: React.FC = ({ filter, onChangeTaskStatusF ); }; -export default FilterStatus; +export default ControlStatus; diff --git a/frontend/src/Projects/Project/Board/index.tsx b/frontend/src/Projects/Project/Board/index.tsx index ddfd8f0..02360d1 100644 --- a/frontend/src/Projects/Project/Board/index.tsx +++ b/frontend/src/Projects/Project/Board/index.tsx @@ -49,9 +49,9 @@ import LabelManagerEditor from 'Projects/Project/LabelManagerEditor'; import Chip from 'shared/components/Chip'; import { toast } from 'react-toastify'; import { useCurrentUser } from 'App/context'; -import FilterStatus from './FilterStatus'; -import FilterMeta from './FilterMeta'; -import SortPopup from './SortPopup'; +import ControlStatus from './ControlStatus'; +import ControlFilter from './ControlFilter'; +import ControlSort from './ControlSort'; const FilterChip = styled(Chip)` margin-right: 4px; @@ -507,7 +507,7 @@ const ProjectBoard: React.FC = ({ projectID, onCardLabelClick showPopup( target, - { setTaskStatusFilter(filter); @@ -527,7 +527,7 @@ const ProjectBoard: React.FC = ({ projectID, onCardLabelClick showPopup( target, - { setTaskSorting(sorting); @@ -545,7 +545,7 @@ const ProjectBoard: React.FC = ({ projectID, onCardLabelClick onClick={(target) => { showPopup( target, - { setTaskMetaFilters(filter);