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): support draggable modal #4978

Closed
wants to merge 1 commit into from

Conversation

hsuanxyz
Copy link
Member

@hsuanxyz hsuanxyz commented Apr 3, 2020

test(module:modal): add draggable test case

close #4549, cc #2705, #1904, #120

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

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

What is the current behavior?

Issue Number: #4549, #2705, #1904, #120

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@codecov
Copy link

codecov bot commented Apr 3, 2020

Codecov Report

Merging #4978 into master will increase coverage by 0.01%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4978      +/-   ##
==========================================
+ Coverage   91.26%   91.28%   +0.01%     
==========================================
  Files         535      535              
  Lines       13709    13734      +25     
  Branches     2040     2045       +5     
==========================================
+ Hits        12512    12537      +25     
+ Misses        731      730       -1     
- Partials      466      467       +1     
Impacted Files Coverage Δ
components/modal/modal.module.ts 100.00% <ø> (ø)
components/modal/utils.ts 100.00% <ø> (ø)
components/modal/modal-ref.ts 97.00% <83.33%> (-1.87%) ⬇️
...ponents/modal/modal-confirm-container.component.ts 100.00% <100.00%> (ø)
components/modal/modal-container.component.ts 100.00% <100.00%> (ø)
components/modal/modal-container.ts 87.64% <100.00%> (+0.06%) ⬆️
components/modal/modal-title.component.ts 100.00% <100.00%> (ø)
components/modal/modal-types.ts 100.00% <100.00%> (ø)
components/modal/modal.component.ts 96.87% <100.00%> (+0.03%) ⬆️
components/modal/modal.service.ts 90.42% <100.00%> (+0.10%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70b2fc3...6ed0207. Read the comment docs.

@zorro-bot
Copy link

zorro-bot bot commented Apr 3, 2020

This preview will be available after the AzureCI is passed.

@wzhudev
Copy link
Member

wzhudev commented Apr 3, 2020

Confirm 这种简单样式的 modal 应该需要改变鼠标样式。

遮罩顺序有点问题,弹出新 modal 之前最后一个被拖拽的 modal 也会在 backdrop 之上。

图片

@hsuanxyz
Copy link
Member Author

hsuanxyz commented Apr 3, 2020

@wendellhu95 DEMO 里面有对应代码,现在 modal 不处理这些,只管挂载拖拽节点

selector: 'nz-demo-modal-draggable',
template: `
<button nz-button [nzType]="'primary'" (click)="showModal()">Show Modal</button>
&nbsp;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
&nbsp;

should not including &nbsp in demo

@sawyerbutton
Copy link

Hope this PR will be merged ASAP.

@100cm
Copy link
Contributor

100cm commented Mar 24, 2021

希望尽快merge

@jongomes
Copy link

need feature

@sevenflip
Copy link

@hsuanxyz @hullis is there a reason why this PR is not yet merged?

kunwp1 added a commit to Texera/texera that referenced this pull request Oct 3, 2023
This PR adds a new feature that allows users to drag the visualization
operator window. Since the Ng Zorro Antd library does not support
draggable modals natively ([as noted
here](NG-ZORRO/ng-zorro-antd#4978)), I used a
third-party library called `cdkDrag` to enable dragging the window.

![capture
(1)](https://github.com/Texera/texera/assets/143021053/0e493767-95ae-4b8c-9816-64a625ac9908)

---------

Co-authored-by: Xinyuan Lin <[email protected]>
@HyperLife1119
Copy link
Collaborator

Close via #8419.

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.

ModalComponents不支持header drag
8 participants