feat(dashboard): Let users re-arrange native filters (#16154)

* feat. flag: ON

* refactor filter tabs

* WIP

* Drag and Rearrange, styling

* refactoring dnd code

* Add apache license header

* Fix bug reported during PR review

* Minor fix on remove

* turn off filters

* Fix status

* Fix a test

* Address PR comments

* iSort fixes

* Add type key to the new filters

* Fix wrong attribute

* indent

* PR comments

* PR comments

* Fix failing tests

* Styling

* Fix remove filter

* Fix the drag issue

* Save works

* fix

* Write tests

* Style changes

* New Icon

* Grab & Grabbing Cursor

* Commented out code

* Fix tests, fix CI

* Fix failing tests

* Fix test

* Style fixes

* portal nodes dependency

* More style fixes

* PR comments

* add unique ids to collapse panels

* Filter removal bug fixed

* PR comments

* Fix test warnings

* delete filter tabs

* Fix the breaking test

* Fix warnings

* Fix the weird bug on cancel

* refactor

* Fix broken scope
This commit is contained in:
Ajay M
2021-10-15 19:56:33 -04:00
committed by GitHub
parent 4a9107d7f1
commit 9e6d5fc775
20 changed files with 1085 additions and 395 deletions

View File

@@ -16,14 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import { styledMount as mount } from 'spec/helpers/theming';
import { act } from 'react-dom/test-utils';
import { ReactWrapper } from 'enzyme';
import React from 'react';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { act } from 'react-dom/test-utils';
import { Provider } from 'react-redux';
import Alert from 'src/components/Alert';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import { mockStore } from 'spec/fixtures/mockStore';
import { styledMount as mount } from 'spec/helpers/theming';
import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
import Alert from 'src/components/Alert';
import { FiltersConfigModal } from 'src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal';
Object.defineProperty(window, 'matchMedia', {
@@ -66,7 +68,9 @@ describe('FiltersConfigModal', () => {
function setup(overridesProps?: any) {
return mount(
<Provider store={mockStore}>
<FiltersConfigModal {...mockedProps} {...overridesProps} />
<DndProvider backend={HTML5Backend}>
<FiltersConfigModal {...mockedProps} {...overridesProps} />
</DndProvider>
</Provider>,
);
}