* labels with onClick don't need .pointer. No labels need `m-r-5`
* making Timer a proper Label
* a little linting
* addresing (helpful, thanks) comment
* 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!
* style: shinier menus
* fixing mouseover glitch
* unused import
* rm emotion-reset
* restoring default config values
* lint fixes ✨
* a bit more pizzaz to the underlines (max's idea), fading active background
* simplifying navtitle -> label
* RBNavDropdown -> ReactBootstrapNavDropdown
* nixing whitespace
* replacing !importants with better selector specificity
* moving Menu LESS into Emotion
* no more border!
* fixing border issue
* language picker, account dropdown now use new dropdown component
* nixing whitespace in comment
* nixing duplicate styling
* removing borders on FAB navbar
* explicit font coloring
* linting
* moving two console errors to logger errors
* nixing unused map index
* nixing unused param
* linting
* changing an alert to a toast
* fixing tests
* lint fix
* one letter change, just to see if iti gets CI to pass this test.
* Niftier paddings
* upgrading storybook, fixing glob pattern
* moving a couple storybook dependencies to dev dependencies
* fixing annoying lint issue about dev dependencies needing to be dependencies
* adds essential addons, fixes backgrounds
* newline tweaks
* comment about no-extraneous-dependencies, higher specificity on that rule, other linting stuff
* a *python* linter doesn't like this whitespace?!
* putting the linespace back
* ugh, found the space causing CI issues... I think
* allow tests in jest confg
* sample stories for Label component
* passing tests
* stories to tsx!
* excluding knobs exports from published stories
* ts fix
* ts fix
* Label test to TS
* explicitly ignoring test files in webpack bundling
* linting stuff
* adding comment about test file exclusions
* colors corrected, hover/cursory only change if there's an onClick
* adding info label, breaking gallery out to its own story
* linting
* fixing bad class name
* now with fading!
* now supporting additional (non-bootstrap) label styles
* adding new secondary/primary labels to gallery
* fixing map key react warning
* using the new secondary label in the ChartList view
* linting
* fixing TS issue
* fix: removing unsupported modal sizes
* linting!
* NOT specifying bsSize seems to have the same effect as (unsupported) "medium"
* supporting 'large' and 'small' over 'lg' and 'sm'
* fixing last-of-type specificity
* Simplifying/consolidating styles
* fixing filterbox in explore
* linting
* adding some px to font sizes
* fixing in-dash overflow
* removing px for one special fontsize case
* simplifying, addressing comments
* widen the autocomplete menu for table names
* display the full table name in a tooltip
* license
* Update superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx
Co-authored-by: Evan Rusackas <evan@preset.io>
* src importing
* move autocomplete width css to main.less
* use html title attribute instead of tooltip
Co-authored-by: Evan Rusackas <evan@preset.io>
* chore: TypeScript <Label />
* rebase
* chore: TypeScript <Label />
* rebase
* A bunch o' test fixes. One more to go!
* helper for mountying Emotional components with Enzyme
* asf license
* fixed last test, some linting
* improve the storybook
* Adressing comments
Co-authored-by: Evan Rusackas <evan@preset.io>
* fix: show label for filters in filter box in explore
* test: add test for label in filter box
* test: add test / fix lint
* fix: fix CR notes
* refactor: add label propType to FilterBoxItemControl.jsx
* feat: improve filter control tooltips
* add styles
* break out utils into own file
* lint
* add tests
* styled component now working
* lint
* add license headers
* replace shallow with mount due to withTheme
Co-authored-by: Evan Rusackas <evan@preset.io>
* fix(log): log crashes if expired or not authenticated
* fix lint and rison
* add tests
* more tests
* perm fix
* fix test not found
* JS lint
* fix Jest test
* migrated LanguagePicker.jsx to tsx
* Migrated Menu.jsx to tsx
* migrated MenuObject.jsx to tsx
* migrated NewMenu.jsx to tsx
* Migrated UserMenu.jsx to tsx
* removed unnecessary export from UserMenu
* added language definition in LanguagePicker
* removed unnecessary exports from Menu.tsx
* used typeof guard for childs
* changed LanguageProps to Languages
* removed unnecessary type casting
* fixed linting errors
* style: SIP-34 labels
Aligning with SIP-34 designs for labels/pills. Going uppercase fixes the
padding issues we had before, and the rounder pills look better.
Cleaning up some CSS in the process
* lint
* chore: wiring ControlLabel to a new FormLabel
Creating new simple <FormLabel /> component and wiring all <label>
and react-bootstrap.ControlLabel towards it.
FormLabel becomes a pivotal point that can be altered to point to AntD
when we're ready.
* lint
* ViewportControl
* addressing comments
* feat: SIP-34 explore save modal
* using a const for the session storage key
* backend changes
* minor tweaks
* more tweaks
* radio cosmetics
* styles
* fix tests
* CreatableSelect\!
* Fix cypress & lint
* fix unit
* lint
* 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.
* 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
* fix: API marshmallow3 drop utc for naive datetime fields
* fix: API marshmallow3 drop utc for naive datetime fields
* fix, tests
* isort and test
* black
* add and fix test
* fix comment
I'm working on a talk for the Airflow Summit
"Advanced Apache Superset for Data Engineers" and showing the "Schedule
Query" feature that Beto contributed a while back (behind a feature flag).
I found that the glyphicons used in `react-json-schema` are broken and
came up with an easy fix.
Also other minor tweaks on the feature.
* [WIP] Typeahead dashboard filter_box
* Make it work
* add config option for async filter_box
* enable for > 1000 options only
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
* out with the old, in with the new
* vertically centering logo once and for all
* lint: black instead of IDE formating
* touch config.py
* Styles -> StyledHeader
* nixing vestigial SVG
* removing trademark
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
* feat: add database dropdown to dashboard import
Currently, when importing a database from a JSON file, the process
looks at the database name from the source (the info is in the file)
and matches the datasources to that name. If no database by that name
exists, it simply fails.
With this PR, we add a database dropdown that allows the user to specify
which databases the datasources should target as the get upserted.
I want to stress that the code in this area is not in a great shape,
and that the challenge of serializing/deser the nested objects is
challenging, but that there should be a much better way to do this.
One of the improvement (out of scope for this PR) that would allow to
simplify those import/export would be to use UUIDs for
importable/exportable objects.
Another identified issue is the indirections between
`utils/import_expor_{model}.py` on top of `{Model}.import_object`. Not
addressing that here.
Next topic is the MVC stuff. Decided to stick with it for now as this is
more of a [obious missing feat:] than a rewrite.
* isort \!? 0%^$%Y$&?%$^?%0^?
* fix tests
* pre-committing to py3.6
* address dpgaspar's comments
* revert isort
* fix: reordering DOM output, simplifying styles, Emotionalizing
* simplification
* converting RefreshChartOverlay to TS
* Loading -> TS, stripping unused size prop
* simplification...
* just letting "position" prop act as a class name. Simpler!
* consolidating styles, changing a className prop to a position prop.
* nixing (unused) classname prop
* replacing inline loading img with the proper Loading component
* BY THERE.
* position prop is optional!
Glyphicons stopped working recently, not sure why, but let's get rid of
them and double down on font-awesome that we use a lot more in the
codebase. There's only a few instances of glyphicons and they all are
broken ATM.
Also a few other minor style tweaks
* remove word cloud from viz.py
* Fix Run in SQL Lab
* remove deprecated python tests
* break out legacy endpoint type into function
* Break out exploreChart from exportChart and implement results type
* Fix jest tests and refactor accordingly
* lint
* Rename v1 payload function
* Add dashboard id to v1 chart data request url params
* Add support for domain sharding to v1 chart data request
* refactor(frontend): move utils to typescript (#9101)
* refactor(frontend): don't export interfaces
* test(frontend): update types and test for isValidChild
* bumping style package (now with typography styles!)
* ThemeProvider ALL the things!
* package lock
* linting
* no need to parseInt here anymore, the values are numeric now.
* feat: upgrade react-select v1.3.0 to v3.1.0
Upgrade `react-select`, replace `react-virtualized-select` with a custom
solution implemented with `react-window`.
Future plans include deprecate `react-virtualized` used in other places, too.
Migrate all react-select related components to `src/Components/Select`.
* Fix new list view
* Fix tests
* Address PR comments
* Fix a flacky Cypress test
* Adjust styles for Select in CRUD ListView
* Fix loadOptions for owners select in chart PropertiesModal
TODO: add typing support for AsyncSelect props.
* Address PR comments; allow isMulti in SelectControl, too
* Clean up NaN in table filter values
* Fix flacky test
* feat: bump superset-ui/time-format and big-number
This is for adding full dates to big number datetime formatted
by weekly interval.
* Bump time-format to v0.13.15
to bring in https://github.com/apache-superset/superset-ui/pull/493
* 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
* fix: invalid JSON in FR translation
* fix: broken or misformatted translations and add unit test for JSON validty
* Move translation lint test to CI task
* calling new chart api (mostly working)
* can't .then when the promise has already been await-ed
* Add handling for v1 API response
* comment
* update word cloud plugin & dependencies
* testing
* try just waiting
* Revert "try just waiting"
This reverts commit 10c092effd.
* tweaking bootstrap types
* Bumping word cloud package version
* new package lock
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Searching for 'equ' in AdhocFilter's operator dropdown doesn't find the
options who's label contain that substring.
I'd write a unit test but it's pretty tricky.
* Expose additional APP_ICON_WIDTH python config variable to ui via app bootstrap for use in Menu
* Update base.py to inclue APP_ICON_WIDTH via bracket notation instead of .get and adjust Menu proptypes to be required.
Co-authored-by: Natalie Ruhe <nruhe@nruhe.attlocal.net>
Co-authored-by: Natalie Ruhe <natalie@preset.io>
* improve history for query params
* fix: push browser history on pagination in react listviews
* fix spec
Co-authored-by: Tai Dupree <tdupreetan@gmail.com>
* build: collect code coverage from Cypress
Collect frontend code coverage reports from Cypress tests and add
proper tagging for all tests.
* Fix bash script lint error from shellcheck
* Revert Cypress to 4.3.0 to see if it fixes a failing test
* importing... this is going to break CI, but there it is.
* adding validator package.
* pluralization - maybe it should be plural, but whatevs
* updating validators to match new exports
* removing old validators
* lintage ✨
* validateNumeric -> validateNumber
* using legacyValidateInteger, legacyValidateNumber
* linting ✨
* removing extraneous package lock file
* control to turn off table bar-chart backgrounds
* flipping enable to disable, to support existing charts
* lint ✨
* Turn ON to enable (reversing logic)
* bumping big number chart
* ling ✨
* Visualize after running Ctas query (#4)
* Visualize after running Ctas query.
Stub for table viz
Work on the viz
Add JS functionality for Ctas viz
Add test for the table viz flow
Fix test
Add js test for the ctas viz
* Fix tests
* Resolve comments
* Leverate tmpSchema in the query object
* Fix i18n string
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
Change from "100 years go" to "no filter".
100 years ago is basically equivalent to no filter, but has
implications on how x-axis is plotted on certain charts (e.g. Big
Number).
* filter owners select by text input
* use rison
* fix backend owners filter logic
* use fullname, not username on owners inputs
* fix some tests
* fixing tests
* deterministic tests
* appease linter
* add back search by username
* more comprehensive filter test
* add clarifying text
* formatting...
* Fix hot reload for charts
* Override tsc options for plugins
Plugins will sometimes have their own `tsconfig.json`, which will
interfere with the dev server config if configured inappropriately.
This change makes sure `tsc` (and `ts-loader`) always compiles to
`esnext` modules, so we don't get "Uncaught ReferenceError: exports
is not defined" error.
* Use manifest hooks for dev server proxy
* Rewrite dashboard/App.jsx to supress Redux error in hot reload
* Update ChartRenderer to allow hot realod in Explore
* Fix hot reload in dashboars as well
* Revert changes to ChartRenderer.jsx
Will submit in another PR.
* Clean up
* [explore view] fix long query issue from Run in SQL LAB Button
* SQL Lab page needs to take the post form data, too
* fix variable names
* updated payload dict, rename hidden form
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
* feat: [explore] don't save filters inherited from a dashboard
When navigating to explore from a dashboard context, the current
dashboard filter(s) are passed along to explore so that the context is
kept. So say you're filtering on "country=Romania", in your dashboard
and pivot to explore, that filter is still there and keep on exploring.
Now a common issue is that you'll want to make some tweak to your chart
that are unrelated to the filter, say toggling the legend off for
instance, and then save it. Now you back to your dashboard and even
though you started with an "all countries" dashboard, with a global
filter on country, now that one chart is stuck on "Romania". Typically
you notice this when filtering on something else, say "Italy" and then
that one chart now has two mutually exclusive filters, and show "No data".
Now, the fix is to flag the filter as "extra" (that's the not-so-good internal
name we use for these inherited filters) and make it clear that that
specific filter is special and won't be saved when saving the chart.
* fix build
* Upgrade webpack, babel and React
* Upgrade all Babel related packages
Also remove babel-plugin-css-modules-transform that is not in use.
* Remvoe tslib as dependency
* Remove unnecesary packages
One of the pain points in developing Superset frontend code is the lack
of testing data. Local installation often do not have enough examples
setup to test all edge cases.
This change allows `webpack-dev-server` to proxy to any remote Superset
service, but the same time replaces frontend asset references in HTML
with links to local development version. This allows developers to test
with production data locally, tackling edge cases all while maintaining
the productivity of editing the code locally.
* typescriptification
* use the chart edit modal on the react list view
* linting
* typings don't work on old react-bootstrap version
* lint
* remove duplicate field
* [datasets] new, react listview
* add hidden columns to support filtering by columns not rendered
* throw exception if config is incorrect
* fix database filter
* update endpoints to point to datasets; fix translation strings
* move Link into src/components
* add add new record button to datasets listview
* fix: change database save in DatasourceEditor
This addresses the issue where pointing a datasource to another database
in the datasource editor is not reflected.
Also addresses:
- a minorcosmetic issue in the datasource editor.
- user/owners list not getting populated
* tests
* All the fonts!
* dynamic loading
* folderizing fonts by family
* Shuffling files, getting rid off LESS fanciness
* Fira Mono, consolidating on "specimen" for LESS filenames
* Fira Code
* switch for enabling ligatures
* ligatures off for now
* license
* nixing Fira Mono, using OTF features instead.
* Add feature flags to control query sharing, KV exposure
* Add tests, fix bug
* Skip test for kv endpoints when they are disabled
* ESLint fixes
* Remove unnecessary binds
* Fix eslint errors
* Add note to UPDATING.md RE: new feature flag options
* Use expanded version of RBAC
* Enable KV_STORE and SHARE_QUERIES_VIA_KV_STORE feature flags in the test environment
* Fix black