You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/08/01 10:52:45 UTC

[GitHub] [incubator-echarts] susiwen8 opened a new pull request #13067: Optimize: disable tooltip transition at first show

susiwen8 opened a new pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067


   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [ ] bug fixing
   - [ ] new feature
   - [x] others
   
   
   
   ### What does this PR do?
   The first time of showing `tooltip` on each chart,  because of `transition`, `tooltip` rise from the bottom. So disable transition on the first time
   
   
   ### Fixed issues
   
   <!--
   - #xxxx: ...
   -->
   
   
   ## Details
   
   ### Before: What was the problem?
   
   <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   
   
   ### After: How is it fixed in this PR?
   
   <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. -->
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
   
   
   ## Usage
   
   ### Are there any API changes?
   
   - [ ] The API has been changed.
   
   <!-- LIST THE API CHANGES HERE -->
   
   
   
   ### Related test cases or examples to use the new APIs
   
   NA.
   
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### Other information
   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] susiwen8 commented on a change in pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
susiwen8 commented on a change in pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#discussion_r465501888



##########
File path: src/component/tooltip/TooltipHTMLContent.ts
##########
@@ -355,6 +354,7 @@ class TooltipHTMLContent {
         el.style.pointerEvents = this._enterable ? 'auto' : 'none';
 
         this._show = true;
+        this._firstShow && (this._firstShow = false);

Review comment:
       Force of habbit :smile




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang commented on a change in pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#discussion_r465497344



##########
File path: src/component/tooltip/TooltipHTMLContent.ts
##########
@@ -355,6 +354,7 @@ class TooltipHTMLContent {
         el.style.pointerEvents = this._enterable ? 'auto' : 'none';
 
         this._show = true;
+        this._firstShow && (this._firstShow = false);

Review comment:
       I think this condition is not necessary. The expression can be simply
   ```js
   this._show = true;
   this._firstShow = false;
   ```




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] susiwen8 edited a comment on pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
susiwen8 edited a comment on pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#issuecomment-669033507


   > Hi @susiwen8. Just a suggestion that we should use more clear commits message. For example https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary
   > 
   > It's not a good style to use a very general and unclear message like "Coorection base CR"
   
   Roger that :stuck_out_tongue:


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang merged pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
pissang merged pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067


   


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#issuecomment-667512890


   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/incubator-echarts/wiki/How-to-make-a-pull-request).


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] susiwen8 commented on pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
susiwen8 commented on pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#issuecomment-669033507


   > Hi @susiwen8. Just a suggestion that we should use more clear commits message. For example https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary
   > 
   > It's not a good style to use a very general and unclear message like "Coorection base CR"
   
   Roger that


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#issuecomment-669036390


   Congratulations! Your PR has been merged. Thanks for your contribution! 👍


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang commented on pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
pissang commented on pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#issuecomment-669028682


   Hi @susiwen8. Just a suggestion that we should use more clear commits message. For example https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary
   
   It's not a good style to use a very general and unclear message like "Coorection base CR"


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang commented on a change in pull request #13067: Optimize: disable tooltip transition at first show

Posted by GitBox <gi...@apache.org>.
pissang commented on a change in pull request #13067:
URL: https://github.com/apache/incubator-echarts/pull/13067#discussion_r465523577



##########
File path: src/component/tooltip/TooltipHTMLContent.ts
##########
@@ -153,7 +151,7 @@ function assembleCssText(tooltipModel: Model<TooltipOption>) {
     cssText.push('box-shadow:' + boxShadow);
     // Animation transition. Do not animate when transitionDuration is 0.
     // If tooltip show arrow, then disable transition
-    transitionDuration
+    !isFirstShow && transitionDuration
         && !(['top', 'left', 'bottom', 'right'].includes(tooltipModel.get('position') as string))
         && tooltipModel.get('trigger') !== 'item'

Review comment:
       Didn't notice it before. But we should use `zrUtil.indexOf` instead of `includes` here. 
   
   Also in the `assembleArrow` function also has `includes` usage. Which should be changed.




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org