Feat/hide board fields (#1271)

* Renamed AuthAutoRouter

* Moved RecoilScope

* Refactored old WithTopBarContainer to make it less transclusive

* Created new add opportunity button and refactored DropdownButton

* Added tests

* Deactivated new eslint rule

* Refactored Table options with new dropdown

* Started BoardDropdown

* Fix lint

* Refactor dropdown openstate

* Fix according to PR

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Lucas Bordeau
2023-08-24 13:19:42 +02:00
committed by GitHub
parent 64cef963bc
commit 252f1c655e
48 changed files with 860 additions and 580 deletions

View File

@ -12,7 +12,9 @@ import { useSnackBar } from '@/ui/snack-bar/hooks/useSnackBar';
export function PipelineAddButton() {
const { enqueueSnackBar } = useSnackBar();
const { closeDropdownButton } = useDropdownButton();
const { closeDropdownButton, toggleDropdownButton } = useDropdownButton({
key: 'add-company-progress',
});
const createCompanyProgress = useCreateCompanyProgress();
@ -51,6 +53,7 @@ export function PipelineAddButton() {
return (
<DropdownButton
dropdownKey="add-pipeline-progress"
buttonComponents={
<IconButton
icon={<IconPlus size={16} />}
@ -58,6 +61,7 @@ export function PipelineAddButton() {
data-testid="add-company-progress-button"
textColor={'secondary'}
variant="border"
onClick={toggleDropdownButton}
/>
}
dropdownComponents={
@ -71,7 +75,7 @@ export function PipelineAddButton() {
key: 'c',
scope: PageHotkeyScope.OpportunitiesPage,
}}
dropdownScopeToSet={{
dropdownHotkeyScope={{
scope: RelationPickerHotkeyScope.RelationPicker,
}}
/>