-
Notifications
You must be signed in to change notification settings - Fork 131
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: (Platform) introduce Approval Flow component - Phase 1 #4059
Conversation
✔️ Deploy preview for fundamental-ngx ready! 🔨 Explore the source changes: 0d3f21e 🔍 Inspect the deploy logs: https://app.netlify.com/sites/fundamental-ngx/deploys/5fe1d53fd7360d000791e39d 😎 Browse the preview: https://deploy-preview-4059--fundamental-ngx.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Added some comments.
libs/platform/src/lib/components/approval-flow/interfaces/user.ts
Outdated
Show resolved
Hide resolved
libs/platform/src/lib/components/approval-flow/approval-flow.module.ts
Outdated
Show resolved
Hide resolved
libs/platform/src/lib/components/approval-flow/approval-flow.component.ts
Outdated
Show resolved
Hide resolved
libs/platform/src/lib/components/approval-flow/approval-flow.component.ts
Outdated
Show resolved
Hide resolved
libs/platform/src/lib/components/approval-flow/approval-flow.component.ts
Outdated
Show resolved
Hide resolved
libs/platform/src/lib/components/approval-flow/approval-flow.component.ts
Outdated
Show resolved
Hide resolved
libs/platform/src/lib/components/approval-flow/approval-flow.component.scss
Outdated
Show resolved
Hide resolved
.../components/approval-flow/approval-flow-user-details/approval-flow-user-details.component.ts
Outdated
Show resolved
Hide resolved
...omponents/approval-flow/approval-flow-user-details/approval-flow-user-details.component.html
Outdated
Show resolved
Hide resolved
...omponents/approval-flow/approval-flow-user-details/approval-flow-user-details.component.html
Outdated
Show resolved
Hide resolved
<div class="approval-flow-node__info"> | ||
<div class="approval-flow-node__name"> | ||
<ng-container *ngIf="node.approvers.length === 1">{{ node.approvers[0].name }}</ng-container> | ||
<ng-container *ngIf="node.approvers.length > 1">{{ node.approvers.length }} members</ng-container> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add internalization
color: #0854A0; | ||
color: var(--sapButton_IconColor, #0854A0); | ||
position: relative; | ||
top: 1px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have it rem
fdp-standard-list-item { | ||
.fd-checkbox__label { | ||
position: relative; | ||
left: 5px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to try to avoid using px, it will impact responsiveness.
@Component({ | ||
selector: 'fdp-test-approval-flow', | ||
template: ` | ||
<fdp-approval-flow [title]="title" [dataSource]="dataSource"></fdp-approval-flow>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a query, how datasource is helping here us comparing to using angular basic approaches(*ngFor, array etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using dataSource
was a requirement from the tech spec.
I don't get why *ngFor, array
is compared to the DataSource here, they work independently, DataSource provides methods for retrieving approval flow's data and manipulating that data in any way, *ngFor and etc are internal Angular tools that are used quite a lot in this component's code.
As far as I can tell, for a complex component like this one using DataSource is preferable way, otherwise the component's number of inputs and outputs would be quite big. Also using DataSource allows to have all data
logic in one place
* Update watcher list. Called whenever there is a change | ||
* to the watcher list. | ||
*/ | ||
updateWatchers(watchers: ApprovalUser[]): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same query as above, how a datasource with abstract functions helping in workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
answered above
ea80e4a
to
1c80c9e
Compare
@Betrozov @sKudum @Betrozov no designs were provided for different themes so maybe need to clarify this with the designers. I've changed some variables so now it looks more or less OK with different themes @sKudum changed |
Thank you @IlyaSurmay for addressing the comments. Could you please have a look at this. (In RTL mode content is aligned to LTR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing my comments!
I left one more regarding translation.
libs/platform/src/lib/components/approval-flow/approval-flow.component.html
Outdated
Show resolved
Hide resolved
.../components/approval-flow/approval-flow-user-details/approval-flow-user-details.component.ts
Outdated
Show resolved
Hide resolved
194abf0
to
8844dd4
Compare
} | ||
|
||
/** @hidden */ | ||
setListItems(items: ApprovalUser[]): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all hidden methods should be prefixed with _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive! LGTM
8844dd4
to
89b6222
Compare
closed in favor of #4177 |
Please provide a link to the associated issue.
#3403
tech spec - https://app.gitbook.com/@fundamental-ngx/s/docs/platform-approval-flow
Please provide a brief summary of this pull request.
This PR introduces a new Approval Flow component (phase 1 implementation)
Functionality included in Phase 1:
Please check whether the PR fulfills the following requirements
https://github.com/SAP/fundamental-ngx/blob/master/CONTRIBUTING.md
https://github.com/SAP/fundamental-ngx/wiki/PR-Review-Checklist
Documentation checklist:
README.md