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

fix(toolbox): optimize stack icon toggle experience. #12360

Closed
wants to merge 6 commits into from

Conversation

plainheart
Copy link
Member

@plainheart plainheart commented Mar 31, 2020

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

  1. if stack status is not emphasis, currentType in magictypechanged event should be tiled(Magictype Event #12359)
  2. improve stack icon toggle experience
  3. emphasized stack icon by default if there are two or more than two series having the same stack value.
  4. fix a bug that language of title switched to Chinese after clicking stack button.(fix Stack tool switches language back to original when pressed  #12667, tweak fix(toolbox): improve #11367 #11743)

image

Fixed issues

Related test cases

Test case: refer to test/toolbox-stackTiledToggle.html

@echarts-bot
Copy link

echarts-bot bot commented Mar 31, 2020

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@plainheart plainheart changed the title fix(toolbox/feature): the event magictypechanged should be the type tiled if stack is not enabled. close #12359. fix(toolbox/feature): the event magictypechanged should return the type tiled if stack is not enabled. close #12359. Mar 31, 2020
@pissang pissang added this to the 4.9.0 milestone Apr 4, 2020
@plainheart plainheart changed the title fix(toolbox/feature): the event magictypechanged should return the type tiled if stack is not enabled. close #12359. (WIP) fix(toolbox/feature): the event magictypechanged should return the type tiled if stack is not enabled. close #12359. May 20, 2020
@plainheart
Copy link
Member Author

Converted to draft, there are still some work to be done.
Related issues #12667, #11743, #12359

@plainheart plainheart marked this pull request as draft May 20, 2020 04:12
@plainheart plainheart changed the title (WIP) fix(toolbox/feature): the event magictypechanged should return the type tiled if stack is not enabled. close #12359. (WIP) fix(toolbox): optimize stack icon toggle experience. May 20, 2020
@plainheart plainheart changed the title (WIP) fix(toolbox): optimize stack icon toggle experience. fix(toolbox): optimize stack icon toggle experience. May 20, 2020
@plainheart plainheart marked this pull request as ready for review May 20, 2020 10:27
@plainheart plainheart linked an issue Jul 16, 2020 that may be closed by this pull request
var iconPaths = featureModel.iconPaths = {};
zrUtil.each(icons, function (iconStr, iconName) {
// `tiled` is just for changing stack toggle icon, no need to add a path.
if (isMagicType && iconName === 'tiled') {
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to put this logic in the render and updateView method of MagicType.js. ToolboxView should be not aware of what features it may have.

brush feature is a typical example: https://github.com/apache/incubator-echarts/blob/next/src/component/toolbox/feature/Brush.ts#L47

You may refactor it in the next branch if you wish

@plainheart
Copy link
Member Author

Do it in 5.0.

@plainheart plainheart closed this Aug 5, 2020
@plainheart plainheart modified the milestones: 4.9.0, 5.0.0 Aug 5, 2020
@ishowman
Copy link

ishowman commented Sep 7, 2020

Do it in 5.0.

What's the release date of 5.0?

@plainheart plainheart deleted the fix-12359 branch October 15, 2020 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toolbox magic type title Stack tool switches language back to original when pressed Magictype Event
3 participants