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(Tag): close button not showing in select when text too long #443

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

jdkahn
Copy link
Contributor

@jdkahn jdkahn commented Mar 12, 2019

  • set max width for the body to make sure the close button appears
  • increase the icon left margin to not trigger the ellipses unnecessarily

@jdkahn jdkahn requested a review from youluna March 12, 2019 02:58
@youluna youluna requested a review from tao1991123 March 12, 2019 02:59
@codecov
Copy link

codecov bot commented Mar 12, 2019

Codecov Report

Merging #443 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #443   +/-   ##
=======================================
  Coverage   91.08%   91.08%           
=======================================
  Files         242      242           
  Lines       13590    13590           
  Branches     4210     4210           
=======================================
  Hits        12379    12379           
  Misses       1192     1192           
  Partials       19       19

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0afec13...fd341f8. Read the comment docs.

@@ -35,7 +35,11 @@
}

> .#{$css-prefix}tag-close-btn {
margin-left: $_marginLeft;
@if $iconSize == "large" {
Copy link
Member

Choose a reason for hiding this comment

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

the value of $iconSize is a kind of value like '4px 8px 12px', not 'large medium small', so margin-left will always be $_marginLeft + 2px

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i will fix

&.#{$css-prefix}tag-small > .#{$css-prefix}tag-body {
max-width: calc(100% - #{$tag-size-s-height});
}

Copy link
Member

Choose a reason for hiding this comment

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

why is -tag-large left?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this wasn't necessary for select, since it doesn't use large tags, but i can add it because we don't know if it will need in the future

@@ -20,7 +20,7 @@
line-height: $height - $borderWidth * 2;
font-size: 0;

$_marginLeft: $height / 4 - 1px;
$_marginLeft: $height / 4 + 3;
Copy link
Member

@youluna youluna Mar 13, 2019

Choose a reason for hiding this comment

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

you mean +3px ?
Adding 3px to marginLeft looks like a hack. @tao1991123 is that ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what if we did $_marginLeft: $iconSize? This seems to have the desired result without a fixed hack

Copy link
Member

Choose a reason for hiding this comment

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

image
it seem that marginLeft equals to 0.5 * paddingRight

Copy link
Member

Choose a reason for hiding this comment

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

agree with $_marginLeft: $iconSize

@youluna youluna merged commit 5d01768 into alibaba-fusion:master Mar 13, 2019
@youluna
Copy link
Member

youluna commented Mar 13, 2019

close #441

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