Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(explore): improve UI in the control panel #19748

Merged
merged 3 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const advancedAnalyticsControls: ControlPanelSectionConfig = {
'of query results',
),
controlSetRows: [
[<h1 className="section-header">{t('Rolling window')}</h1>],
[<div className="section-header">{t('Rolling window')}</div>],
[
{
name: 'rolling_type',
Expand Down Expand Up @@ -85,7 +85,7 @@ export const advancedAnalyticsControls: ControlPanelSectionConfig = {
},
},
],
[<h1 className="section-header">{t('Time comparison')}</h1>],
[<div className="section-header">{t('Time comparison')}</div>],
[
{
name: 'time_compare',
Expand Down Expand Up @@ -136,7 +136,7 @@ export const advancedAnalyticsControls: ControlPanelSectionConfig = {
},
},
],
[<h1 className="section-header">{t('Resample')}</h1>],
[<div className="section-header">{t('Resample')}</div>],
[
{
name: 'resample_rule',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const titleControls: ControlPanelSectionConfig = {
tabOverride: 'customize',
expanded: true,
controlSetRows: [
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],
[
{
name: 'x_axis_title',
Expand Down Expand Up @@ -56,7 +56,7 @@ export const titleControls: ControlPanelSectionConfig = {
},
},
],
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],
[
{
name: 'y_axis_title',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ export default function RadioButtonControl({
'.control-label + .btn-group': {
marginTop: 1,
},
'.btn-group .btn-default': {
color: theme.colors.grayscale.dark1,
},
'.btn-group .btn.active': {
background: theme.colors.secondary.light5,
background: theme.colors.grayscale.light4,
fontWeight: theme.typography.weights.bold,
boxShadow: 'none',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ const config: ControlPanelConfig = {
),
controlSetRows: [
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Rolling Window')}</h1>],
[<div className="section-header">{t('Rolling Window')}</div>],
[
{
name: 'rolling_type',
Expand Down Expand Up @@ -292,7 +292,7 @@ const config: ControlPanelConfig = {
},
],
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Time Comparison')}</h1>],
[<div className="section-header">{t('Time Comparison')}</div>],
[
{
name: 'time_compare',
Expand Down Expand Up @@ -341,10 +341,7 @@ const config: ControlPanelConfig = {
},
},
],
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Python Functions')}</h1>],
// eslint-disable-next-line react/jsx-key
[<h2 className="section-header">pandas.resample</h2>],
[<div className="section-header">{t('Resample')}</div>],
[
{
name: 'resample_rule',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const config: ControlPanelConfig = {
),
controlSetRows: [
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Rolling Window')}</h1>],
[<div className="section-header">{t('Rolling Window')}</div>],
[
{
name: 'rolling_type',
Expand Down Expand Up @@ -175,7 +175,7 @@ const config: ControlPanelConfig = {
},
],
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Time Comparison')}</h1>],
[<div className="section-header">{t('Time Comparison')}</div>],
[
{
name: 'time_compare',
Expand Down Expand Up @@ -224,10 +224,7 @@ const config: ControlPanelConfig = {
},
},
],
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Python Functions')}</h1>],
// eslint-disable-next-line react/jsx-key
[<h2 className="section-header">pandas.resample</h2>],
[<div className="section-header">{t('Resample')}</div>],
[
{
name: 'resample_rule',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export const timeSeriesSection: ControlPanelSectionConfig[] = [
'of query results',
),
controlSetRows: [
[<h1 className="section-header">{t('Rolling Window')}</h1>],
[<div className="section-header">{t('Rolling Window')}</div>],
[
{
name: 'rolling_type',
Expand Down Expand Up @@ -423,7 +423,7 @@ export const timeSeriesSection: ControlPanelSectionConfig[] = [
},
},
],
[<h1 className="section-header">{t('Time Comparison')}</h1>],
[<div className="section-header">{t('Time Comparison')}</div>],
[
{
name: 'time_compare',
Expand Down Expand Up @@ -474,8 +474,7 @@ export const timeSeriesSection: ControlPanelSectionConfig[] = [
},
},
],
[<h1 className="section-header">{t('Python Functions')}</h1>],
[<h2 className="section-header">pandas.resample</h2>],
[<div className="section-header">{t('Resample')}</div>],
[
{
name: 'resample_rule',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
controlSetRows: [['metric'], ['adhoc_filters']],
},
{
label: t('Options'),
label: t('Display settings'),
expanded: true,
tabOverride: 'data',
controlSetRows: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const config: ControlPanelConfig = {
expanded: false,
controlSetRows: [
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Rolling Window')}</h1>],
[<div className="section-header">{t('Rolling Window')}</div>],
[
{
name: 'rolling_type',
Expand Down Expand Up @@ -217,8 +217,7 @@ const config: ControlPanelConfig = {
},
},
],
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Resample')}</h1>],
[<div className="section-header">{t('Resample')}</div>],
[
{
name: 'resample_rule',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const config: ControlPanelConfig = {
['color_scheme'],
...funnelLegendSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Labels')}</h1>],
[<div className="section-header">{t('Labels')}</div>],
[
{
name: 'label_type',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const config: ControlPanelConfig = {
label: t('Chart Options'),
expanded: true,
controlSetRows: [
[<h1 className="section-header">{t('General')}</h1>],
[<div className="section-header">{t('General')}</div>],
[
{
name: 'min_val',
Expand Down Expand Up @@ -197,7 +197,7 @@ const config: ControlPanelConfig = {
},
},
],
[<h1 className="section-header">{t('Axis')}</h1>],
[<div className="section-header">{t('Axis')}</div>],
[
{
name: 'show_axis_tick',
Expand Down Expand Up @@ -236,7 +236,7 @@ const config: ControlPanelConfig = {
},
},
],
[<h1 className="section-header">{t('Progress')}</h1>],
[<div className="section-header">{t('Progress')}</div>],
[
{
name: 'show_progress',
Expand Down Expand Up @@ -277,7 +277,7 @@ const config: ControlPanelConfig = {
},
},
],
[<h1 className="section-header">{t('Intervals')}</h1>],
[<div className="section-header">{t('Intervals')}</div>],
[
{
name: 'intervals',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const controlPanel: ControlPanelConfig = {
controlSetRows: [
['color_scheme'],
...legendSection,
[<h1 className="section-header">{t('Layout')}</h1>],
[<div className="section-header">{t('Layout')}</div>],
[
{
name: 'layout',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function createCustomizeSection(
controlSuffix: string,
): ControlSetRow[] {
return [
[<h1 className="section-header">{label}</h1>],
[<div className="section-header">{label}</div>],
[
{
name: `seriesType${controlSuffix}`,
Expand Down Expand Up @@ -296,7 +296,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],
['x_axis_time_format'],
[
{
Expand All @@ -320,7 +320,7 @@ const config: ControlPanelConfig = {
],
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],
[
{
name: 'minorSplitLine',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const config: ControlPanelConfig = {
],
...legendSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Labels')}</h1>],
[<div className="section-header">{t('Labels')}</div>],
[
{
name: 'label_type',
Expand Down Expand Up @@ -196,7 +196,7 @@ const config: ControlPanelConfig = {
},
],
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Pie shape')}</h1>],
[<div className="section-header">{t('Pie shape')}</div>],
[
{
name: 'outerRadius',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const config: ControlPanelConfig = {
controlSetRows: [
['color_scheme'],
...legendSection,
[<h1 className="section-header">{t('Labels')}</h1>],
[<div className="section-header">{t('Labels')}</div>],
[
{
name: 'show_labels',
Expand Down Expand Up @@ -158,7 +158,7 @@ const config: ControlPanelConfig = {
},
},
],
[<h1 className="section-header">{t('Radar')}</h1>],
[<div className="section-header">{t('Radar')}</div>],
[
{
name: 'column_config',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],
[
{
name: 'x_axis_time_format',
Expand Down Expand Up @@ -213,7 +213,7 @@ const config: ControlPanelConfig = {
],
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],
['y_axis_format'],
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],
[
{
name: 'x_axis_time_format',
Expand Down Expand Up @@ -175,7 +175,7 @@ const config: ControlPanelConfig = {
// eslint-disable-next-line react/jsx-key
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],

['y_axis_format'],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],

[
{
Expand Down Expand Up @@ -156,7 +156,7 @@ const config: ControlPanelConfig = {
// eslint-disable-next-line react/jsx-key
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],
['y_axis_format'],
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],
[
{
name: 'x_axis_time_format',
Expand Down Expand Up @@ -172,7 +172,7 @@ const config: ControlPanelConfig = {
// eslint-disable-next-line react/jsx-key
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],

['y_axis_format'],
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],
[
{
name: 'x_axis_time_format',
Expand Down Expand Up @@ -229,7 +229,7 @@ const config: ControlPanelConfig = {
],
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],
['y_axis_format'],
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const config: ControlPanelConfig = {
},
],
...legendSection,
[<h1 className="section-header">{t('X Axis')}</h1>],
[<div className="section-header">{t('X Axis')}</div>],
[
{
name: 'x_axis_time_format',
Expand Down Expand Up @@ -232,7 +232,7 @@ const config: ControlPanelConfig = {
],
...richTooltipSection,
// eslint-disable-next-line react/jsx-key
[<h1 className="section-header">{t('Y Axis')}</h1>],
[<div className="section-header">{t('Y Axis')}</div>],
['y_axis_format'],
[
{
Expand Down
Loading