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(module:modal): draggable #8419

Merged
merged 13 commits into from
Mar 11, 2024

Conversation

ParsaArvanehPA
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[✔] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Ng-zorro's Modal component lacks the draggable feature that Ant designs' modal provides.

What is the new behavior?

Now supports draggable modals

Does this PR introduce a breaking change?

[ ] Yes
[✔] No

Other information

Copy link

zorro-bot bot commented Mar 1, 2024

This preview will be available after the AzureCI is passed.

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.64%. Comparing base (fdfc816) to head (823a4db).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8419      +/-   ##
==========================================
+ Coverage   91.61%   91.64%   +0.02%     
==========================================
  Files         519      519              
  Lines       18076    18122      +46     
  Branches     2848     2769      -79     
==========================================
+ Hits        16561    16607      +46     
- Misses       1216     1217       +1     
+ Partials      299      298       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lppedd
Copy link
Contributor

lppedd commented Mar 4, 2024

That's awesome! I was literally thinking today users would benefit from being able to move a modal dialog.
This brings what we can do in desktop environments to web applications. nzMask = false might be important in this case.

@lppedd
Copy link
Contributor

lppedd commented Mar 4, 2024

Btw, someone else had attempted at this a while back: #7852

Hopefully this one gets merged.

@lppedd
Copy link
Contributor

lppedd commented Mar 5, 2024

@ParsaArvanehPA does it make sense for the automation to still assign @hsuanxyz as reviewer?

Seems like he's not involved anymore.

@ParsaArvanehPA
Copy link
Contributor Author

That's awesome! I was literally thinking today users would benefit from being able to move a modal dialog. This brings what we can do in desktop environments to web applications. nzMask = false might be important in this case.

Thanks :))
Yeah not to be able to drag modals is really noticible in out modal component.
I saw that old PR, but it it seemed abandoned...

@ParsaArvanehPA
Copy link
Contributor Author

@ParsaArvanehPA does it make sense for the automation to still assign @hsuanxyz as reviewer?

Seems like he's not involved anymore.

Assigneess are automatically assigned based on this file (I think).

I don't know if they are still involved or not. But other collabrators will check this PR nonetheless.

@@ -49,7 +53,7 @@ import { ModalOptions } from './modal-types';
<button nz-modal-close (click)="onCloseClick()"></button>
}
@if (config.nzTitle) {
<div nz-modal-title></div>
<div nz-modal-title cdkDragHandle [style.cursor]="config.nzDraggable ? 'move' : 'default'"></div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change default to auto.

@ParsaArvanehPA
Copy link
Contributor Author

@HyperLife1119
Thank you for checking my PR; changes are done.

Copy link
Collaborator

@HyperLife1119 HyperLife1119 left a comment

Choose a reason for hiding this comment

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

LGTM

@HyperLife1119 HyperLife1119 merged commit ce33294 into NG-ZORRO:master Mar 11, 2024
9 checks passed
@lppedd
Copy link
Contributor

lppedd commented Mar 12, 2024

Thanks guys for the fast merge, appreciate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants