You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/18 17:23:12 UTC

[GitHub] [superset] prosdev0107 opened a new pull request, #19765: fix(chart & explore): make to show label of slidercontrol

prosdev0107 opened a new pull request, #19765:
URL: https://github.com/apache/superset/pull/19765

   ### SUMMARY
   [Charts in explore] Labels are missing for some controls on Customize tab (Graph chart)
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   BEFORE:
   ![image](https://user-images.githubusercontent.com/47900232/163846843-648ae65a-d44d-4b13-bb41-13b2ae106cca.png)
   
   AFTER:
   ![Screenshot-GraphChart](https://user-images.githubusercontent.com/47900232/163846414-0c300db3-e230-4fc9-8ee5-3f407fcf52c1.png)
   
   ### TESTING INSTRUCTIONS
   **How to reproduce issues**
   
   1. Open a graph chart in explore
   2. Toggle to Customize tab
   3. Pay attention to the controls at the bottom
   
   This issue is happened on some other charts as well as Graph chart
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] diegomedina248 commented on a diff in pull request #19765: fix(chart & explore): make to show label of slidercontrol

Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on code in PR #19765:
URL: https://github.com/apache/superset/pull/19765#discussion_r852287150


##########
superset-frontend/src/explore/components/controls/SliderControl.tsx:
##########
@@ -16,21 +16,65 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
+import React, { ReactNode } from 'react';
 import Slider from 'src/components/Slider';
 import ControlHeader from 'src/explore/components/ControlHeader';
 
 type SliderControlProps = {
   onChange: (value: number) => void;
   value: number;
   default?: number;
+  name: string;
+  description: string;
+
+  // ControlHeader props
+  label: string;
+  renderTrigger?: boolean;
+  validationErrors?: string[];
+  rightNode?: ReactNode;
+  leftNode?: ReactNode;
+  hovered?: boolean;
+  warning?: string;
+  danger?: string;
+  onClick?: () => void;
+  tooltipOnClick?: () => void;
 };
 
 export default function SliderControl(props: SliderControlProps) {
-  const { onChange = () => {}, default: defaultValue, ...rest } = props;
+  const {

Review Comment:
   Move this to the function declaration please



##########
superset-frontend/src/explore/components/controls/SliderControl.tsx:
##########
@@ -16,21 +16,65 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
+import React, { ReactNode } from 'react';
 import Slider from 'src/components/Slider';
 import ControlHeader from 'src/explore/components/ControlHeader';
 
 type SliderControlProps = {
   onChange: (value: number) => void;
   value: number;
   default?: number;
+  name: string;

Review Comment:
   You can use the `ControlHeaderProps` like so:
   ```js
   type SliderControlProps = ControlHeaderProps & {
     onChange: (value: number) => void;
     value: number;
     default?: number;
   };
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas merged pull request #19765: fix(chart & explore): Show labels for `SliderControl`

Posted by GitBox <gi...@apache.org>.
rusackas merged PR #19765:
URL: https://github.com/apache/superset/pull/19765


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #19765: fix(chart & explore): make to show label of slidercontrol

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #19765:
URL: https://github.com/apache/superset/pull/19765#issuecomment-1101618528

   # [Codecov](https://codecov.io/gh/apache/superset/pull/19765?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19765](https://codecov.io/gh/apache/superset/pull/19765?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (969e914) into [master](https://codecov.io/gh/apache/superset/commit/cf5145918ba6da3b8b803bed86ad7ca22d50494a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf51459) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #19765      +/-   ##
   ==========================================
   - Coverage   66.51%   66.50%   -0.01%     
   ==========================================
     Files        1687     1687              
     Lines       64618    64620       +2     
     Branches     6646     6646              
   ==========================================
     Hits        42978    42978              
   - Misses      19940    19942       +2     
     Partials     1700     1700              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.18% <0.00%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19765?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../src/explore/components/controls/SliderControl.tsx](https://codecov.io/gh/apache/superset/pull/19765/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9TbGlkZXJDb250cm9sLnRzeA==) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19765?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19765?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cf51459...969e914](https://codecov.io/gh/apache/superset/pull/19765?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org