-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Add move-in animation #511
Open
byOsta
wants to merge
10
commits into
Blazored:main
Choose a base branch
from
byOsta:add-animations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
638c0a0
Add move-in animation usable on CustomLayout
byOsta c9678cc
Merge branch 'main' into add-animations
byOsta 952d203
Merge main
byOsta 42e75b9
Merge branch 'main' into add-animations
byOsta 3c51dc0
Fix blank lines
byOsta 44fa571
Merge branch 'add-animations' of https://github.com/byOsta/BlazoredMo…
byOsta 6e9987f
Merge branch 'main' into add-animations
chrissainty d3e2f5b
Rename css classes
byOsta f8424fa
Workaround FocusTrap
byOsta a228f8c
Change FocusTrap ShouldRender
byOsta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
samples/InteractiveServer/Components/Shared/CustomAnimatedBootstrapModal.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="modal d-block @BlazoredModal.OverlayAnimationClass" tabindex="-1" role="dialog"> | ||
<div class="modal-backdrop fade show" @onclick="Cancel"></div> | ||
<div class="modal-dialog @BlazoredModal.ModalAnimationClass" style="z-index: 1050"> | ||
<!-- Pop it above the backdrop --> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title">Modal title</h5> | ||
<button type="button" class="btn-close" aria-label="Close" @onclick="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<p>@Message</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-secondary" @onclick="Close">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
@code { | ||
|
||
[CascadingParameter] BlazoredModalInstance BlazoredModal { get; set; } = default!; | ||
|
||
[Parameter] public string? Message { get; set; } | ||
|
||
async Task Close() => await BlazoredModal.CloseAsync(ModalResult.Ok(true)); | ||
async Task Cancel() => await BlazoredModal.CancelAsync(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
samples/InteractiveWebAssembly/Shared/CustomAnimatedBootstrapModal.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="modal d-block @BlazoredModal.OverlayAnimationClass" tabindex="-1" role="dialog"> | ||
<div class="modal-backdrop fade show" @onclick="Cancel"></div> | ||
<div class="modal-dialog @BlazoredModal.ModalAnimationClass" style="z-index: 1050"> | ||
<!-- Pop it above the backdrop --> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title">Modal title</h5> | ||
<button type="button" class="btn-close" aria-label="Close" @onclick="Close"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<p>@Message</p> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-secondary" @onclick="Close">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
@code { | ||
|
||
[CascadingParameter] BlazoredModalInstance BlazoredModal { get; set; } = default!; | ||
|
||
[Parameter] public string? Message { get; set; } | ||
|
||
async Task Close() => await BlazoredModal.CloseAsync(ModalResult.Ok(true)); | ||
async Task Cancel() => await BlazoredModal.CancelAsync(); | ||
|
||
} |
6 changes: 2 additions & 4 deletions
6
samples/InteractiveWebAssembly/Shared/CustomBootstrapModal.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why is the
div
tag needed?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.
Removing it doesn't seem to effect anything
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.
This is needed for the css to be applied to CustomLayouts.
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.
In what way? Just when it's removed everything looks to continue working as it did before and there doesn't seem to be any references to this element in the CSS, unless I've missed it?
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.
About the div...
This is without the div:
https://github.com/Blazored/Modal/assets/8792259/b1a629dd-fad1-4f51-9284-cc8765527ad1
This is with the div
https://github.com/Blazored/Modal/assets/8792259/4d12827a-e820-425f-bb6d-7191d8bcb945
Why does this happen?
Because of the Blazor CSS isolation
Without this change the custom layout that we have for the modals wont have the custom
BlazoredModalInstance.razor.css
styles applied...I also had to add the following selectors on the
BlazoredModalInstance.razor.css
: