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: (Core) introduce Action sheet component #3596

Merged
merged 44 commits into from
Nov 2, 2020
Merged

Conversation

katekozlowska
Copy link
Contributor

@katekozlowska katekozlowska commented Oct 12, 2020

Please provide a link to the associated issue.

closes 3372

Please provide a brief summary of this pull request.

Introduce core action sheet component

Please check whether the PR fulfills the following requirements

Documentation checklist:

@katekozlowska katekozlowska changed the title Feat/action sheet Action Sheet Oct 12, 2020
@katekozlowska katekozlowska changed the title Action Sheet Feat - Action Sheet Oct 12, 2020
@netlify
Copy link

netlify bot commented Oct 12, 2020

Deploy preview for fundamental-ngx ready!

Built with commit e407ca8

https://deploy-preview-3596--fundamental-ngx.netlify.app

@katekozlowska katekozlowska changed the title Feat - Action Sheet feat - (Core) introduce Action sheet component Oct 12, 2020
@katekozlowska katekozlowska self-assigned this Oct 12, 2020
@katekozlowska katekozlowska added this to the Sprint 48 - Bora Bora milestone Oct 12, 2020
@mikerodonnell89
Copy link
Member

Because this is essentially a list, I believe the items should be keyboard navigable

@mikerodonnell89
Copy link
Member

We need a way to close the mobile view

@mikerodonnell89
Copy link
Member

mikerodonnell89 commented Oct 12, 2020

The fiori designs have the popover w/ the arrow. Also the popover should be centered under the button rather than aligned to the side

Screen Shot 2020-10-12 at 1 42 16 PM

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.

Code looks good, just needs some small changes, see comments

Copy link
Contributor

@JKMarkowski JKMarkowski left a comment

Choose a reason for hiding this comment

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

I totally agree with mike, that you should also add some keyboard support. Key Up/Down + anytime popover is opened the first option shoudl be focused

Copy link
Contributor

@InnaAtanasova InnaAtanasova left a comment

Choose a reason for hiding this comment

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

Awesome work! The rest of the reviewers should verify if their requested changes have been addressed but from my part it looks great.

@InnaAtanasova InnaAtanasova added this to In progress in Development via automation Oct 26, 2020
Copy link
Contributor

@JKMarkowski JKMarkowski left a comment

Choose a reason for hiding this comment

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

Hi @katekozlowska I added some comments, also one of the buttons in compact mode doesn't close popover, even if it has [isCloseButton]="true"

Copy link
Contributor

@JKMarkowski JKMarkowski left a comment

Choose a reason for hiding this comment

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

I found some leftovers / unguarded subscription. After addressing it, we should be good to go with this PR

this._onDestroy$.next();
this._onDestroy$.complete();
this.actionSheetControl.clicked.unsubscribe();
// this.actionSheetItems.unsubscribe();
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover


/** @hidden */
private _actionItemsHandle(): void {
this.actionSheetItems.forEach(item => item.clicked.subscribe((isOpen) => this.isOpenChangeHandle(isOpen))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you unsubscribe after destroy there? You can do it by adding .pipe(takeUntil(this._onDestroy$)) like in other places in code


/** @hidden */
private _actionControlHandle(): void {
this.actionSheetControl.clicked.subscribe((isOpen) => this.isOpenChangeHandle(isOpen));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you unsubscribe after destroy there? You can do it by adding .pipe(takeUntil(this._onDestroy$)) like in other places in code

ngOnDestroy(): void {
this._onDestroy$.next();
this._onDestroy$.complete();
this.actionSheetControl.clicked.unsubscribe();
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if it's going to work. After checking my other comment about unsubscribing you would be able to remove this line

Copy link
Contributor

@JKMarkowski JKMarkowski left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@katekozlowska katekozlowska merged commit 5194d67 into master Nov 2, 2020
Development automation moved this from In progress to Done Nov 2, 2020
@katekozlowska katekozlowska deleted the feat/action-sheet branch November 2, 2020 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core library specific issues denoland New Fiori component
Projects
No open projects
Development
  
Done
Development

Successfully merging this pull request may close these issues.

Action Sheet implementation in Core
6 participants