Skip to content

Commit

Permalink
Merge branch 'master' into fix_vds_sync
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie authored Apr 1, 2022
2 parents 40c48e8 + eab9388 commit e6b5307
Show file tree
Hide file tree
Showing 50 changed files with 1,498 additions and 1,435 deletions.
1 change: 0 additions & 1 deletion RELEASING/release-notes-1-0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ Some of the new features in this release are disabled by default. Each has a fea
| Dashboard Native Filters | `DASHBOARD_NATIVE_FILTERS: True` | |
| Alerts & Reporting | `ALERT_REPORTS: True` | [Celery workers configured & celery beat process](https://superset.apache.org/docs/installation/async-queries-celery) |
| Homescreen Thumbnails | `THUMBNAILS: TRUE, THUMBNAIL_CACHE_CONFIG: CacheConfig = { "CACHE_TYPE": "null", "CACHE_NO_NULL_WARNING": True}`| selenium, pillow 7, celery |
| Row Level Security | `ROW_LEVEL_SECURITY` | | [Extra Documentation](https://superset.apache.org/docs/security#row-level-security)
| Dynamic Viz Plugin Import | `DYNAMIC_PLUGINS: True` | |

# Stability and Bugfixes
Expand Down
1 change: 0 additions & 1 deletion RESOURCES/FEATURE_FLAGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ These features flags are **safe for production** and have been tested.
- ESCAPE_MARKDOWN_HTML
- ENABLE_TEMPLATE_PROCESSING
- LISTVIEWS_DEFAULT_CARD_VIEW
- ROW_LEVEL_SECURITY
- SCHEDULED_QUERIES [(docs)](https://superset.apache.org/docs/installation/alerts-reports)
- SQL_VALIDATORS_BY_ENGINE [(docs)](https://superset.apache.org/docs/installation/sql-templating)
- SQLLAB_BACKEND_PERSISTENCE
Expand Down
1 change: 1 addition & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ assists people when migrating to a new version.

### Breaking Changes

- [19230](https://github.com/apache/superset/pull/19230): The `ROW_LEVEL_SECURITY` feature flag has been removed (permanently enabled). Any deployments which had set this flag to false will need to verify that the presence of the Row Level Security feature does not interfere with their use case.
- [19168](https://github.com/apache/superset/pull/19168): Celery upgrade to 5.X has breaking changes on it's command line invocation.
Please follow: https://docs.celeryq.dev/en/stable/whatsnew-5.2.html#step-1-adjust-your-command-line-invocation
Consider migrating you celery config if you haven't already: https://docs.celeryq.dev/en/stable/userguide/configuration.html#conf-old-settings-map
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Test explore links', () => {
cy.visitChartByName('Growth Rate');
cy.verifySliceSuccess({ waitAlias: '@chartData' });

cy.get('div#query').click();
cy.get('[aria-label="Menu actions trigger"]').click();
cy.get('span').contains('View query').parent().click();
cy.wait('@chartData').then(() => {
cy.get('code');
Expand All @@ -52,7 +52,12 @@ describe('Test explore links', () => {
cy.visitChartByName('Growth Rate');
cy.verifySliceSuccess({ waitAlias: '@chartData' });

cy.get('[data-test=embed-code-button]').click();
cy.get('[aria-label="Menu actions trigger"]').click();
cy.get('div[title="Share"]').trigger('mouseover');
// need to use [id= syntax, otherwise error gets triggered because of special character in id
cy.get('[id="share_submenu$Menu"]').within(() => {
cy.contains('Embed code').parent().click();
});
cy.get('#embed-code-popover').within(() => {
cy.get('textarea[name=embedCode]').contains('iframe');
});
Expand Down
34 changes: 16 additions & 18 deletions superset-frontend/plugins/legacy-plugin-chart-calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,38 @@
"name": "@superset-ui/legacy-plugin-chart-calendar",
"version": "0.18.25",
"description": "Superset Legacy Chart - Calendar Heatmap",
"sideEffects": [
"*.css"
],
"main": "lib/index.js",
"module": "esm/index.js",
"files": [
"esm",
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/apache-superset/superset-ui.git"
},
"keywords": [
"superset"
],
"author": "Superset",
"license": "Apache-2.0",
"homepage": "https://github.com/apache-superset/superset-ui#readme",
"bugs": {
"url": "https://github.com/apache-superset/superset-ui/issues"
},
"homepage": "https://github.com/apache-superset/superset-ui#readme",
"publishConfig": {
"access": "public"
"repository": {
"type": "git",
"url": "git+https://github.com/apache-superset/superset-ui.git"
},
"license": "Apache-2.0",
"author": "Superset",
"main": "lib/index.js",
"module": "esm/index.js",
"files": [
"esm",
"lib"
],
"dependencies": {
"d3-array": "^2.0.3",
"d3-selection": "^1.4.0",
"d3-tip": "^0.9.1",
"prop-types": "^15.6.2"
},
"peerDependencies": {
"@emotion/react": "^11.4.1",
"@superset-ui/chart-controls": "*",
"@superset-ui/core": "*",
"react": "^16.13.1"
},
"publishConfig": {
"access": "public"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { extent as d3Extent, range as d3Range } from 'd3-array';
import { select as d3Select } from 'd3-selection';
import { getSequentialSchemeRegistry } from '@superset-ui/core';
import CalHeatMap from './vendor/cal-heatmap';
import './vendor/cal-heatmap.css';

const propTypes = {
data: PropTypes.shape({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,69 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import { reactify, styled } from '@superset-ui/core';
import { reactify, styled, css } from '@superset-ui/core';
import { Global } from '@emotion/react';
import Component from './Calendar';

const ReactComponent = reactify(Component);

const Calender = ({ className, ...otherProps }) => (
<div className={className}>
<Global
styles={theme => css`
.d3-tip {
line-height: 1;
padding: ${theme.gridUnit * 3}px;
background: ${theme.colors.grayscale.dark2};
color: ${theme.colors.grayscale.light5};
border-radius: 4px;
pointer-events: none;
z-index: 1000;
font-size: ${theme.typography.sizes.s}px;
}
/* Creates a small triangle extender for the tooltip */
.d3-tip:after {
box-sizing: border-box;
display: inline;
font-size: ${theme.typography.sizes.xs};
width: 100%;
line-height: 1;
color: ${theme.colors.grayscale.dark2};
position: absolute;
pointer-events: none;
}
/* Northward tooltips */
.d3-tip.n:after {
content: '\\25BC';
margin: -${theme.gridUnit}px 0 0 0;
top: 100%;
left: 0;
text-align: center;
}
/* Eastward tooltips */
.d3-tip.e:after {
content: '\\25C0';
margin: -${theme.gridUnit}px 0 0 0;
top: 50%;
left: -${theme.gridUnit * 2}px;
}
/* Southward tooltips */
.d3-tip.s:after {
content: '\\25B2';
margin: 0;
top: -${theme.gridUnit * 2}px;
left: 0;
text-align: center;
}
/* Westward tooltips */
.d3-tip.w:after {
content: '\\25B6';
margin: -${theme.gridUnit}px 0 0 0px;
top: 50%;
left: 100%;
}
`}
/>
<ReactComponent {...otherProps} />
</div>
);
Expand All @@ -39,14 +95,143 @@ Calender.propTypes = {
};

export default styled(Calender)`
.superset-legacy-chart-calendar {
padding: 10px;
position: static !important;
overflow: auto !important;
}
.superset-legacy-chart-calendar .ch-tooltip {
margin-left: 20px;
margin-top: 5px;
}
${({ theme }) => `
.superset-legacy-chart-calendar {
padding: ${theme.gridUnit * 3}px;
position: static !important;
overflow: auto !important;
}
.superset-legacy-chart-calendar .ch-tooltip {
margin-left: ${theme.gridUnit * 5}px;
margin-top: ${theme.gridUnit}px;
}
.superset-legacy-chart-calendar .d3-tip {
line-height: 1;
padding: ${theme.gridUnit * 3}px;
background: ${theme.colors.grayscale.dark2};
color: ${theme.colors.grayscale.light5};
border-radius: ${theme.borderRadius}px;
pointer-events: none;
z-index: 1000;
}
.cal-heatmap-container {
display: block;
}
.cal-heatmap-container .graph-label {
fill: ${theme.colors.grayscale.base};
font-size: ${theme.typography.sizes.xs}px;
}
.cal-heatmap-container .graph,
.cal-heatmap-container .graph-legend rect {
shape-rendering: crispedges;
}
.cal-heatmap-container .graph-rect {
fill: ${theme.colors.grayscale.light2};
}
.cal-heatmap-container .graph-subdomain-group rect:hover {
stroke: ${theme.colors.grayscale.dark2};
stroke-width: 1px;
}
.cal-heatmap-container .subdomain-text {
font-size: ${theme.typography.sizes.xs}px;
pointer-events: none;
}
.cal-heatmap-container .hover_cursor:hover {
cursor: pointer;
}
.cal-heatmap-container .qi {
background-color: ${theme.colors.grayscale.base};
fill: ${theme.colors.grayscale.base};
}
.cal-heatmap-container .q1 {
background-color: ${theme.colors.alert.light2};
fill: ${theme.colors.alert.light2};
}
.cal-heatmap-container .q2 {
background-color: ${theme.colors.alert.light1};
fill: ${theme.colors.alert.light1};
}
.cal-heatmap-container .q3 {
background-color: ${theme.colors.success.light1};
fill: ${theme.colors.success.light1};
}
.cal-heatmap-container .q4 {
background-color: ${theme.colors.success.base};
fill: ${theme.colors.success.base};
}
.cal-heatmap-container .q5 {
background-color: ${theme.colors.success.dark1};
fill: ${theme.colors.success.dark1};
}
.cal-heatmap-container rect.highlight {
stroke: ${theme.colors.grayscale.dark1};
stroke-width: 1;
}
.cal-heatmap-container text.highlight {
fill: ${theme.colors.grayscale.dark1};
}
.cal-heatmap-container rect.highlight-now {
stroke: ${theme.colors.error.base};
}
.cal-heatmap-container text.highlight-now {
fill: ${theme.colors.error.base};
font-weight: ${theme.typography.weights.bold};
}
.cal-heatmap-container .domain-background {
fill: none;
shape-rendering: crispedges;
}
.ch-tooltip {
padding: ${theme.gridUnit * 2}px;
background: ${theme.colors.grayscale.dark1};
color: ${theme.colors.grayscale.light1};
font-size: ${theme.typography.sizes.s}px;
line-height: 1.4;
width: 140px;
position: absolute;
z-index: 99999;
text-align: center;
border-radius: ${theme.borderRadius}px;
box-shadow: 2px 2px 2px ${theme.colors.grayscale.dark2};
display: none;
box-sizing: border-box;
}
.ch-tooltip::after {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
content: '';
padding: 0;
display: block;
bottom: -${theme.gridUnit}px;
left: 50%;
margin-left: -${theme.gridUnit}px;
border-width: ${theme.gridUnit}px ${theme.gridUnit}px 0;
border-top-color: ${theme.colors.grayscale.dark1};
}
`}
`;
Loading

0 comments on commit e6b5307

Please sign in to comment.