diff --git a/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx b/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx index 36eedac77..5f60e71a8 100644 --- a/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx +++ b/mattermost-plugin/webapp/src/components/rhsChannelBoardItem.tsx @@ -19,7 +19,6 @@ import {Permission} from '../../../../webapp/src/constants' import './rhsChannelBoardItem.scss' import BoardPermissionGate from '../../../../webapp/src/components/permissions/boardPermissionGate' -import {MenuText} from '../../../../webapp/src/widgets/menu/menu' const windowAny = (window as SuiteWindow) @@ -67,7 +66,7 @@ const RHSChannelBoardItem = (props: Props) => { teamId={team.id} permissions={[Permission.ManageBoardRoles]} > - { permissions={[Permission.ManageBoardRoles]} invert={true} > - { } return ( - void @@ -110,13 +109,13 @@ const BoardsSwitcher = (props: Props): JSX.Element => { icon={} /> - } onClick={props.onBoardTemplateSelectorOpen} name='Create new board' /> - { return ( - } id='delete' name={intl.formatMessage({id: 'CardActionsMenu.delete', defaultMessage: 'Delete'})} onClick={handleDeleteCard} /> {props.onClickDuplicate && - } id='duplicate' name={intl.formatMessage({id: 'CardActionsMenu.duplicate', defaultMessage: 'Duplicate'})} @@ -62,7 +61,7 @@ export const CardActionsMenu = (props: Props): JSX.Element => { />} {me?.id !== 'single-user' && - } id='copy' name={intl.formatMessage({id: 'CardActionsMenu.copyLink', defaultMessage: 'Copy link'})} diff --git a/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx b/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx index 46e32145c..ed1bc1690 100644 --- a/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx +++ b/webapp/src/components/cardDetail/cardDetailContentsMenu.tsx @@ -7,7 +7,6 @@ import {BlockTypes} from '../../blocks/block' import {Utils} from '../../utils' import Button from '../../widgets/buttons/button' import Menu from '../../widgets/menu' -import {MenuText} from '../../widgets/menu/menu' import MenuWrapper from '../../widgets/menuWrapper' import {contentRegistry} from '../content/contentRegistry' @@ -28,7 +27,7 @@ function addContentMenu(intl: IntlShape, type: BlockTypes): JSX.Element { }, [cardDetail, handler]) return ( - = (props: Props) => { }/> - } id='delete' name={intl.formatMessage({id: 'Comment.delete', defaultMessage: 'Delete'})} diff --git a/webapp/src/components/cardDialog.tsx b/webapp/src/components/cardDialog.tsx index 09c0ccf44..6e15c5310 100644 --- a/webapp/src/components/cardDialog.tsx +++ b/webapp/src/components/cardDialog.tsx @@ -16,6 +16,7 @@ import {getCardAttachments, updateAttachments, updateUploadPrecent} from '../sto import TelemetryClient, {TelemetryActions, TelemetryCategory} from '../telemetry/telemetryClient' import {Utils} from '../utils' import CompassIcon from '../widgets/icons/compassIcon' +import Menu from '../widgets/menu' import {sendFlashMessage} from '../components/flashMessages' import ConfirmationDialogBox, {ConfirmationDialogBoxProps} from '../components/confirmationDialogBox' @@ -31,8 +32,6 @@ import {Permission} from '../constants' import {Block, createBlock} from '../blocks/block' import {AttachmentBlock, createAttachmentBlock} from '../blocks/attachmentBlock' -import {MenuText} from '../widgets/menu/menu' - import BoardPermissionGate from './permissions/boardPermissionGate' import CardDetail from './cardDetail/cardDetail' @@ -126,7 +125,7 @@ const CardDialog = (props: Props): JSX.Element => { > {!isTemplate && - void @@ -172,7 +171,7 @@ const AttachmentElement = (props: Props): JSX.Element|null => { />
- { }/> {index > 0 && - } @@ -87,7 +86,7 @@ const ContentBlock = (props: Props): JSX.Element => { }} />} {index < (contentOrder.length - 1) && - } @@ -96,7 +95,7 @@ const ContentBlock = (props: Props): JSX.Element => { mutator.changeCardContentOrder(props.card.boardId, card.id, card.fields.contentOrder, contentOrder) }} />} - } @@ -110,8 +109,8 @@ const ContentBlock = (props: Props): JSX.Element => { cords={cords} /> ))} - - + } id='delete' name={intl.formatMessage({id: 'ContentBlock.Delete', defaultMessage: 'Delete'})} diff --git a/webapp/src/components/dialog.test.tsx b/webapp/src/components/dialog.test.tsx index 6a682ecf6..264bf1572 100644 --- a/webapp/src/components/dialog.test.tsx +++ b/webapp/src/components/dialog.test.tsx @@ -14,8 +14,6 @@ import Menu from '../widgets/menu' import OptionsIcon from '../widgets/icons/options' -import {MenuText} from '../widgets/menu/menu' - import Dialog from './dialog' describe('components/dialog', () => { @@ -50,7 +48,7 @@ describe('components/dialog', () => { onClose={onCloseMethod} > - } name='Test' @@ -72,7 +70,7 @@ describe('components/dialog', () => { - } name='Test' @@ -96,7 +94,7 @@ describe('components/dialog', () => { - } name='Test' diff --git a/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx b/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx index 7cb326c95..7d0692c04 100644 --- a/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx +++ b/webapp/src/components/globalHeader/globalHeaderSettingsMenu.tsx @@ -21,7 +21,6 @@ import {Constants} from '../../constants' import TelemetryClient, {TelemetryCategory, TelemetryActions} from '../../telemetry/telemetryClient' import './globalHeaderSettingsMenu.scss' -import {MenuSubMenu, MenuText, MenuSwitch} from '../../widgets/menu/menu' type Props = { history: History @@ -46,12 +45,12 @@ const GlobalHeaderSettingsMenu = (props: Props) => {
- - { @@ -61,7 +60,7 @@ const GlobalHeaderSettingsMenu = (props: Props) => { /> { Constants.imports.map((i) => ( - { /> )) } - - + { Constants.languages.map((language) => ( - { /> )) } - - + { suppressItemClicked={true} /> {me?.is_guest !== true && - { {props.iconElement} - } name={intl.formatMessage({id: 'ViewTitle.random-icon', defaultMessage: 'Random'})} onClick={props.onAddRandomIcon} /> - } name={intl.formatMessage({id: 'ViewTitle.pick-icon', defaultMessage: 'Pick icon'})} > - - + } name={intl.formatMessage({id: 'ViewTitle.remove-icon', defaultMessage: 'Remove icon'})} diff --git a/webapp/src/components/kanban/kanbanColumnHeader.tsx b/webapp/src/components/kanban/kanbanColumnHeader.tsx index 7fbaac232..a7d930592 100644 --- a/webapp/src/components/kanban/kanbanColumnHeader.tsx +++ b/webapp/src/components/kanban/kanbanColumnHeader.tsx @@ -23,8 +23,6 @@ import {useHasCurrentBoardPermissions} from '../../hooks/permissions' import BoardPermissionGate from '../permissions/boardPermissionGate' -import {MenuText, MenuSeparator, MenuColor} from '../../widgets/menu/menu' - import {KanbanCalculation} from './calculation/calculation' type Props = { @@ -166,7 +164,7 @@ export default function KanbanColumnHeader(props: Props): JSX.Element { }/> - } name={intl.formatMessage({id: 'BoardComponent.hide', defaultMessage: 'Hide'})} @@ -174,15 +172,15 @@ export default function KanbanColumnHeader(props: Props): JSX.Element { /> {canEditOption && <> - } name={intl.formatMessage({id: 'BoardComponent.delete', defaultMessage: 'Delete'})} onClick={() => mutator.deletePropertyOption(board.id, board.cardProperties, groupByProperty!, group.option)} /> - + {Object.entries(Constants.menuColors).map(([key, color]) => ( - - } name={intl.formatMessage({id: 'BoardComponent.show', defaultMessage: 'Show'})} diff --git a/webapp/src/components/shareBoard/channelPermissionsRow.tsx b/webapp/src/components/shareBoard/channelPermissionsRow.tsx index 0c5fc50a7..1b29915b8 100644 --- a/webapp/src/components/shareBoard/channelPermissionsRow.tsx +++ b/webapp/src/components/shareBoard/channelPermissionsRow.tsx @@ -24,7 +24,6 @@ import CompassIcon from '../../widgets/icons/compassIcon' import ConfirmationDialogBox from '../confirmationDialogBox' import BoardPermissionGate from '../permissions/boardPermissionGate' -import {MenuText} from '../../widgets/menu/menu' type Props = { teammateNameDisplay?: string @@ -130,7 +129,7 @@ const ChannelPermissionsRow = (props: Props): JSX.Element => { /> - } name={intl.formatMessage({id: 'BoardMember.unlinkChannel', defaultMessage: 'Unlink'})} diff --git a/webapp/src/components/shareBoard/teamPermissionsRow.tsx b/webapp/src/components/shareBoard/teamPermissionsRow.tsx index 020bb1d6e..2650e7790 100644 --- a/webapp/src/components/shareBoard/teamPermissionsRow.tsx +++ b/webapp/src/components/shareBoard/teamPermissionsRow.tsx @@ -21,7 +21,6 @@ import BoardPermissionGate from '../permissions/boardPermissionGate' import ConfirmationDialogBox from '../confirmationDialogBox' import mutator from '../../mutator' -import {MenuText} from '../../widgets/menu/menu' async function updateBoardType(board: Board, newType: string, newMinimumRole: MemberRole) { if (board.type === newType && board.minimumRole === newMinimumRole) { @@ -111,7 +110,7 @@ const TeamPermissionsRow = (): JSX.Element => { {!board.isTemplate && - :
} @@ -119,21 +118,21 @@ const TeamPermissionsRow = (): JSX.Element => { onClick={() => setChangeRoleConfirmation(MemberRole.Editor)} />} {!board.isTemplate && - :
} name={intl.formatMessage({id: 'BoardMember.schemeCommenter', defaultMessage: 'Commenter'})} onClick={() => setChangeRoleConfirmation(MemberRole.Commenter)} />} - :
} name={intl.formatMessage({id: 'BoardMember.schemeViewer', defaultMessage: 'Viewer'})} onClick={() => updateBoardType(board, BoardTypeOpen, MemberRole.Viewer)} /> - :
} diff --git a/webapp/src/components/shareBoard/userPermissionsRow.tsx b/webapp/src/components/shareBoard/userPermissionsRow.tsx index 299824a8f..cf4bd5785 100644 --- a/webapp/src/components/shareBoard/userPermissionsRow.tsx +++ b/webapp/src/components/shareBoard/userPermissionsRow.tsx @@ -19,7 +19,6 @@ import {useAppSelector} from '../../store/hooks' import {getCurrentBoard} from '../../store/boards' import BoardPermissionGate from '../permissions/boardPermissionGate' -import {MenuText, MenuSeparator} from '../../widgets/menu/menu' type Props = { user: IUser @@ -83,7 +82,7 @@ const UserPermissionsRow = (props: Props): JSX.Element => { parentRef={menuWrapperRef} > {(board.minimumRole === MemberRole.Viewer || board.minimumRole === MemberRole.None) && - :
} @@ -91,14 +90,14 @@ const UserPermissionsRow = (props: Props): JSX.Element => { onClick={() => props.onUpdateBoardMember(member, MemberRole.Viewer)} />} {!board.isTemplate && (board.minimumRole === MemberRole.None || board.minimumRole === MemberRole.Commenter || board.minimumRole === MemberRole.Viewer) && - :
} name={intl.formatMessage({id: 'BoardMember.schemeCommenter', defaultMessage: 'Commenter'})} onClick={() => props.onUpdateBoardMember(member, MemberRole.Commenter)} />} - :
} @@ -106,15 +105,15 @@ const UserPermissionsRow = (props: Props): JSX.Element => { onClick={() => props.onUpdateBoardMember(member, MemberRole.Editor)} /> {user.is_guest !== true && - :
} name={intl.formatMessage({id: 'BoardMember.schemeAdmin', defaultMessage: 'Admin'})} onClick={() => props.onUpdateBoardMember(member, MemberRole.Admin)} />} - - + props.onDeleteBoardMember(member)} diff --git a/webapp/src/components/sidebar/sidebarBoardItem.tsx b/webapp/src/components/sidebar/sidebarBoardItem.tsx index d7c48b16c..c1d94b87d 100644 --- a/webapp/src/components/sidebar/sidebarBoardItem.tsx +++ b/webapp/src/components/sidebar/sidebarBoardItem.tsx @@ -40,7 +40,6 @@ import octoClient from '../../octoClient' import {getCurrentBoardId} from '../../store/boards' import {UserSettings} from '../../userSettings' import {Archiver} from '../../archiver' -import {MenuText, MenuSubMenu} from '../../widgets/menu/menu' const iconForViewType = (viewType: IViewType): JSX.Element => { switch (viewType) { @@ -83,7 +82,7 @@ const SidebarBoardItem = (props: Props) => { const generateMoveToCategoryOptions = (boardID: string) => { return props.allCategories.map((category) => ( - { position='auto' parentRef={boardItemRef} > - { position='auto' > {generateMoveToCategoryOptions(board.id)} - + {!me?.is_guest && - } onClick={() => handleDuplicateBoard(board.isTemplate)} />} {!me?.is_guest && - } onClick={() => handleDuplicateBoard(true)} />} - } onClick={() => Archiver.exportBoardArchive(board)} /> - } @@ -278,7 +277,7 @@ const SidebarBoardItem = (props: Props) => { boardId={board.id} permissions={[Permission.DeleteBoard]} > - { { props.categoryBoards.type === 'custom' && - } onClick={handleUpdateCategory} /> - } onClick={() => setShowDeleteCategoryDialog(true)} /> - + } - } diff --git a/webapp/src/components/sidebar/sidebarSettingsMenu.tsx b/webapp/src/components/sidebar/sidebarSettingsMenu.tsx index dab1741c2..2f8706e3a 100644 --- a/webapp/src/components/sidebar/sidebarSettingsMenu.tsx +++ b/webapp/src/components/sidebar/sidebarSettingsMenu.tsx @@ -26,7 +26,6 @@ import CheckIcon from '../../widgets/icons/check' import {Constants} from '../../constants' import TelemetryClient, {TelemetryCategory, TelemetryActions} from '../../telemetry/telemetryClient' -import {MenuSubMenu, MenuText, MenuSwitch} from '../../widgets/menu/menu' type Props = { activeTheme: string @@ -86,12 +85,12 @@ const SidebarSettingsMenu = (props: Props) => { />
- - { @@ -101,7 +100,7 @@ const SidebarSettingsMenu = (props: Props) => { /> { Constants.imports.map((i) => ( - { /> )) } - - + { @@ -123,14 +122,14 @@ const SidebarSettingsMenu = (props: Props) => { } }} /> - { Constants.languages.map((language) => ( - { /> )) } - - + { { themes.map((theme) => ( - { ), ) } - - + {
{user && user.username !== 'single-user' && <> - {user.username} - {user.username} + { @@ -67,14 +65,14 @@ const SidebarUserMenu = () => { history.push('/login') }} /> - { history.push('/change_password') }} /> - { @@ -82,10 +80,10 @@ const SidebarUserMenu = () => { }} /> - + } - { diff --git a/webapp/src/components/standardProperties/statusProperty/editStatusDialog.test.tsx b/webapp/src/components/standardProperties/statusProperty/editStatusDialog.test.tsx index 17080f267..d4268f357 100644 --- a/webapp/src/components/standardProperties/statusProperty/editStatusDialog.test.tsx +++ b/webapp/src/components/standardProperties/statusProperty/editStatusDialog.test.tsx @@ -82,175 +82,4 @@ describe('components/standardProperties/statusProperty/EditStatusPropertyDialog' const {container} = render(component) expect(container).toMatchSnapshot() }) - - test('no value in any column', () => { - const noValueConfig: StatusCategory[] = [ - { - id: 'category_id_1', - title: 'Not Started', - options: [], - emptyState: { - icon: (), - color: '--sys-dnd-indicator-rgb', - text: { - id: 'statusProperty.configDialog.todo.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses “Not Started”', - }, - }, - }, - { - id: 'category_id_2', - title: 'In progress', - options: [], - emptyState: { - icon: (), - color: '--away-indicator-rgb', - text: { - id: 'statusProperty.configDialog.inProgress.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses “in progress”', - }, - }, - }, - { - id: 'category_id_3', - title: 'Completed', - options: [], - emptyState: { - icon: (), - color: '--online-indicator-rgb', - text: { - id: 'statusProperty.configDialog.complete.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses ”Done”', - }, - }, - }, - ] - - const component = wrapRBDNDContext( - wrapIntl( - {}} - onUpdate={() => {}} - />, - )) - - const {container} = render(component) - expect(container).toMatchSnapshot() - }) - - test('5 columns', () => { - const initialValueCategoryValue: StatusCategory[] = [ - { - id: 'category_id_1', - title: 'Column 1', - options: [ - {id: 'status_id_1', value: 'Pending Design', color: 'propColorPurple'}, - {id: 'status_id_2', value: 'TODO', color: 'propColorYellow'}, - {id: 'status_id_3', value: 'Pending Specs', color: 'propColorGray'}, - ], - emptyState: { - icon: (), - color: '--sys-dnd-indicator-rgb', - text: { - id: 'statusProperty.configDialog.todo.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses “Not Started”', - }, - }, - }, - { - id: 'category_id_2', - title: 'Column 2', - options: [ - {id: 'status_id_4', value: 'In Progress', color: 'propColorBrown'}, - {id: 'status_id_5', value: 'In Review', color: 'propColorRed'}, - {id: 'status_id_6', value: 'In QA', color: 'propColorPink'}, - {id: 'status_id_7', value: 'Awaiting Cherrypick', color: 'propColorOrange'}, - ], - emptyState: { - icon: (), - color: '--away-indicator-rgb', - text: { - id: 'statusProperty.configDialog.inProgress.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses “in progress”', - }, - }, - }, - { - id: 'category_id_3', - title: 'Column 3', - options: [ - {id: 'status_id_20', value: 'Done', color: 'propColorPink'}, - {id: 'status_id_21', value: 'Branch Cut', color: 'propColorGreen'}, - {id: 'status_id_22', value: 'Released', color: 'propColorDefault'}, - ], - emptyState: { - icon: (), - color: '--online-indicator-rgb', - text: { - id: 'statusProperty.configDialog.complete.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses ”Done”', - }, - }, - }, - { - id: 'category_id_2', - title: 'Column 4', - options: [ - {id: 'status_id_54', value: 'Michael Scott', color: 'propColorOrange'}, - ], - emptyState: { - icon: (), - color: '--away-indicator-rgb', - text: { - id: 'statusProperty.configDialog.inProgress.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses “in progress”', - }, - }, - }, - { - id: 'category_id_3', - title: 'Column 5', - options: [ - {id: 'status_id_22', value: 'Jim Halpert', color: 'propColorDefault'}, - ], - emptyState: { - icon: (), - color: '--online-indicator-rgb', - text: { - id: 'statusProperty.configDialog.complete.emptyText', - defaultMessage: 'Drag statuses here to consider tasks with these statuses ”Done”', - }, - }, - }, - ] - - const component = wrapRBDNDContext( - wrapIntl( - {}} - onUpdate={() => {}} - />, - )) - - const {container} = render(component) - expect(container).toMatchSnapshot() - }) - - test('0 columns', () => { - const initialValueCategoryValue: StatusCategory[] = [] - - const component = wrapRBDNDContext( - wrapIntl( - {}} - onUpdate={() => {}} - />, - )) - - const {container} = render(component) - expect(container).toMatchSnapshot() - }) }) diff --git a/webapp/src/components/standardProperties/statusProperty/valueRow.tsx b/webapp/src/components/standardProperties/statusProperty/valueRow.tsx index b7f5b5346..8dfd62df7 100644 --- a/webapp/src/components/standardProperties/statusProperty/valueRow.tsx +++ b/webapp/src/components/standardProperties/statusProperty/valueRow.tsx @@ -10,7 +10,7 @@ import {Constants} from '../../../constants' import DragHandle from '../../../widgets/icons/dragHandle' import EditIcon from '../../../widgets/icons/edit' -import Menu, {MenuColor, MenuText} from '../../../widgets/menu/menu' +import Menu from '../../../widgets/menu/menu' import MenuWrapper from '../../../widgets/menuWrapper' import {IPropertyOption} from '../../../blocks/board' @@ -98,7 +98,7 @@ const ValueRow = (props: Props) => { { Object.entries(Constants.menuColors).map( ([key, color]: [string, string]) => ( - { menuMargin={30} fixed={true} > - } onClick={handleEditButtonClick} /> - } diff --git a/webapp/src/components/table/tableGroupHeaderRow.tsx b/webapp/src/components/table/tableGroupHeaderRow.tsx index 2ee7d6067..7d46d87ab 100644 --- a/webapp/src/components/table/tableGroupHeaderRow.tsx +++ b/webapp/src/components/table/tableGroupHeaderRow.tsx @@ -21,8 +21,6 @@ import MenuWrapper from '../../widgets/menuWrapper' import Editable from '../../widgets/editable' import Label from '../../widgets/label' -import {MenuText, MenuSeparator, MenuColor} from '../../widgets/menu/menu' - import {useColumnResize} from './tableColumnResizeContext' type Props = { @@ -124,7 +122,7 @@ const TableGroupHeaderRow = (props: Props): JSX.Element => { }/> - } name={intl.formatMessage({id: 'BoardComponent.hide', defaultMessage: 'Hide'})} @@ -132,15 +130,15 @@ const TableGroupHeaderRow = (props: Props): JSX.Element => { /> {canEditOption && <> - } name={intl.formatMessage({id: 'BoardComponent.delete', defaultMessage: 'Delete'})} onClick={() => mutator.deletePropertyOption(board.id, board.cardProperties, groupByProperty!, group.option)} /> - + {Object.entries(Constants.menuColors).map(([key, color]) => ( - = (props: Props): JSX.Element => { const intl = useIntl() return ( - mutator.changeViewSortOptions(board.id, activeView.id, activeView.fields.sortOptions, [{propertyId: templateId, reversed: false}])} /> - mutator.changeViewSortOptions(board.id, activeView.id, activeView.fields.sortOptions, [{propertyId: templateId, reversed: true}])} /> - { @@ -48,7 +47,7 @@ const TableHeaderMenu: FC = (props: Props): JSX.Element => { } }} /> - { @@ -63,17 +62,17 @@ const TableHeaderMenu: FC = (props: Props): JSX.Element => { /> {props.templateId !== Constants.titleColumnId && <> - mutator.changeViewVisibleProperties(board.id, activeView.id, activeView.fields.visiblePropertyIds, activeView.fields.visiblePropertyIds.filter((o: string) => o !== templateId))} /> - mutator.duplicatePropertyTemplate(board, activeView, templateId)} /> - mutator.deleteProperty(board, views, cards, templateId)} diff --git a/webapp/src/components/viewHeader/emptyCardButton.tsx b/webapp/src/components/viewHeader/emptyCardButton.tsx index 29dcd49d5..e0d46278b 100644 --- a/webapp/src/components/viewHeader/emptyCardButton.tsx +++ b/webapp/src/components/viewHeader/emptyCardButton.tsx @@ -16,7 +16,6 @@ import mutator from '../../mutator' import {useAppSelector} from '../../store/hooks' import {getCurrentView} from '../../store/views' import {getCurrentBoardId} from '../../store/boards' -import {MenuText} from '../../widgets/menu/menu' type Props = { addCard: () => void @@ -28,7 +27,7 @@ const EmptyCardButton = (props: Props) => { const intl = useIntl() return ( - } id='empty-template' name={intl.formatMessage({id: 'ViewHeader.empty-card', defaultMessage: 'Empty card'})} @@ -40,7 +39,7 @@ const EmptyCardButton = (props: Props) => { }/> - } id='default' name={intl.formatMessage({ diff --git a/webapp/src/components/viewHeader/filterEntry.tsx b/webapp/src/components/viewHeader/filterEntry.tsx index e2b0b66ed..dde60d6ad 100644 --- a/webapp/src/components/viewHeader/filterEntry.tsx +++ b/webapp/src/components/viewHeader/filterEntry.tsx @@ -14,7 +14,6 @@ import Button from '../../widgets/buttons/button' import Menu from '../../widgets/menu' import MenuWrapper from '../../widgets/menuWrapper' import propsRegistry from '../../properties' -import {MenuText} from '../../widgets/menu/menu' import FilterValue from './filterValue' @@ -47,7 +46,7 @@ const FilterEntry = (props: Props): JSX.Element => { - { }} /> {board.cardProperties.filter((o: IPropertyTemplate) => propsRegistry.get(o.type).canFilter).map((o: IPropertyTemplate) => ( - { {propertyType.filterValueType === 'options' && <> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} @@ -113,12 +112,12 @@ const FilterEntry = (props: Props): JSX.Element => { } {propertyType.filterValueType === 'person' && <> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} @@ -126,12 +125,12 @@ const FilterEntry = (props: Props): JSX.Element => { } {(propertyType.type === 'person' || propertyType.type === 'multiPerson') && <> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} @@ -139,12 +138,12 @@ const FilterEntry = (props: Props): JSX.Element => { } {propertyType.filterValueType === 'boolean' && <> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} @@ -152,37 +151,37 @@ const FilterEntry = (props: Props): JSX.Element => { } {propertyType.filterValueType === 'text' && <> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} @@ -190,17 +189,17 @@ const FilterEntry = (props: Props): JSX.Element => { } {propertyType.filterValueType === 'date' && <> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} @@ -208,12 +207,12 @@ const FilterEntry = (props: Props): JSX.Element => { } {propertyType.type === 'date' && <> - props.conditionClicked(id, filter)} /> - props.conditionClicked(id, filter)} diff --git a/webapp/src/components/viewHeader/filterValue.tsx b/webapp/src/components/viewHeader/filterValue.tsx index 23d5b4ca0..e68ba049c 100644 --- a/webapp/src/components/viewHeader/filterValue.tsx +++ b/webapp/src/components/viewHeader/filterValue.tsx @@ -16,8 +16,6 @@ import Menu from '../../widgets/menu' import Editable from '../../widgets/editable' import MenuWrapper from '../../widgets/menuWrapper' -import {MenuSwitch} from '../../widgets/menu/menu' - import DateFilter from './dateFilter' import './filterValue.scss' @@ -105,7 +103,7 @@ const filterValue = (props: Props): JSX.Element|null => { {template?.options.map((o) => ( - { > {cardTemplates.length > 0 && <> - + - + - + } {cardTemplates.map((cardTemplate) => { @@ -78,7 +76,7 @@ const NewCardButton = (props: Props): JSX.Element => { addCard={props.addCard} /> - } id='add-template' name={intl.formatMessage({id: 'ViewHeader.add-template', defaultMessage: 'New template'})} diff --git a/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx b/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx index ba1c3beda..8db13bf22 100644 --- a/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx +++ b/webapp/src/components/viewHeader/newCardButtonTemplateItem.tsx @@ -16,7 +16,6 @@ import CheckIcon from '../../widgets/icons/check' import {useAppSelector} from '../../store/hooks' import {getCurrentView} from '../../store/views' import {getCurrentBoardId} from '../../store/boards' -import {MenuText} from '../../widgets/menu/menu' type Props = { cardTemplate: Card @@ -33,7 +32,7 @@ const NewCardButtonTemplateItem = (props: Props) => { const boardId = useAppSelector(getCurrentBoardId) return ( - { }/> - } id='default' name={intl.formatMessage({id: 'ViewHeader.set-default-template', defaultMessage: 'Set as default'})} @@ -54,7 +53,7 @@ const NewCardButtonTemplateItem = (props: Props) => { await mutator.setDefaultTemplate(boardId, currentView.id, currentView.fields.defaultTemplateId, cardTemplate.id) }} /> - } id='edit' name={intl.formatMessage({id: 'ViewHeader.edit-template', defaultMessage: 'Edit'})} @@ -62,7 +61,7 @@ const NewCardButtonTemplateItem = (props: Props) => { props.editCardTemplate(cardTemplate.id) }} /> - } id='delete' name={intl.formatMessage({id: 'ViewHeader.delete-template', defaultMessage: 'Delete'})} diff --git a/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx b/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx index 843cce444..742dc691c 100644 --- a/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx +++ b/webapp/src/components/viewHeader/viewHeaderActionsMenu.tsx @@ -16,7 +16,6 @@ import {Utils} from '../../utils' import ModalWrapper from '../modalWrapper' import {sendFlashMessage} from '../flashMessages' -import {MenuText} from '../../widgets/menu/menu' type Props = { board: Board @@ -104,35 +103,35 @@ const ViewHeaderActionsMenu = (props: Props) => { }/> - onExportCsvTrigger(board, activeView, cards, intl)} /> - Archiver.exportBoardArchive(board)} /> {/* - + - testAddCards(board, activeView, cards.length, 100)} /> - testAddCards(board, activeView, cards.length, 1000)} /> - testDistributeCards()} /> - testRandomizeIcons()} diff --git a/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx b/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx index 5757d3ec7..3749b8b2d 100644 --- a/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx +++ b/webapp/src/components/viewHeader/viewHeaderDisplayByMenu.tsx @@ -15,7 +15,6 @@ import MenuWrapper from '../../widgets/menuWrapper' import CheckIcon from '../../widgets/icons/check' import propsRegistry from '../../properties' -import {MenuText} from '../../widgets/menu/menu' type Props = { properties: readonly IPropertyTemplate[] @@ -53,7 +52,7 @@ const ViewHeaderDisplayByMenu = (props: Props) => { {getDateProperties().length > 0 && getDateProperties().map((date: IPropertyTemplate) => ( - { /> ))} {getDateProperties().length === 0 && - { {activeView.fields.viewType === 'table' && activeView.fields.groupById && <> {emptyVisibleGroupsCount > 0 && - { onClick={() => handleToggleGroups(false)} />} {hiddenGroupsCount > 0 && -