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

feat: Avatar Group overflow spacing and overflow button border color #2121

Merged
merged 5 commits into from Feb 26, 2021

Conversation

artolshansky
Copy link
Contributor

@artolshansky artolshansky commented Feb 5, 2021

Related Issue

Closes #2091
Part of #2153

Description

Added overflow spacing and overflow button accent border.

Please check whether the PR fulfills the following requirements

  1. The output matches the design specs
  • All values are in rem
  • Text elements follow the truncation rules
  • hover state of the element follow design spec
  • focus state of the element follow design spec
  • active state of the element follow design spec
  • selected state of the element follow design spec
  • selected hover state of the element follow design spec
  • pressed state of the element follow design spec
  • Responsiveness rules - the component has modifier classes for all breakpoints
  • [n/a] Includes Compact/Cosy/Tablet design
  • RTL support
  1. The code follows fundamental-styles code standards and style
  • only one top level fd-* class is used in the file
  • BEM naming convention is used
  • Mixins are used for repeatable code (fd-rtl, fd-ellipsis, fd-flex, fd-selected, fd-focus, ect.)
  • A11y support - keyboard support, screenreader support, proper ARIA attributes, etc.
  • fd-reset() mixin is applied to all elements
  • Variables are used, if some value is used more than twice.
  • Checked if current components can be reused, instead of having new code.
  1. Testing
  • last commit message should have [ci visual] so it can trigger chromatic visual regression (e.g. test: run chromatic visual regression [ci visual])
  • [n/a] tested Storybook examples with "CSS Resources" normalize option
  • [n/a] tested Storybook examples with "CSS Resources" unnormalize option
  • Verified all styles in IE11
  • Updated tests
  1. Documentation
  • Storybook documentation has been created/updated
  • [n/a] Breaking Changes wiki has been updated in case of breaking changes.

@artolshansky artolshansky added the Enhancement New feature or request label Feb 5, 2021
@artolshansky artolshansky added this to the Sprint 56 - ariba milestone Feb 5, 2021
@artolshansky artolshansky requested review from a team February 5, 2021 12:27
@artolshansky artolshansky self-assigned this Feb 5, 2021
@artolshansky artolshansky force-pushed the fix/avatar-group-overflow-spacing branch from 6571f73 to bd5574d Compare February 5, 2021 12:29
@netlify
Copy link

netlify bot commented Feb 5, 2021

Deploy preview for fundamental-styles ready!

Built with commit 6571f73

https://deploy-preview-2121--fundamental-styles.netlify.app

@netlify
Copy link

netlify bot commented Feb 5, 2021

Deploy preview for fundamental-styles ready!

Built with commit d1cf59f

https://deploy-preview-2121--fundamental-styles.netlify.app

@artolshansky artolshansky force-pushed the fix/avatar-group-overflow-spacing branch from bd5574d to 8927c21 Compare February 5, 2021 12:46
&__overflow {
@include fd-reset();

&__body {
Copy link
Member

Choose a reason for hiding this comment

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

results in fd-avatar-group__overflow__body which is not valid BEM, fd-avatar-group__overflow-body is fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -81,6 +81,19 @@ $block: #{$fd-namespace}-avatar-group;
}
}

&__overflow {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need this? It's used like this <div class="fd-popover fd-avatar-group__overflow"> and it already has a reset coming from fd-popover. If you inspect the element, all of the rules are overwritten:
Screen Shot 2021-02-05 at 2 23 54 PM

You can only use fd-avatar-group__overflow-body where you apply the 1rem padding and use the specificity to add margin to the item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -81,6 +81,17 @@ $block: #{$fd-namespace}-avatar-group;
}
}

