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

57 add warnings #91

Merged
merged 2 commits into from
Jul 11, 2017
Merged

57 add warnings #91

merged 2 commits into from
Jul 11, 2017

Conversation

alison985
Copy link

#57

I tried to make
JSON.stringify(this.visualization.options.columnMapping) a variable
to avoid repeating it, but if I make it a let the linter throws an
error and if I make it a const then it doesn’t change with the UI and
the logic doesn’t work. :(

mozilla#57

I tried to make
`JSON.stringify(this.visualization.options.columnMapping)` a variable
to avoid repeating it, but if I make it a `let` the linter throws an
error and if I make it a `const` then it doesn’t change with the UI and
the logic doesn’t work. :(
@@ -33,10 +33,18 @@ <h4 class="modal-title">Visualization Editor</h4>
<div class="col-md-7" style="border: 1px solid #eee">
<visualization-renderer visualization="$ctrl.visualization" query-result="$ctrl.queryResult"></visualization-renderer>
</div>
<div class="col-md-7">
<div class="bg-warning" ng-if="$ctrl.visualization.options.series.stacking == null && $ctrl.has3plusColumnsFunction()" style="padding:2%;" ng-bind-html="$ctrl.warning_three_column_stacking">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not do inline styles please. Also 2% may not work too well maybe something as a 'px' value.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spasovski What's the right file to add a CSS class in?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arik prefers creating a CSS file for each component and then requiring it since webpack will do the rest. Not a personal fan of importing CSS this way but we should stick to it for consistency. See https://github.com/getredash/redash/pull/1569/files#diff-855c4fc3efcfee2ac69a13e2f2810ecbR3 for reference.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Updated.

@@ -19,6 +19,9 @@ const EditVisualizationDialog = {
this.visualization = copy(this.originalVisualization);
this.visTypes = Visualization.visualizationTypes;

this.warning_three_column_groupby = '<b>You have more than 2 columns in your result set.</b> To ensure the chart is accurate, please do one of the following: <ul> <li>Change the SQL query to give 2 result columns. You can CONCAT() columns together if you wish.</li> <LI>Select column(s) to group by.</LI> </ul>';
this.warning_three_column_stacking = '<B>You have more than 2 columns in your result set.</b> You may wish to make the Stacking option equal to `Enabled` or `Percent`.';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do lowercase HTML tags for consistency.

@alison985 alison985 added this to the 6 milestone Jul 7, 2017
@spasovski
Copy link

Looks great thanks!

@spasovski spasovski merged commit 2a69e90 into mozilla:master Jul 11, 2017
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