Skip to content

Commit

Permalink
fix ui glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
aorcsik committed Feb 13, 2024
1 parent 3ee890f commit bf083af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/css/changelog.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
display: none;
}

.changelog-topic-content img {
height: auto;
}

.changelog-topic-content h1 {
font-size: 2rem;
margin-bottom: 1rem;
Expand Down
10 changes: 9 additions & 1 deletion src/js/changelog/ChangelogList.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class ChangelogList
this.timestampListItemTemplate.id = "";
this.timestampListItemTemplate.remove();

this.list.innerHTML = "";
this.list.append(this.renderLoadingTimestampListItem());
this.list.append(this.renderLoadingListItem());
this.list.append(this.renderLoadingTimestampListItem());
this.list.append(this.renderLoadingListItem());
this.list.append(this.renderLoadingListItem());
}
Expand All @@ -33,10 +36,15 @@ class ChangelogList
const listItem = this.readListItemTemplate.cloneNode(true);
listItem.querySelector(".changelog-timestamp").innerHTML = "<span class='changelog-loading'>Loading</span>";
listItem.querySelector(".changelog-title").innerHTML = "<span class='changelog-loading'>Loading</span>";
listItem.querySelectorAll(".display-inline .display-inline").forEach(elem => elem.remove());
return listItem;
}

renderLoadingTimestampListItem() {
const timestampListItem = this.readListItemTemplate.cloneNode(true);
timestampListItem.innerHTML = "<span class='changelog-loading'>Loading</span>";
return timestampListItem;
}


/**
* @param {ChangelogTopic} topic
Expand Down

0 comments on commit bf083af

Please sign in to comment.