Commit 616d1561 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/notesOverviewRendering' into 'master'

Only renders notes tab when viewing discussions

See merge request gitlab-org/gitlab!65824
parents c117b51b a4ddb993
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
data() { data() {
return { return {
currentFilter: null, currentFilter: null,
renderSkeleton: !this.shouldShow,
}; };
}, },
computed: { computed: {
...@@ -93,7 +94,7 @@ export default { ...@@ -93,7 +94,7 @@ export default {
return this.noteableData.noteableType; return this.noteableData.noteableType;
}, },
allDiscussions() { allDiscussions() {
if (this.isLoading) { if (this.renderSkeleton || this.isLoading) {
const prerenderedNotesCount = parseInt(this.notesData.prerenderedNotesCount, 10) || 0; const prerenderedNotesCount = parseInt(this.notesData.prerenderedNotesCount, 10) || 0;
return new Array(prerenderedNotesCount).fill({ return new Array(prerenderedNotesCount).fill({
...@@ -122,6 +123,10 @@ export default { ...@@ -122,6 +123,10 @@ export default {
if (!this.isNotesFetched) { if (!this.isNotesFetched) {
this.fetchNotes(); this.fetchNotes();
} }
setTimeout(() => {
this.renderSkeleton = !this.shouldShow;
});
}, },
discussionTabCounterText(val) { discussionTabCounterText(val) {
if (this.discussionsCount) { if (this.discussionsCount) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment