Skip to content

Commit

Permalink
Add conversiation info badge
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu committed Feb 21, 2024
1 parent c7bc029 commit 60fabae
Show file tree
Hide file tree
Showing 16 changed files with 593 additions and 658 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
.conversiation-center {
overflow: auto;
color: var(--base-text-color);
height: calc(100vh - 155px);
height: calc(100vh - 145px);
}
4 changes: 2 additions & 2 deletions src/dotnet/APIView/APIViewWeb/Client/css/pages/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@

#index-offcanvas-menu-content {
padding: 130px 60px 10px 20px;
min-height: calc(100vh - 40px);
max-height: calc(100vh - 40px);
min-height: calc(100vh - 30px);
max-height: calc(100vh - 30px);
overflow-y: auto;
}

Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/APIView/APIViewWeb/Client/css/pages/review.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#review-left {
max-width: none;
min-width: 10px;
height: calc(100vh - 130px);
height: calc(100vh - 120px);
overflow: auto;
max-height: 100vh;
padding: 5px 0px 5px 10px;
Expand All @@ -27,7 +27,7 @@
#review-right {
max-width: 100%;
min-width: 100px;
height: calc(100vh - 130px);
height: calc(100vh - 120px);
padding: 0px;
overflow: auto;
background-color: var(--base-fg-color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

.samples-center {
overflow: auto;
height: calc(100vh - 130px);
height: calc(100vh - 120px);
padding: 0px;
background-color: var(--base-fg-color);
scroll-behavior: smooth;
Expand Down
5 changes: 5 additions & 0 deletions src/dotnet/APIView/APIViewWeb/Client/css/shared/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ html {
color: var(--link-active);
}

.navbar-brand {
padding-top: 0rem;
padding-bottom: 0rem;
}

.rounded-1 {
border-radius: 3px !important;
}
Expand Down
6 changes: 3 additions & 3 deletions src/dotnet/APIView/APIViewWeb/Client/css/shared/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
}

@mixin review-offcanvas-menu-content {
min-height: calc(100vh - 110px);
max-height: calc(100vh - 110px);
min-height: calc(100vh - 100px);
max-height: calc(100vh - 100px);
overflow-y: auto;
margin-top: 80px;
margin-top: 70px;
}

@mixin review-approval-border {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
.left-offcanvas-menu-content {
border-right: 1px solid var(--border-color) !important;
transform: translate3d(0, 0, 0);

.badge {
font-size: 0.55em;
top: 5px;
}
}

#right-offcanvas-menu-content {
Expand Down
1 change: 0 additions & 1 deletion src/dotnet/APIView/APIViewWeb/Client/src/pages/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ $(() => {

// Scroll ids into view for Ids hidden in collapsed sections
const uriHash = location.hash;
console.log(`Initial uriHash: ${uriHash}`);
if (uriHash) {
let targetAnchorId = uriHash.replace('#', '');
targetAnchorId = decodeURIComponent(targetAnchorId);
Expand Down
12 changes: 10 additions & 2 deletions src/dotnet/APIView/APIViewWeb/Client/src/pages/revisions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $(() => {

function makeDiffAPIRevisionEventHandler(event) {
const trigger = $(event.currentTarget);
const diffCard = $(".revisions-list-container .bi.bi-file-dif.diff-rev").closest(".card");
const diffCard = $(".revisions-list-container .bi.bi-file-diff.diff-rev").closest(".card");
diffCard.find(".bi.bi-file-diff.diff-rev").remove();
diffCard.find(".btn-group").prepend(`<button type="button" class="btn btn-sm btn-outline-primary make-diff" data-bs-toggle="tooltip" title="Make Diff"><i class="bi bi-file-diff mr-1"></i></button>`);
diffCard.find(".btn-group").prepend(`<button type="button" class="btn btn-sm btn-outline-primary make-active" data-bs-toggle="tooltip" title="Make Active"><i class="bi bi-clock-history mr-1"></i></button>`);
Expand Down Expand Up @@ -115,7 +115,15 @@ $(() => {
}

const url = new URL(window.location.href);
url.searchParams.set("revisionId", activeRevisionId!);
const currRevisionId = hp.getReviewAndRevisionIdFromUrl(url.href)["revisionId"];

if (!currRevisionId || url.searchParams.has("revisionId")) {
url.searchParams.set("revisionId", activeRevisionId!);
}
else {
url.pathname = url.pathname.replace(currRevisionId, activeRevisionId!);
}

if (diffRevisionId) {
url.searchParams.set("diffRevisionId", diffRevisionId!);
}
Expand Down
4 changes: 3 additions & 1 deletion src/dotnet/APIView/APIViewWeb/Client/src/shared/comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,12 @@ $(() => {
highlightCurrentRow(inlineRow, true);
});

$("#jump-to-first-comment").on("click", function () {
$("#jump-to-first-comment").on("click", function (e) {
e.preventDefault();
var commentRows = $('.comment-row');
var displayedCommentRows = hp.getDisplayedCommentRows(commentRows, false, true);
$(displayedCommentRows[0])[0].scrollIntoView();
e.stopPropagation();
});

function highlightCurrentRow(rowElement: JQuery<HTMLElement> = $(), isInlineRow: boolean = false) {
Expand Down
1 change: 1 addition & 0 deletions src/dotnet/APIView/APIViewWeb/Helpers/PageModelHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ public static string ResolveRevisionLabel(APIRevisionListItemModel apiRevision,
/// Upload API Revision
/// </summary>
/// <param name="apiRevisionsManager"></param>
/// <param name="user"></param>
/// <param name="id"></param>
/// <param name="upload"></param>
/// <param name="label"></param>
Expand Down
Loading

0 comments on commit 60fabae

Please sign in to comment.