&__overflow--body {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be &__overflow-body

Copy link
Contributor

Choose a reason for hiding this comment

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

__overflow--body means that there's a class __overflow and --body is modifying this class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@mikerodonnell89 mikerodonnell89 left a comment

Choose a reason for hiding this comment

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

High contrast colors for the "+8" in group mode are incorrect

Screen Shot 2021-02-10 at 11 20 57 AM
Screen Shot 2021-02-10 at 11 21 56 AM

Also, the margin-right in individual mode is correctly set to 0.125rem, but there is some additional space before the next avatar so I think they may still be spread too far apart
Screen Shot 2021-02-10 at 11 24 49 AM

@artolshansky
Copy link
Contributor Author

High contrast colors for the "+8" in group mode are incorrect

Screen Shot 2021-02-10 at 11 20 57 AM
Screen Shot 2021-02-10 at 11 21 56 AM

@mikerodonnell89 why it's incorrect? The button has a color-accent-6 and as I see avatar has the same colors in HC mode

Also, the margin-right in individual mode is correctly set to 0.125rem, but there is some additional space before the next avatar so I think they may still be spread too far apart

fixed

@mikerodonnell89
Copy link
Member

@mikerodonnell89 why it's incorrect? The button has a color-accent-6 and as I see avatar has the same colors in HC mode

@olshansky screenshot from the specs:
Screen Shot 2021-02-16 at 6 36 16 PM

So I think we will need a new style for this overflow avatar with the + text

@artolshansky
Copy link
Contributor Author

@olshansky screenshot from the specs:
Screen Shot 2021-02-16 at 6 36 16 PM

So I think we will need a new style for this overflow avatar with the + text

@mikerodonnell89 screenshot from the examples (I just removed accent color class modifier). Looks correct, isn't it?
FYI this button has a color different color accent in examples just to show that we could use color accents modifier classes for this button.
image

@artolshansky artolshansky force-pushed the fix/avatar-group-overflow-spacing branch from 1f16e2e to 386f1a3 Compare February 17, 2021 15:15
@InnaAtanasova
Copy link
Contributor

Screen Shot 2021-02-18 at 3 22 37 PM

@olshansky are these changes intended?

@artolshansky
Copy link
Contributor Author

@olshansky are these changes intended?

@InnaAtanasova old service for placeholder images don't work (that's why I changed it at the last commit)

@droshev
Copy link
Contributor

droshev commented Feb 19, 2021

@olshansky can you address #2153 as part of this ticket?

@artolshansky
Copy link
Contributor Author

@droshev should it be part of this PR? Because it is an issue in the popover component
image

@droshev
Copy link
Contributor

droshev commented Feb 20, 2021

@droshev should it be part of this PR? Because it is an issue in the popover component
image

what is the problem with the popover?

@artolshansky
Copy link
Contributor Author

artolshansky commented Feb 22, 2021

what is the problem with the popover?

@droshev Popover header border color is different than the body border in Dark theme

@droshev
Copy link
Contributor

droshev commented Feb 22, 2021

what is the problem with the popover?

@droshev Popover header border color is different than the body border in Dark theme

my comment was related to the arrow in RTL - it wasn't centered

https://user-images.githubusercontent.com/4380815/108005485-d86a8780-6fc6-11eb-9f0a-d0d91f6d454f.png

@artolshansky artolshansky force-pushed the fix/avatar-group-overflow-spacing branch from 4769452 to d1cf59f Compare February 24, 2021 08:09
@artolshansky
Copy link
Contributor Author

artolshansky commented Feb 24, 2021

my comment was related to the arrow in RTL - it wasn't centered

https://user-images.githubusercontent.com/4380815/108005485-d86a8780-6fc6-11eb-9f0a-d0d91f6d454f.png

@droshev Oh yes, fixed

@artolshansky artolshansky mentioned this pull request Feb 24, 2021
2 tasks
@artolshansky artolshansky merged commit b20b90a into main Feb 26, 2021
@artolshansky artolshansky deleted the fix/avatar-group-overflow-spacing branch February 26, 2021 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avatar Group Overflow Button border color design question
5 participants