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(ui5-li-notification, ui5-li-notification-group): introduce new components #1576

Merged
merged 24 commits into from
May 13, 2020

Conversation

ilhan007
Copy link
Member

@ilhan007 ilhan007 commented May 5, 2020

The ui5-li-notification and ui5-li-notification-group components cover the main functionality of their equivalents in openui5 - sap.m.NotificationListItem and sap.m.NotificationGroup. They are meant to display app notifications and they possess a rich set of properties and slots to achieve it.

Fixes: #1478

Screenshot 2020-05-07 at 7 46 52 AM

The component covers the main functionaly of the sap.m.NotificationListItem.
It is meant to display a notification and has a rich set of properties and slots to do it.

Missing parts
- no tests
- no rtl support
- not tested on all browser device matrix
@ilhan007 ilhan007 requested a review from vladitasev May 5, 2020 09:53
Copy link
Contributor

@vladitasev vladitasev left a comment

Choose a reason for hiding this comment

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

Looks fantastic!

Tested on Chrome and IE. Works great, everyting accessible by keyborard, some minor IE bugs (Avatar initials not centered, which is not related to your change, and Action button size is a bit off).
Next steps:

  • In the sample page, have one more notification list open from the footer of the test page in a popover. This will be the real use case. We can detect future issues with such a sample. I expect this component to be used inside a popover almost always (but it's the user who opens it there, not us).
  • Come up with a solution for having "truncate" and "noTruncation" - maybe rename one of them
  • The "Show more" feature doesn't seem to work fully yet: If I set showMore to true, and truncate to true, the Show more button appears, but it doesn't do anything yet.
  • Before finalizing the feature, maybe it will be good to find out how easy/hard it will be to mix the items with groups, and most of all, if it will be possible to reuse the list internally for the group.

packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListItem.js Show resolved Hide resolved
packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/types/Priority.js Outdated Show resolved Hide resolved
packages/main/src/themes/List.css Show resolved Hide resolved
@ilhan007 ilhan007 changed the title wip(ui5-li-notification): introduce new component feat(ui5-li-notification): introduce new component May 5, 2020
@ilhan007 ilhan007 changed the title feat(ui5-li-notification): introduce new component feat(ui5-li-notification, ui5-li-notification-group): introduce new components May 6, 2020
@ilhan007 ilhan007 dismissed vladitasev’s stale review May 6, 2020 19:16

all comments fixed

@ilhan007 ilhan007 requested a review from vladitasev May 6, 2020 19:16
@ilhan007 ilhan007 closed this May 10, 2020
@ilhan007 ilhan007 reopened this May 10, 2020
* @defaultvalue false
* @public
*/
showClose: {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better if by default the close button is present, so the property is something like hideClose

packages/fiori/src/NotificationListGroupItem.hbs Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListItem.hbs Show resolved Hide resolved
packages/fiori/src/NotificationListItem.hbs Show resolved Hide resolved
packages/fiori/src/NotificationListItemBase.js Outdated Show resolved Hide resolved
Copy link
Contributor

@vladitasev vladitasev left a comment

Choose a reason for hiding this comment

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

Looks amazing overall!

Nothing major in the code, really, but there are bugs on IE:

  • both item/group, when you press "tab", you get a js error and the app crashes:
    : Array.prototype.slice: 'this' is null or undefined
  • keyboard navigation does not work, pressing down up scrolls the page instead.
    For this chage, just fix the js error, we can do the keyboard handling separately later. I have exactly the same issue in Tree.js, up/down don't work, probably calling super._onkeydown() fails somehow both here and in the tree.

packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListGroupItem.js Outdated Show resolved Hide resolved
packages/fiori/src/NotificationListGroupItem.js Outdated Show resolved Hide resolved
docs/Public Module Imports.md Show resolved Hide resolved
packages/fiori/src/NotificationListItem.js Outdated Show resolved Hide resolved
packages/fiori/src/UploadCollectionItem.js Outdated Show resolved Hide resolved
packages/main/src/List.js Show resolved Hide resolved
@vladitasev
Copy link
Contributor

Please also resolve conflicts

vladitasev
vladitasev previously approved these changes May 13, 2020
fifoosid
fifoosid previously approved these changes May 13, 2020
@ilhan007 ilhan007 dismissed stale reviews from fifoosid and vladitasev via a946d5b May 13, 2020 07:08
@ilhan007 ilhan007 merged commit ef62f81 into master May 13, 2020
@ilhan007 ilhan007 deleted the feat-nli branch May 13, 2020 09:11
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.

ui5-notification-li: new component
4 participants