Commit Graph

146 Commits

Author SHA1 Message Date
Geido 474f1e2044
test: Add tests for Dashboard Header and HeaderActionsDropdown components (#13973)
* Add tests for HeaderActionsDropdown - WIP

* Fix trigger node

* Add types

* Clean up

* Add tests for Header

* Delete obsolete tests

* Add factory and clean up

* Add opposite case

* Fix file name

* Include latest changes
2021-04-14 06:54:24 -07:00
Michael S. Molina c8a794368d
refactor: Bootstrap to AntD - ListGroup (#13996)
* refactor: Bootstrap to AntD - ListGroup

* Improves theme handling on touched files
2021-04-13 15:26:02 -07:00
Amit Miran 9c5264af0d
feat(can_share): can share chart and dashboard (#14076)
* feat: share chart  - can_share_chart
share dashboard can_share_dashboard

* fix: pre-commit

* fix: userCanShare tests

* fix: after hugh CR

* fix: adjust after spa refactor
2021-04-13 13:54:14 +03:00
Michael S. Molina b394733ff3
test: Adds tests to the UndoRedoKeyListeners component (#13919) 2021-04-12 23:51:57 -07:00
Geido 11869dc076
test: Tests audit for the Dashboard FilterBar (#13916)
* Add FilterBar tests

* Finalize FilterBar tests

* Add tests for FilterBar Header

* Add tests for FilterBar FilterConfigurationLink

* Add tests for FilterBar FilterSets EditSection

* Add tests for FilterBar FilterSets

* Clean up

* Add tests for FilterBar FilterSetUnit

* Add tests for FilterBar FilterSets FiltersHeader

* Add tests for FilterBar FilterSets Footer

* Fix linting

* Fix import

* Fix minor changes

* Fix import

* Add factory and clean up
2021-04-12 23:28:19 -07:00
Michael S. Molina b5c95c537c
test: Adds tests to the CssEditor component (#13933) 2021-04-07 14:40:24 -07:00
simcha90 e06290663a
fix(colors): fix color schemes (#13945)
* fix: fix color schemes

* fix: tests case
2021-04-04 15:53:21 +03:00
Michael S. Molina a1442497d4
test: Fixes PropertiesModal_spec (#13548) 2021-04-01 11:42:14 -07:00
simcha90 aa92c1e7eb
refactor(native-filters): refactor filter bar (#13723)
* fix: fix removeing native filter

* fix: fix native-cross filters

* fix: fix native-cross filters

* fix: fix native-cross filters

* fix: fix function declaration

* refactor: before pull

* refactor: refactor filter bar

* chore: add lic

* lint: fix lint
2021-03-22 17:03:44 +02:00
Grace Guo fa072cd74e
fix: dashboard filter scope bug (#13695)
* fix: dashboard filter scope bug

* fix comments

* fix function/variables name
2021-03-19 10:39:09 -07:00
simcha90 0e0c99b2fb
feat(cross-filters): Add scoping for cross filters (#13625)
* feat: cross filter modal

* refactor: add charts metadata

* refactor: add charts metadata

* feat: cross filters scoping

* fix: fix CR notes

* test: fix test

* lint: fix lint
2021-03-17 14:00:32 +02:00
simcha90 3970d7316b
feat(native-filters): Update filter bar buttons (#13506)
* refactor(native-filters): move data mask to root reducer

* refactor: update rest stuff for dataMask

* refactor: add ownCrrentState to explore

* fix: fix immer reducer

* fix: merge with master

* refactor: support explore dataMask

* refactor: support explore dataMask

* docs: add comment

* refactor: remove json stringify

* fix: fix failed cases

* feat: filter bat buttons start

* fix: fix CR notes

* fix: fix cascade filters

* fix: fix CR notes

* refactor: add clear all

* fix: fix CR notes

* fix: fix CR notes

* fix: fix CR notes

* feat: buttons in filter bar

* lint: update imports

* test: fix tests
2021-03-07 11:27:22 +02:00
simcha90 45972e9945
refactor(native-filters): Move `filtersState` to `dataMask` redux root (#13437) 2021-03-07 09:34:12 +02:00
simcha90 dc170397c5
feat(dashboard_rbac): manage roles for dashboard (#13145)
* feat(dashboard_rbac): manage roles for dashboard

* test: fix tests

* fix: fix empty roles

Co-authored-by: Amit Miran <47772523+amitmiran137@users.noreply.github.com>
2021-03-03 12:31:41 +02:00
simcha90 f19a830d9b
refactor(self-trigger): Split native filters state (#13137)
* feat: add cross filters

* refactor: fix CR notes

* lint: fix lint

* lint: fix lint

* feat: POC adding filters set feature

* chore: pre-commit

* refactor: under chage

* lint: fix TS

* fix: fix FF name

* refactor: move to behaviors

* lint: fix lint

* refactor: update state of native filters

* refactor: finish refactor nativeFilter state

* feat: split native filters state

* refactor: refactor Time filter to use new API

* refactor: refactor Time filter to use new API

* refactor: fix CR notes

* fix: fix update values in filter bar

* refactor: save filter sets in meta

* feat(filter-sets): save filters sets in metadata

* refactor: partially fix ts

* refactor: merge conflicts

* refactor: add behaviors property

* refactor: add behaviors property

* fix: undo py changes

* fix: under some changes

* refactor: synx with master

* fix: undo FF

* fix: undo FF

* lint: ts-ignore

* chore: update lock file

* refactor: update enum

* refactor: naming of enum

* test: fix test

* test: update mocks

Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
2021-03-02 09:03:26 +02:00
Michael S. Molina 72721845e1
test: Adds tests to URLShortLinkButton component (#13319) 2021-02-25 10:59:36 -08:00
simcha90 9b5e66b728
refactor(native-filters): Refactor filters config modal module (#13268)
* refactor(native-filters): Refactor filters config modal module

* fix: fix import

* lint: fix import
2021-02-22 09:23:38 +02:00
Michael S. Molina 42ab57850d
Migrate Bootstrap Alert to AntD (#12101) (#12122) 2021-02-21 20:50:18 -08:00
Geido 409fc83ca9
chore: Tab title to be empty when creating a new tab (#12773)
* Remove unwanted package lock

* Edit on new and autofocus

* Update test

* Remove autofocus
2021-02-18 10:14:59 -08:00
simcha90 2ff8741248
feat(filter-sets): Saving filter sets in metadata (#13205)
* feat: POC adding filters set feature

* lint: fix TS

* fix: fix FF name

* refactor: fix CR notes

* fix: fix update values in filter bar

* refactor: save filter sets in meta

* feat(filter-sets): save filters sets in metadata
2021-02-18 15:43:10 +02:00
Michael S. Molina ad4ca2223e
feat: one-click copy chart and dashboard URL (#13037)
Closes #10328
2021-02-17 14:14:08 -08:00
simcha90 5cbe2ac760
feat(filters-set): basic implementation for managing user filter sets (#13031)
* feat: POC adding filters set feature

* lint: fix TS

* fix: fix FF name

* refactor: fix CR notes

* fix: fix update values in filter bar
2021-02-17 21:06:12 +02:00
simcha90 5aa38ef929
feat(native-filters): enable filter indicator and make datasource optional (#13148)
* refactor: continue decouple native filters

* refactor(native-filters): decouple native filter parms from config modal

* lint: fix TS errors

* lint: fix TS errors

* refactor: update filter badge

* refactor: rename ant filters

* test: fix tests

* test: fix tests

* refactor: remove 18 from dataset
2021-02-16 16:12:35 +02:00
Jesse Yang 613945a200
fix(FilterBox): treat empty defaultValues as null (#13109)
* fix(FilterBox): treat empty defaultValues as null

* Add a unit test and move constant around
2021-02-15 08:35:47 -08:00
simcha90 956f276e70
feat(cross-filters): add cross filters (#12662)
* feat: add cross filters

* refactor: fix CR notes

* lint: fix lint

* lint: fix lint

* chore: pre-commit

* refactor: under chage

* refactor: move to behaviors

* lint: fix lint

Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
2021-02-12 09:58:19 +02:00
simcha90 c5781cde60
feat(style): hide dashboard header by url parameter (#12918)
* feat(native-filters): hide dashboard header bu url parameter

* lint: fix lint

* test: add tests

* test: fix test

* refactor: upgrade standalone param

* fix: pre-commit and extract to method is_standalone_mode

* test: fix tests

* test: fix tests

* fix: fix standalone statement

* refactor: fix CR notes

* chore: pre-commit

* fix: fix sticky tabs + update CR notes

* lint: fix lint

* lint: fix lint

* fix: fix CR notes

* fix: fix CR notes

* lint: fix lint

* refactor: fix cr notes

Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
2021-02-11 15:05:35 +02:00
simcha90 c440d98fad
refactor(native-filters): refactor code of native filters (#12889)
* refactor(native-filters): refactor code of native filters

* refactor: update refactor dependencies

* refactor: update refactor dependencies

* lint: fix lint

* fix: merge with master

* chore: fix selector
2021-02-08 13:26:58 +02:00
Michael S. Molina c781ab8adf
Migrates Button component from Bootstrap to AntD (#12832) 2021-02-01 15:13:10 -08:00
Kamil Gabryjelski fcaa0acad5
chore: Upgrade react-dnd to 11.1.3 (#12815) 2021-01-28 18:34:56 -08:00
simchaNielsen da63b4b0ea
test(native-filters): scoping tree in native filters modal (#12655)
* test: add test to scoping tree in native filters

* test: rename mocks
2021-01-26 14:23:07 +02:00
Michael S. Molina 6bf5d2c06d
Fix tests errors and warnings - iteration 3 (#12212) (#12219) 2021-01-25 23:40:59 -08:00
simchaNielsen 4d04565c9a
feat(native-filters): apply scoping of native filters to dashboard (#12716)
* feat: scoping native filters in dashboard

* test: add tests / fix reducer

* test: fix tests

* chore: merge with master

* fix: fix undefined cases

* fix: fix code according cypress

* refactor: fix mocks according CRs

* chore: re run pipeline
2021-01-26 09:29:49 +02:00
Michael S. Molina 0c08bb87c3
Fix tests errors and warnings - iteration 4 (#12212) (#12223) 2021-01-25 23:24:41 -08:00
Michael S. Molina 0fc9da6be7
Fix tests errors and warnings - iteration 7 (#12212) (#12245) 2021-01-25 23:19:16 -08:00
Michael S. Molina 3fb183349f
Fix tests errors and warnings - iteration 2 (#12212) (#12214) 2021-01-25 12:03:16 -08:00
Agata Stawarz 9c53ad48aa
fix(native-filters): Show incompatible native filters indicator (#12687)
* Show incompatible native filters indicator

* Add Native Filters mocks and tests to Filter Badge

* Compare filter names in deduplication logic

* Add indicator key

* Remove unnecessary import
2021-01-23 13:23:21 +08:00
Michael S. Molina fc20e8b594
Apply capitalization guidelines - iteration 4 (#12343) (#12450) 2021-01-22 10:11:38 -08:00
Agata Stawarz c72c39bffd
feat(native-filters): Show alert for unsaved filters after cancelling Filter Config Modal (#12554)
* Add Alert when native filter is canceled and not saved

* Improve styles and setting styles visible

* Improve displaying filter names

* Add tests for canceling native filter modal

* Fix linter errors

* Refactor Cancel Confirmation Alert
2021-01-20 20:57:28 -08:00
simchaNielsen 2463215d73
refactor: Sync Scoping tree with Forms data (#12171)
* refactor: sync Scoping tree with Forms data

* refactor: update scoping tree

* refactor: update scope tree logic to be more UX friendly

* test: fix tests

* lint: fix lin CR notes

* fix: fix jsx

* refactor: revert type changes

* refactor: revert type changes

* lint: fix lint

* lint: fix lint

* test: fix test

* fix: process initial dashboard case

* lint: fix lint / tests
2021-01-20 11:40:53 +02:00
Agata Stawarz ddbcf5b0e9
fix: Refresh Interval Modal dropdown (#12406) 2021-01-11 11:58:28 -08:00
Jesse Yang 9acf48fd1e
chore: upgrade eslint, babel, and prettier (#12393) 2021-01-10 17:26:35 -08:00
Evan Rusackas 4a471b8c71
feat: Native filters fast-follow (#12138)
* wip: filter create modal

* add a feature flag

* automatic changes to package lock

* wip

* filter sidebar and basic state management

* move create button to the sidebar

* first step for edit filterconfig

* partially fix tests...

* edits to types and comments

* respect feature flag on the filter sidebar

* add filterconfig form

* get input state working

* feat: tree filter scopes UI

* fix: turn on flag

* sticky filter bar

* stop preferring default export

* feat: finish filter scoping

* fix: under toggle

* fix: title

* fix: add licence

* refactor: update TS

* fix: fix on reopen modal + validation

* new filter bar menu

* adding, but commenting out, bulk scoping action

* adding some placeholder buttons and styles therefor

* feat: add filter chart

* add relative path to package.json

* update modal

* a little input styling... just getting warmed up

* Revert "feat: add filter chart"

This reverts commit b1302d35b6.

* Revert "add relative path to package.json"

This reverts commit 26a7b40e18.

* https package lock idk

* feat: add filter chart

* add relative path to package.json

* flexboxes all the way down

* dynamically generate groupby and datasource in select control

* big wip

* fix target column name

* no importing nonexistent things

* styles and name editing

* Add hook for retrieval of all filter states

* start with a new filter when clicking add filter

* handle removed filters gracefully

* fix incorrect default filter configuration

* add fields to useAllFilterState

* add redux for filterconfigs

* add support for native_filters

* remove consoles

* improve filter removal

* unbreak infinite loop

* basic sidebar toggling working!

* collapsing and menu working more smoothly

* linting

* make dataset and column inputs work

* save filter values properly

* add dashboard event for filter updates

* guarded

* apply filters properly

* fix schema

* making New Filter button a link

* gridunits ftw

* centering modal

* tis not a button anymore! nixing type.

* plus and collapse buttons instead of "more" menu

* updating full size filter icons

* adding icons to filter collapsing/expanding

* turning off animation, but leaving class-based animation css

* fix linting error

* fix native filters for legacy charts

* updates test

* no individual apply buttons

* fix bugs with filter config modal

* remove redundant code

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* update tests

* oops forgot to add the fancy new useChangeEffect hook

* comments and code reorganization

* rename native_filters to extr_form_data and move hook

* disable native filters in viz selector

* add cascading

* implement new extra form data api

* cleanup

* updates tests

* bump npm packages

* fix bad merge on package.json + lock

* lint

* replace in and not in with uppercase

* lint

* lint

* lint

* lint

* bulk test fix

* Sort select input alphabetically

* Change type for sorting elements

* sleeker filter removal UX

* fix rest of unit tests

* make filter operators all uppercase

* Hide Filter bar when there are no filters

* Show edit button for dashboard owners only

* Add visible argument to filters toggle function to avoid future regression

* Improve Toggle filters bar function

* lint

* fix js lint + set createNewOnOpen

* Handle setting extra form data in Filter Bar instead of Filter Control

* Add Handle apply filter function to Apply button

* Allow applying changes instantly

* Fix types

* remove console logs

* fix package

* Add Error Boundary component to Filter bar and Filter Config Modal

* fix jest tests

* update native filters tests to pass

* reset cypress baseUrl

* remove unnecessary field

* Add Parent Filter input field to Config Modal

* Create Cascade Filter & display children filters

* Add Cascade Popover

* Display Filter value both in Filter Bar and in Cascade Popover

* Display the youngest filter value label in the Filter bar

* Add styles to Cascade Popover and filters

* Force to apply changes instantly for parent filters and refactor styles

* Show error for no cyclical hierarchy and refactor

* Add validation for parent filter to be applied instantly

* Add Error Boundary to Filter Config Modal

* cleanup: remove unused state fields

* move unrelated types to an appropriate location

* remove misplaced resource fetch error logic

* fix cascadeParentIds error

* fix cypress password

* initial attempt at fixing scope issue

* fix bad merge

* fix lint

* trying out makeApi for saving filters

* remove unused import

* fix test

* silence bad test

* Improve styling of Filter Config Modal

* Improve styles for whole native filters feature

* Add styles for active filter tab

* Fix text for scoping

* Clean up Filter Bar and Config Modal styles

* Remove fractional gridUnits. Change name for CheckboxFormItem. Add placeholder to Parent Filter select.

* Remove unnecessary button size for Config Modal

* add native-filter feat flag config

* oops fix here

* remove space

* Update superset-frontend/src/common/components/index.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts

Co-authored-by: Evan Rusackas <evan@preset.io>

* Add Cache Wrapper helper to avoid datasets requests deduplication

* Add license to new Cache Wrapper helper

* Add Cache Wrapper tests

* Fix expanding Filter Bar

* use styledMount in tests

* comment

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigurationLink.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* address PR feedback

* fix package lock

* null guards

* Fix charts resizing

* removing emotion/react and going old school on css animation

* fxing css glitch on scoping disclaimer

* src paths.

* using gridUnits

* nixing unnecessary diamonds

* linting

* fix type errors

* Inverting collapsed icons... closer to data src selector design

* restoring feature flag to proper default setting

* missing condition

* fix tests

* patching test

* just a button

* flaky tests

Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-19 01:57:06 -08:00
David Aaron Suddjian 865beae3d8
feat(dashboard): Dashboard-Native Filters (#11814)
* wip: filter create modal

* add a feature flag

* automatic changes to package lock

* wip

* filter sidebar and basic state management

* move create button to the sidebar

* first step for edit filterconfig

* partially fix tests...

* edits to types and comments

* respect feature flag on the filter sidebar

* add filterconfig form

* get input state working

* feat: tree filter scopes UI

* fix: turn on flag

* sticky filter bar

* stop preferring default export

* feat: finish filter scoping

* fix: under toggle

* fix: title

* fix: add licence

* refactor: update TS

* fix: fix on reopen modal + validation

* new filter bar menu

* adding, but commenting out, bulk scoping action

* adding some placeholder buttons and styles therefor

* feat: add filter chart

* add relative path to package.json

* update modal

* a little input styling... just getting warmed up

* Revert "feat: add filter chart"

This reverts commit b1302d35b6.

* Revert "add relative path to package.json"

This reverts commit 26a7b40e18.

* https package lock idk

* feat: add filter chart

* add relative path to package.json

* flexboxes all the way down

* dynamically generate groupby and datasource in select control

* big wip

* fix target column name

* no importing nonexistent things

* styles and name editing

* Add hook for retrieval of all filter states

* start with a new filter when clicking add filter

* handle removed filters gracefully

* fix incorrect default filter configuration

* add fields to useAllFilterState

* add redux for filterconfigs

* add support for native_filters

* remove consoles

* improve filter removal

* unbreak infinite loop

* basic sidebar toggling working!

* collapsing and menu working more smoothly

* linting

* make dataset and column inputs work

* save filter values properly

* add dashboard event for filter updates

* guarded

* apply filters properly

* fix schema

* making New Filter button a link

* gridunits ftw

* centering modal

* tis not a button anymore! nixing type.

* plus and collapse buttons instead of "more" menu

* updating full size filter icons

* adding icons to filter collapsing/expanding

* turning off animation, but leaving class-based animation css

* fix linting error

* fix native filters for legacy charts

* updates test

* no individual apply buttons

* fix bugs with filter config modal

* remove redundant code

* switch to the filter with validation errors on submit

* separate form validation

* switch config button from add to edit

* update tests

* oops forgot to add the fancy new useChangeEffect hook

* comments and code reorganization

* rename native_filters to extr_form_data and move hook

* disable native filters in viz selector

* add cascading

* implement new extra form data api

* cleanup

* updates tests

* bump npm packages

* fix bad merge on package.json + lock

* lint

* replace in and not in with uppercase

* lint

* lint

* lint

* lint

* bulk test fix

* Sort select input alphabetically

* Change type for sorting elements

* fix rest of unit tests

* make filter operators all uppercase

* Hide Filter bar when there are no filters

* Show edit button for dashboard owners only

* Add visible argument to filters toggle function to avoid future regression

* Improve Toggle filters bar function

* lint

* fix js lint + set createNewOnOpen

* Handle setting extra form data in Filter Bar instead of Filter Control

* Add Handle apply filter function to Apply button

* Allow applying changes instantly

* Fix types

* remove console logs

* Add Error Boundary component to Filter bar and Filter Config Modal

* fix jest tests

* update native filters tests to pass

* reset cypress baseUrl

* remove unnecessary field

* cleanup: remove unused state fields

* move unrelated types to an appropriate location

* remove misplaced resource fetch error logic

* fix cascadeParentIds error

* fix cypress password

* initial attempt at fixing scope issue

* fix bad merge

* fix lint

* trying out makeApi for saving filters

* remove unused import

* fix test

* silence bad test

* add native-filter feat flag config

* oops fix here

* remove space

* Update superset-frontend/src/common/components/index.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts

Co-authored-by: Evan Rusackas <evan@preset.io>

* use styledMount in tests

* comment

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigurationLink.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* address PR feedback

* fix package lock

* null guards

* Fix charts resizing

* fix cypress tests

* add in nativefilters to form data

* fix lint and test

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-18 17:06:37 -08:00
simchaNielsen 49ec13c68c
feat: Support multiple queries per request (#11880)
* refactor: add queriesData fields for multiple queries

* feat: support multi queries request

* lint: fix lint

* lint: fix lint

* lint: fix lint

* fix: fix CR notes

* fix: fix CR notes

* fix: fix CR notes

* fix: fix error case for multi queries

* feat: change queryResponse to queriesResponse

* fix: revert webpack

* test: fix tests

* chore: lint

* chore: adjust asyncEvent to multiple results

* fix: lint

* fix: eslint

* fix: another eslint rule

Co-authored-by: Amit Miran <47772523+amitmiran137@users.noreply.github.com>
Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
2020-12-18 09:15:27 -08:00
Victor Malai 51c3b7156c
chore: Remove unused CodeModal (#11972)
* Transform code modal to tsx

* Fix

* Fix

* Remove unused modal

Co-authored-by: Victor Malai <victormalai@Victors-MacBook-Pro.local>
2020-12-16 23:44:58 -08:00
David Aaron Suddjian 6270fa2026
refactor: Upgrade Redux (#11967)
* upgrade redux and react-redux, adjust types

* first round of test fixes

* fix rest of unit tests

* lint

Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
2020-12-09 11:58:42 -08:00
Elizabeth Thompson 84e0606a90
chore: move fixtures and helpers to root (#11812) 2020-11-30 14:23:56 -08:00
Kamil Gabryjelski 3ad65bc163
fix: Dropdown menu not closing on Dashboard view (#11671) 2020-11-12 14:48:48 -08:00
Grace Guo 966a826720
fix: js unit test when save dash (#11632) 2020-11-09 17:56:30 -08:00
Grace Guo b9284d3a3c
fix(dashboard): use server-side lastModifiedTime for co-edit check (#11614)
* fix: [dashboard][co-edit] Round client-side lastModifiedTime

* another try: server-side returns last_updated_time in save_dash response
2020-11-09 13:30:40 -08:00
Jesse Yang 6ab03feed8
chore: clean up mountedTab (#11569) 2020-11-08 21:09:27 -08:00
Kamil Gabryjelski 3e35ddd609
refactor: Replace react-bootstrap MenuItems with Antd Menu (#11555)
* Remove MenuItem from SubMenu

* Fix tests

* Refactor PopoverDropdown

* Refactor Button

* Remove redundant Menu import
2020-11-04 14:32:38 -08:00
Kamil Gabryjelski ad98981d9d
refactor: Replace react-bootstrap MenuItems with Antd Menu (#11487)
* Remove MenuItem from CopyToClipboard

* Refactor DateFilterControl

* fixup! Remove MenuItem from CopyToClipboard

* Remove console log

* Refactor LanguagePicker

* Refactor HeaderActionsDropdown

* Remove dir with Menu component

* Add imports to common/components/index

* Fix after rebase
2020-11-04 13:47:25 -08:00
Kamil Gabryjelski 937f9ca277
refactor: Replace react-bootstrap dialogs with Antd dialogs (#11527)
* Refactor Dialogs in dashboard properties modal

* Refactor Dialogs in explore properties modal

* Refactor dialogs in DatasourceModal

* Refactor dialogs in ExploreResultsButton

* Remove react-bootstrap-dialog from ExploreCtasResultsButton

* Remove react-bootstrap-dialog dependency

* Remove unnecessary functions from Modal

* Bump antd version to fix a bug

* Fix unit tests

* Fix e2e test

* Change antd version to 4.5.4 to fix tests

* Reenable all tests in control

* Another version bump to fix tests
2020-11-03 22:07:21 -08:00
David Aaron Suddjian d7aa3d792b
fix(dashboard): multiple lines and indentation when editing json (#11501)
* multiple lines and indentation when editing json

* fix tests, address pr feedback

* remove json minification
2020-11-02 13:39:04 -08:00
Kamil Gabryjelski a874b14a8a
refactor: Replace react-bootstrap Tabs with Antd Tabs in DashboardBuilder (#11160)
* Replace tabs in DashboardBuilder

* Fix tests

* Fix styling of anchor

* Fix

* Fix cypress test

* Fix tests

* Fix e2e tests

* Use data-tests

* Move tabs styles from superset.less to Emotion

* Restyle tabs in DashboardBuilder

* Test fix

* Fix styling
2020-11-02 13:31:55 -08:00
David Aaron Suddjian 18658f45be
feat(dashboards): Filter status indicators (#10936)
* Initial commit of new filters badge.

* refactor applied/rejected filters code

* finished filter indicators

* filter badge tested

* unnecessary imports

* formatting and types

* fixes

* license

* code quality tweaks

* state management for showing focused filter scope

* clean up filter key extraction code

* remove unnecessary styles

* temp css to demonstrate highlighting

* fix focused filter logic

* no more color badges

* new toys for highlighting dash components (#11144)

* tweak style for the filter chart when filter is focused

* style: Filters p0 css2 (#11151)

* nixing background tweak

* src paths

* another quick theme color

* src paths, adjusting pill icon color, changing icons, showing applied/busted counts

* linting stuff

* fixing and tweaking tests

* show filter indicator when filters are not active

* chart title bar cleanup

* open the right panel when popover opens

* unused import

* fix EditableTitle tests

* margin on dashboard header

* show the chart dropdown menu

* fix blur filter breaking dropdowns

* style tweak - no pointer events when irrelevant charts are blurred

* fix box shadow on filter highlight

* it's an array

* attempt fixing e2e

* style: filters p0 icon churn (#11215)

* new filters icon

* icon styling

* bigger icons in list views

* better sizing of table actions and favStars

* more icon sizing...

* fixing more button size jankiness

* linting

* Filters performance (#11255)

* fixing time filter "ok" button

* making unset filter menu collapsible

* sort alphabetically

* fix highlighting when removing items

* try a flex layout (for browser render perf)

* more specific transitioning

* temp: comment out some code as a test

* temp: comment out more code

* temp: remove possibly expensive computations from ChartHolder

* Revert "temp: comment out some code as a test"

This reverts commit 309b880e90.

* Revert "temp: comment out more code"

This reverts commit 64c88b2cba.

* Revert "temp: remove possibly expensive computations from ChartHolder"

This reverts commit 37ce0214f0.

* experiment: upgrade react-select to v3

* Revert "experiment: upgrade react-select to v3"

This reverts commit c3972ba486.

* fix the damn problem

* remove code used for testing purposes

* awful hack to avoid adding a class to a container

* approaching infinity... and not beyond!

* fix ref forwarding

* add theme to tests as necessary

* fix(extra-filters): add logic for identifying applied extra filters (#11325)

* fix: use dashboard id for stable cache key (#11293)

* fix: button translations missing (#11187)

* button translations missing

* blank space before text

* feat: update time_compare description and choices (#11294)

* feat: update time_compare description and choices

* Update sections.jsx

* fix(extra-filters): add logic for identifying applied extra filters

* lint

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: rubenSastre <ruben.sastre@decathlon.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>

* address design feedback

* slight tweak to panel logic, keep panels open that user has opened

* rearrange code to be more graceful

* fix: bump superset-ui/core (#11385)

* use is_dttm instead of is_temporal

* types, names

* only show unset filter panel if there are unset filters

* fix highlighting the filter control

* fix filterbox layout

* translations

* fix cypress

* actually add the test attribute

* Update superset-frontend/src/dashboard/components/DashboardBuilder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/DashboardBuilder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* formatting

* add link comment to hack

* Update superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* stop importing lodash

* Update superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* skip broken test

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* Update superset-frontend/src/dashboard/components/FiltersBadge/Styles.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

* adjust colors of titles

* linting

* no indicators when chart is loading

* support all time fields

* fix lock file

Co-authored-by: Natalie Ruhe <natalie@preset.io>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: rubenSastre <ruben.sastre@decathlon.com>
Co-authored-by: Erik Ritter <erik.ritter@airbnb.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2020-10-28 15:46:24 -07:00
Kamil Gabryjelski 894ca3c09b
refactor: Use Modals from Antd instead of react-bootstrap (#11330)
* Refactor ModalTrigger to use antd modal

* Refactor a few components

* dynamic width

* Fix unit tests

* Use i18n for button text
2020-10-26 11:20:10 -07:00
Jesse Yang 8aecffd83b
refactor: typing for explore Control and messageToasts (#11416) 2020-10-24 21:40:36 -07:00
Elizabeth Thompson 43b92b220f
fix: dashboard edit/save errors (#10834)
* use conditional operator for lookup

* editing dashboard title should update after save

* uncomment test

* fix json metadata save

* json metadata color scheme should overwrite state

* test's functionality is no longer applicable

* add lastModifiedTime to DashboardInfo
2020-10-22 14:33:22 -07:00
Grace Guo 8863c939ad
fix: should update last_modified_time in client-side after save dash (#11305) 2020-10-16 10:54:35 -07:00
Elizabeth Thompson d95b7c2a73
fix: clean up prop type errors in jest tests (#11120) 2020-10-02 14:59:04 -07:00
Kamil Gabryjelski 2fd8fca207
chore: Clean up some console warnings (#11061)
* Upgrade a few packages

* Update some prop types

* Update HTML

* Moar warning fixes

* Remove wrapper div
2020-09-28 09:43:21 -07:00
Grace Guo f99753a800
Revert "ESLint: Re-enable rule default-props-match-prop-types (#10868)" (#11050)
This reverts commit 9f01a7fdf8.
2020-09-24 12:33:38 -07:00
Kamil Gabryjelski 9f01a7fdf8
ESLint: Re-enable rule default-props-match-prop-types (#10868)
* Re-enable rule default-props-match-prop-types

* Restore default props and remove isRequired

* Remove unused props
2020-09-22 13:17:41 -07:00
Yongjie Zhao af75bee582
feat: adding dashboard toggle fullscreen button (#10840) 2020-09-16 14:20:52 -07:00
Jesse Yang 0129c4253d
feat: move ace-editor and mathjs to async modules (#10837)
Follow up on #10831, move brace and mathjs to async modules so that the initial page load for dashboards most pages can be faster.
2020-09-15 14:12:06 -07:00
Kamil Gabryjelski 352e8a1afd
Re-enable rule prefer-destructuring (only for objects) (#10867) 2020-09-14 10:11:20 -07:00
Kamil Gabryjelski 8a774d59ed
Eslint dependencies versions updates (#10839)
* Update eslint version to 7.8.1

* Give names to unnamed functions  to fix lint errors

* Update eslint-import-resolver-webpack

* Update eslint-plugin-cypress

* Add eslint-plugin-react-hooks

* Update necessary peer dependencies for eslint-config-airbnb

* Update eslint airbnb config and ts plugins

* Remove "this" from functional component

* Disable all rules that cause new errors

* Fix linting errors in tests

* Add licenses to .eslintrc files

* Add path and zlib to package.json

* Disable incompatible rule in eslint-plugin-cypress

* Remove redundant config for typescript linting

* Mark disabled rules with comments

* Remove path and zlib from deps, disable import rule for webpack files
2020-09-13 23:59:02 -07:00
Jesse Yang 9a59bdda48
refactor: merge/upgrade superset-ui packages (#10790)
* refactor: merge/upgrade superset-ui packages

* Fix flaky big number test

* Fix Flaky AdhocFilters test
2020-09-09 13:18:55 -07:00
Evan Rusackas 9fe30ab71e
style: Pass at propagating (and enhancing) Button component throughout Superset (#10649)
* getting rid of weird focus/active outline ring

* Buttons... buttons _everywhere_

* linting

* Nixing views/CRUD/dataset/Button component

* fixing 2 typing errors

* fixing more TS errors

* prefer src path for include

* one more real button, one less CSS class

* one more "button" to "Button"

* Published Status is now a proper clickable Label

* nixing the CRUD button again

* touching up stories, with SupersetButton story

* SIP-34 button colors

* adding polished package to mix colors

* updating button colors to match Superset theme

* abstracting away from bootstrap-specific props (might pivot libraries soon!)

* more abstraction from bsStyle/bsSize props

* exchanging styles for a prop

* linting

* restoring feature flag to stock

* using src alias

* last <button> replacement

* this classname would never be applied

* more linting action

* fixing unsupported bsSize 'medium', and cta typing error

* more cta action

* unnecessary styles

* errant bsSize prop

* cleanup

* tweaks to make new New button work

* Linting

* fixing a couple tests

* fixing theme based test failure

* margin tweak for NEW button

* another fixed test

* another fixed test

* fixing two more tests

* fixing last broken tests.

* always be linting

* Adding tertiary/dashed buttons

* cleaning up QueryAndSave buttons

* fixing "link" button styles

* fixing/updating link button styles

* cta buttons on Modal component

* linting.

* exporting button story knobs, making ALL knobs safe for export.

* capitalizing a file... no big whoop

* Basic button tests

* renaming button - temporarily

* renaming file to fix capitalization issue

* passing theme through to a difficult popover.

* fixin' a newly busted unit test

* lint fixin'

* oops, shouldn't have changed this prop!

* adding a dive() to themedShallow, and fixing a cypress/jest test

* addressing lint stuff

* touching up stories, with SupersetButton story

* SIP-34 button colors

* updating button colors to match Superset theme

* abstracting away from bootstrap-specific props (might pivot libraries soon!)

* linting

* restoring feature flag to stock

* cleanup

* Linting

* renaming button - temporarily

* renaming file to fix capitalization issue

* oops, shouldn't have changed this prop!

* adding a dive() to themedShallow, and fixing a cypress/jest test

* addressing lint stuff

* nixing new modal button

* Fixing another popover/button issue that should break cypress

* lint 

* passing classNames through to new button (should fix some tests)

* cleaning unused classes, making cypress tests use data attrs

* fixin' the test

* fixing another class-based test with data-test attr

* no longer passing theme as prop to buttons in popovers... themeprovider is better

* outline/border tweaks!
2020-08-28 17:34:28 -07:00
Evan Rusackas f868580f64
chore: bump react-redux to 5.1.2, whittling console noise (#10602)
* chore: bump react-redux to 5.1.2

* fixing spy, and thus the breaking test.

* relabeling tests to UNSAFE_componentWillReceiveProps because why not.
2020-08-16 21:29:08 -07:00
Jesse Yang a37b635674
fix(dashboard): add animation state to fix tab switch re-renders (#10475) 2020-08-11 00:57:50 -07:00
Maxime Beauchemin ece91928a9
style: use tabs in dashboard edit pane (#10394)
* style: use tabs in dashboard edit pane

* fix tests

* more hackin'

* getting ready to rip cell measurer

* working

* pogress

* Fix cards

* done

* fix jest

* fix cy
2020-08-05 18:53:53 -07:00
David Aaron Suddjian 7f70a241f9
test: Add jest-enzyme assertion library for better frontend tests (#10459)
* adding jest-enzyme

* enzymeify lots of assertions

* types for jest-enzyme
2020-07-29 10:53:06 -07:00
Ville Brofeldt 5b6ff4944c
fix: incorrect filter operator emitted by Filter Box (#10421)
* fix: equals operator in filter box

* fix time range endpoint schema

* fix test

* bump packages

* fix tests

* lint
2020-07-26 12:40:03 +03:00
Evan Rusackas ca71d4d6ee
feat: adding Storybook to Superset (#10383)
* Storybook added!

* starting to configure junk....

* Storybook works!!!

* Now with theme!

* apache boilerplate

* more apache comments

* lots o' knobs for the Button.... taking stock of the codebase

* more classes, but killing the knob for now.

* nixing unused module

* linting

* fresh package-lock

* now with tooltip!

* adding path and zlip because the linter told me to

* upgrading storybook packages from devdeps

* linting

* removing cruft

* killing an annoying (and old?) lint issue

* lint fix, take 2.

* removing zlib/path

* package lock reset from master

* re-adding new packages for this here PR

* nixing console log, simplifying

* nixing comment TODOs (done enough!)

* basic docs.
2020-07-22 10:21:25 -07:00
Ville Brofeldt 3c39b26c99
fix: extra filters for chart data endpoint (#10359)
* fix: extra filters

* fix old test and add new test

* add test for null filter value

* leave lowercase until all operators are fully uppercased

* bump packages

* rename test
2020-07-21 08:24:50 +03:00
Erik Ritter 09de805017
chore: enable no-unused-vars and prefer-template eslint rules (#10350) 2020-07-16 19:13:59 -07:00
ʈᵃᵢ 0eee6785a8
feat(listviews): SIP-34 Bulk Select (#10298) 2020-07-16 16:07:49 -07:00
Lily Kuang 3b4df51848
style: new toast design closer to SIP-34 (#10178) 2020-07-10 14:58:59 -07:00
Grace Guo a80453d945
fix: dashboard filter scope bug (#10114)
* fix: dashboard filter scope bug

* add extra comments per review
2020-06-22 10:18:04 -07:00
Erik Ritter 987cb6e1fe
chore: type src/dashboard/util/charts (#10068) 2020-06-17 12:34:04 -07:00
Grace Guo dcac860f3e
feat: [dashboard] notification and warning for auto force refresh (#9886)
* feat: [dashboard] notification and warning for auto force refresh

* fix review comments
2020-06-03 10:20:56 -07:00
Grace Guo e6a55d8858
fix: [dashboard] should not trigger chart refresh when filter not applicable (#9891)
* fix: [dashboard][filter] should not trigger chart refresh when filter is not applicable

* fix comments
2020-05-26 10:14:12 -07:00
Christian Murphy a262ea7487
refactor(frontend): move utils to TypeScript (#9820)
* refactor(frontend): move utils to typescript (#9101)

* refactor(frontend): don't export interfaces

* test(frontend): update types and test for isValidChild
2020-05-20 14:47:40 -07:00
Christian Murphy b8eaa114ed
feat(frontend): add ability to download dashboard and chart as image (#9819)
* feat(frontend): add ability to export dashboard and chart as image (#6973)

* refactor: migrate download image as to typescript

* feature(frontend): download as image updates

add toast message if error occurs.
make generate file stem an internal method.

* refactor(frontend): move default background color to a const

* feat(frontend): wrap download image toast in translate function
2020-05-17 14:50:27 -07:00
Jesse Yang 13c5b133a9
test(frontend): use absolute path for src imports (#9761)
* test(frontend): use absolute path for src imports

* Upgrade prettier, fix eslint
2020-05-07 14:18:10 -07:00
Grace Guo 83b4165e61
[perf logging] Add extra logging for new/editMode dash (#9745)
* [perf logging] Add extra logging for new/editMode dash

* fix review comments
2020-05-06 09:03:04 -07:00
David Aaron Suddjian d65d29c810
fix: css prop is now overwhelmed with emotion (#9742) 2020-05-05 10:10:56 -07:00
Grace Guo 4a55e1ea3a
[fix] dashboard filter scope bug (#9550) 2020-04-16 15:44:03 -07:00
Grace Guo a9ff51bd61
[fix] dashboard filter indicator no showing single number value (#9401) 2020-03-30 15:05:04 -07:00
Erik Ritter 786e575dbe
[build] Bump superset-ui packages and update build (#9241) 2020-03-05 14:20:45 -08:00
Grace Guo c1750af54a
[dashboard] clean up usage for old filter immune metadata (#9146)
* [dashboard] clean up usage for filter_immune metadata

* add fix per comment
2020-02-19 09:58:34 -08:00
Grace Guo b0110a74e7
[dashboard] remove loading spinner in missing chart holder (#9140) 2020-02-14 09:01:47 -08:00
David Aaron Suddjian 2913063924 SIP-32: Moving frontend code to the base of the repo (#9098)
* move assets out, get webpack dev working

* update docs to reference superset-frontend

* draw the rest of the owl

* fix docs

* fix webpack script

* rats

* correct docs

* fix tox dox
2020-02-09 17:53:56 -08:00