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(styles): introduce message popover component [ci visual] #3937

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

N1XUS
Copy link
Contributor

@N1XUS N1XUS commented Oct 19, 2022

Related Issue

Relates SAP/fundamental-ngx#8329

Description

Added new components:

  • Message List
  • Message View
  • Message Popover

Screenshots

NOTE: If you've made any style changes, please provide appropriate screenshots (before and after) to help reviewers.

To see examples of which screenshots to include, go to Screenshot Examples.

image

image

image

image

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
  • 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
  • tested Storybook examples with "CSS Resources" normalize option
  • tested Storybook examples with "CSS Resources" unnormalize option
  • Updated tests
  • last commit message should have [ci visual] so it can trigger chromatic visual regression (e.g. test: run chromatic visual regression [ci visual])
  1. Documentation
  • Storybook documentation has been created/updated
  • Breaking Changes wiki has been updated in case of breaking changes.

@N1XUS N1XUS added Enhancement New feature or request Fiori New Component labels Oct 19, 2022
@N1XUS N1XUS added this to the Sprint 99 - Guatemala milestone Oct 19, 2022
@N1XUS N1XUS requested a review from a team October 19, 2022 08:47
@N1XUS N1XUS self-assigned this Oct 19, 2022
@netlify
Copy link

netlify bot commented Oct 19, 2022

Deploy Preview for fundamental-styles ready!

Name Link
🔨 Latest commit 9d3c41a
🔍 Latest deploy log https://app.netlify.com/sites/fundamental-styles/deploys/63566d7ddd5ba1000815b7fa
😎 Deploy Preview https://deploy-preview-3937--fundamental-styles.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@platon-rov platon-rov left a comment

Choose a reason for hiding this comment

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

Popover should a bit overlap its trigger in Fiori 3
Curr:
image
Specs:
image

Read more should be under the next, not under the icon
Curr:
image
Specs:
image

In details mode we should see back button in header
Let's add example of message popover in details mode so we can track its visuals in chromatic
Specs:
image

Header elements sticked to the border in HC themes
image

Icons should be filled in Fiori themes, not outlined
Curr:
image
Specs:
image

src/styles/mixins/list/_list-message-view.scss Outdated Show resolved Hide resolved
Comment on lines 77 to 102
.#{$block} {
&__trigger {
@include fd-focus() {
outline-color: var(--sapContent_ContrastFocusColor);
}

@each $state, $colors in $fd-trigger-states {
&--#{$state} {
--fdButtonColor: #{map-get(map-get($colors, "regular"), "color")};
--fdButtonBackgroundColor: #{map-get(map-get($colors, "regular"), "backgroundColor")};
--fdButtonBorderColor: #{map-get(map-get($colors, "regular"), "borderColor")};

@include fd-hover() {
--fdButtonColor: #{map-get(map-get($colors, "hover"), "color")};
--fdButtonBackgroundColor: #{map-get(map-get($colors, "hover"), "backgroundColor")};
--fdButtonBorderColor: #{map-get(map-get($colors, "hover"), "borderColor")};
}

@include fd-active() {
--fdButtonColor: #{map-get(map-get($colors, "active"), "color")};
--fdButtonBackgroundColor: #{map-get(map-get($colors, "active"), "backgroundColor")};
--fdButtonBorderColor: #{map-get(map-get($colors, "active"), "borderColor")};
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

@N1XUS
Copy link
Contributor Author

N1XUS commented Oct 19, 2022

Popover should a bit overlap its trigger in Fiori 3 Curr: image Specs: image

Read more should be under the next, not under the icon Curr: image Specs: image

In details mode we should see back button in header Let's add example of message popover in details mode so we can track its visuals in chromatic Specs: image

Header elements sticked to the border in HC themes image

Icons should be filled in Fiori themes, not outlined Curr: image Specs: image

Hey Platon. Thank you for your review. Couple of notes from my side:

  • Filled icons - It's a general issue with the Object Status for Fiori theme. We had an issue for that somewhere, so it's not relevant for this particular task since this component is a combination of existing components with small style additions
  • Overlapping popover: UI5's version doesn't overlap, and, frankly, I think such overlapping might be harmful in ngx

@N1XUS
Copy link
Contributor Author

N1XUS commented Oct 19, 2022

Netlify for some reason doesn't update it's pipeline status, even though second deploy was successful, so ignore the error please.

$block: #{$fd-namespace}-message-view;

.#{$block} {
@include fd-reset();
Copy link
Contributor

Choose a reason for hiding this comment

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

since you are using message view with the fd-scrollbar (fd-message-view fd-scrollbar) aren't there risks for overwriting the scrollbar rules with the reset? Also, the scrollbar itself comes with a reset

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Scrollbar aren't overwriting necessary parts of the message view. Technically, message view can be also used without fd-scrollbar, thus it also should contain own reset

src/styles/_message-view.scss Show resolved Hide resolved
src/styles/_message-view.scss Show resolved Hide resolved
src/styles/_message-view.scss Show resolved Hide resolved
src/styles/_message-view.scss Show resolved Hide resolved
src/styles/_message-view.scss Show resolved Hide resolved
src/styles/message-popover.scss Show resolved Hide resolved
);

.fd-button__icon {
Copy link
Contributor

Choose a reason for hiding this comment

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

you need to use #{$fd-namespace} instead of fd

);

box-shadow: $toggledActiveShadow;

.fd-button__icon {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

@include fd-flex(column);
@include fd-list-ie11-active-state-fix();

flex: 1 1 auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

this should go in the block of @include fd-flex(column)

@InnaAtanasova
Copy link
Contributor

Screen Shot 2022-10-20 at 4 37 03 PM

Screen Shot 2022-10-20 at 4 36 48 PM

not really a big deal but designers might catch the 1px discrepancy with the design specs. The height of a single line is 2rem and the height of a byline is 3.25rem.

@InnaAtanasova
Copy link
Contributor

Missing truncation rules for the title and subtitle.
Fund-styles:
Screen Shot 2022-10-20 at 4 39 51 PM

UI5:
Screen Shot 2022-10-20 at 4 40 11 PM

@InnaAtanasova
Copy link
Contributor

Great job, Denis!

@N1XUS N1XUS merged commit a406230 into main Oct 24, 2022
@N1XUS N1XUS deleted the feat/8329-message-popover branch October 24, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

4 participants