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

Fix some bootstrap 5 left after migration from bootstrap 4 #11683

Merged
merged 19 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<script type="text/x-template" id="select-options-modal" asp-name="select-options-modal" at="Foot">
<div>
<transition v-on:enter="showStart" v-on:after-enter="showEnd" v-on:leave="showEnd" v-on:after-leave="showStart" >
<div class="modal fade text-left" role="dialog" aria-hidden="true" ref="modal" v-if="showModal" v-on:click.self="$emit('modal-cancel')" >
<div class="modal fade text-start" role="dialog" aria-hidden="true" ref="modal" v-if="showModal" v-on:click.self="$emit('modal-cancel')" >
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
</script>

<script type="text/x-template" id="parameters-modal">
<div class="modal fade @Html.IdFor(m => m)-ModalBody text-left" role="dialog" aria-hidden="true">
<div class="modal fade @Html.IdFor(m => m)-ModalBody text-start" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,29 +81,38 @@ public async Task<IHtmlContent> Card(IDisplayHelper displayAsync, GroupingViewMo
var cardIdPrefix = $"card-{shape.Identifier}-{shape.Grouping.Key}".HtmlClassify();

var cardTag = new TagBuilder("div");
cardTag.AddCssClass("card");
cardTag.AddCssClass("card mb-2");

var headerTag = new TagBuilder("div");
headerTag.AddCssClass("card-header");
headerTag.Attributes["id"] = $"heading-{cardIdPrefix}";
var headerArrowTag = new TagBuilder("div");
headerArrowTag.AddCssClass("card-header");
headerArrowTag.Attributes["id"] = $"heading-{cardIdPrefix}";

var headerTitleTag = new TagBuilder("h5");
headerTitleTag.AddCssClass("float-start mb-0 mt-1");
headerTitleTag.InnerHtml.Append(shape.Grouping.Key);

var buttonTag = new TagBuilder("button");
buttonTag.AddCssClass("btn btn-link btn-block text-left");
buttonTag.AddCssClass("btn btn-link btn-block text-start float-end");
buttonTag.Attributes["type"] = "button";
buttonTag.Attributes["data-bs-toggle"] = "collapse";
buttonTag.Attributes["data-bs-target"] = $"#collapse-{cardIdPrefix}";
buttonTag.Attributes["aria-expanded"] = "true";
buttonTag.Attributes["aria-controls"] = $"collapse-{cardIdPrefix}";

buttonTag.InnerHtml.Append(shape.Grouping.Key);
headerTag.InnerHtml.AppendHtml(buttonTag);
var buttonIconTag = new TagBuilder("i");
buttonIconTag.AddCssClass("fa-solid fa-angle-down");
Copy link
Member

Choose a reason for hiding this comment

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

Could we remove the extra lines here?


buttonTag.InnerHtml.AppendHtml(buttonIconTag);

headerArrowTag.InnerHtml.AppendHtml(headerTitleTag);
headerArrowTag.InnerHtml.AppendHtml(buttonTag);

var bodyTag = new TagBuilder("div");
bodyTag.AddCssClass("collapse show");
bodyTag.Attributes["id"] = $"collapse-{cardIdPrefix}";

bodyTag.InnerHtml.AppendHtml(tagBuilder);
cardTag.InnerHtml.AppendHtml(headerTag);
cardTag.InnerHtml.AppendHtml(headerArrowTag);
cardTag.InnerHtml.AppendHtml(bodyTag);

return cardTag;
Expand Down