Skip to content

[dashboard v2] tests! - #4993

Closed
williaster wants to merge 23 commits into
apache:dashboard-builderfrom
williaster:chris--dashboard-tests-2
Closed

williaster wants to merge 23 commits into
apache:dashboard-builderfrom
williaster:chris--dashboard-tests-2

Conversation

@williaster

@williaster williaster commented May 12, 2018 •

Copy link
Copy Markdown
Contributor

This PR adds a ton of tests for the new dashboard app. I have a few more todo (enumerated below), but wanted to make a PR to start getting an idea of coverage.

@graceguo-supercat

TODO

  • fix old Dashboard tests
  • add reducer tests
  • add action tests

williaster and others added 9 commits April 18, 2018 16:54
…ader, split pane, Draggable side panel

[grid] add <DashboardGrid />, <ResizableContainer />, and initial grid components.

[grid] gridComponents/ directory, add fixtures/ directory and test layout, add <Column />

[grid] working grid with gutters

[grid] design tweaks and polish, add <Tabs />

[header] add gradient header logo and favicon

[dnd] begin adding dnd functionality

[dnd] add util/isValidChild.js

[react-beautiful-dnd] iterate on dnd until blocked

[dnd] refactor to use react-dnd

[react-dnd] refactor to use composable <DashboardComponent /> structure

[dnd] factor out DashboardComponent, let components render dropInidcator and set draggableRef, add draggable tabs

[dnd] refactor to use redux, add DashboardComponent and DashboardGrid containers

[dragdroppable] rename horizontal/vertical => row/column

[builder] refactor into HoverMenu, add WithPopoverMenu

[builder] add editable header and disableDragDrop prop for Dragdroppable's

[builder] make tabs editable

[builder] add generic popover dropdown and header row style editability

[builder] add hover rowStyle dropdown, make row styles editable

[builder] add some new component icons, add popover with delete to charts

[builder] add preview icons, add popover menu to rows.

[builder] add IconButton and RowStyleDropdown

[resizable] use ResizableContainer instead of DimensionProvider, fix resize and delete bugs

[builder] fix bug with spacer

[builder] clean up, header.size => header.headerSize

[builder] support more drag/drop combinations by wrapping some components in rows upon drop. fix within list drop index. refactor some utils.

[builder][tabs] fix broken add tab button

[dashboard builder] don't pass dashboard layout to all dashboard components, improve drop indicator logic, fix delete component pure component bug

[dnd] refactor drop position logic
* [top-level-tabs] initial working version of top-level tabs

* [top-level-tabs] simplify redux and disable ability to displace top-level tabs with other tabs

* [top-level-tabs] improve tab drag and drop css

* [undo-redo] add redux undo redo

* [dnd] clean up dropResult shape, add new component source id + type, use css for drop indicator instead of styles and fix tab indicators.

* [top-level-tabs] add 'Collapse tab content' to delete tabs button

* [dnd] add depth validation to drag and drop logic

* [dashboard-builder] add resize action, enforce minimum width of columns, column children inherit column size when necessary, meta.rowStyle => meta.background, add background to columns

* [dashboard-builder] make sure getChildWidth returns a number
* [dashboard-builder] remove spacer component

* [dashboard-builder] better transparent indicator, better grid gutter logic, no dragging top-level tabs, headers are multiples of grid unit, fix row height granularity, update redux state key dashboard => dashboardLayout

* [dashboard-builder] don't blast column child dimensions on resize

* [dashboard-builder] ResizableContainer min size can't be smaller than size, fix row style, role=none on WithPopoverMenu container

* [edit mode] add edit mode to redux and propogate to all <DashboardComponent />s

* [toasts] add Toast component, ToastPresenter container and component, and toast redux actions + reducers

* [dashboard-builder] add info toast when dropResult overflows parent
* define dashboard redux state

* update dashboard state reducer

* dashboard layout converter + grid render

* builder pane + slice adder

* Dashboard header + slice header controls

* fix linting

* 2nd code review comments
* address major perf + css issues

[dashboard builder] fix dashboard filters and some css

[dashboard builder] use VIZ_TYPES, move stricter .eslintrc to dashboard/, more css fixes

[builder] delete GridCell and GridLayout, remove some unused css. fix broken tabs.

* [builder] fix errors post-rebase

* [builder] add support for custom DragDroppable drag layer and add AddSliceDragPreview

* [AddSliceDragPreview] fix type check

* [dashboard builder] add prettier and update all files

* [dashboard builder] merge v2/ directory int dashboard/

* [dashboard builder] move component/*Container => containers/*
…chy, better chart header (apache#4893)

* dashboard header, slice header UI improvement

* add slider and sticky

* dashboard header, slice header UI improvement

* make builder pane floating

* [dashboard builder] add sticky top-level tabs, refactor for performant tabs

* [dashboard builder] visually distinct containers, icons for undo-redo, fix some isValidChild bugs

* [dashboard builder] better undo redo <> save changes state, notify upon reaching undo limit

* [dashboard builder] hook up edit + create component actions to saved-state pop.

* [dashboard builder] visual refinement, refactor Dashboard header content and updates into layout for undo-redo, refactor save dashboard modal to use toasts instead of notify.

* [dashboard builder] refactor chart name update logic to use layout for undo redo, save slice name changes on dashboard save

* add slider and sticky

* [dashboard builder] fix layout converter slice_id + chartId type casting, don't change grid size upon edit (perf)

* [dashboard builder] don't set version key in getInitialState

* [dashboard builder] make top level tabs addition/removal undoable, fix double sticky tabs + side panel.

* [dashboard builder] fix sticky tabs offset bug

* [dashboard builder] fix drag preview width, css polish, fix rebase issue

* [dashboard builder] fix side pane labels and hove z-index
@williaster
williaster changed the base branch from master to dashboard-builder May 12, 2018 15:45
@williaster

Copy link
Copy Markdown
Contributor Author

@graceguo-supercat can you please review the tests for filters + dashboard since you are most familiar with this code? still can't find the bug you mentioned about filters.

@williaster

Copy link
Copy Markdown
Contributor Author

ping @graceguo-supercat

Grace Guo and others added 11 commits May 22, 2018 22:36
* save button

* fix slices list height

* save custom css

* merge save-dash changes from dashboard v1
apache#4900
apache#5051
…d, getChartIdsFromLayout, newEntitiesFromDrop, and getDropPosition
…ppable, DashboardBuilder, DashboardGrid, ToastPresenter, and Toast
…d ChartHolder, Chart, Divider, Header, Row tests and WithDragDropContext helper
…er, add test for menu/* and resizable/*, and new components
@williaster
williaster force-pushed the chris--dashboard-tests-2 branch from b019ba7 to 986fa26 Compare May 23, 2018 06:17
@williaster

Copy link
Copy Markdown
Contributor Author

javascript tests are passing 🎉 we might need to rebase the dashboard-builder branch on master to fix the py36-sqlite + py36-postgres tests

@graceguo-supercat

graceguo-supercat commented May 23, 2018 •

Copy link
Copy Markdown

I only see filters tests for componentDidUpdate. We should also test dashboard's default_filters from metadata are pre-populated.

@williaster
williaster force-pushed the dashboard-builder branch from 5488d55 to 6619271 Compare May 24, 2018 00:13
@williaster

williaster commented May 24, 2018 •

Copy link
Copy Markdown
Contributor Author

abandoning because of a weird git state after rebasing dashboard-builder. see #5066

@williaster williaster closed this May 24, 2018
@williaster
williaster deleted the chris--dashboard-tests-2 branch May 24, 2018 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants