From a92ffc8e2cf0ec9e265ec8e0bb4512a554b88a1f Mon Sep 17 00:00:00 2001 From: Morteza Karimi Date: Tue, 21 May 2024 16:05:57 -0700 Subject: [PATCH 1/3] Nest overloads --- quasar_site/src/ViewModel.js | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/quasar_site/src/ViewModel.js b/quasar_site/src/ViewModel.js index 00d76138..2e3358b0 100644 --- a/quasar_site/src/ViewModel.js +++ b/quasar_site/src/ViewModel.js @@ -54,24 +54,44 @@ const ViewModel = { return; } + //An array containing top level children to determine if an overload should be skipped + let topLevelChild = []; + let children = members.map((x) => { const labelParts = this.shortSignature( this.memberName(x, childType.toLowerCase()) ); - // Don't display overlaods in tree: WWW-2046 - if (!x.overload || x.overload < 2) { + + const overloads = members.filter((m) => { + return m.path == x.path; + }); + + console.log("x and its overloads:", x.path, overloads); + + if (topLevelChild.includes(x.path)) { + return null; + } else { + topLevelChild.push(x.path); return { label: labelParts[0], labelSecondary: labelParts[1], - // path: x.overload ? `${x.path}?overload=${x.overload}` : x.path, overload: x.overload, path: x.path, header: "secondary", deprecated: x.deprecated, obsolete: x.obsolete, + children: + overloads.length > 1 + ? overloads.map((o) => { + return { + label: this.shortSignature( + this.memberName(o, childType.toLowerCase()) + )[1], + path: `${o.path}#${this.signatureAnchorRef(o.signature)}`, + }; + }) + : [], }; - } else { - return null; } }); @@ -742,8 +762,7 @@ const ViewModel = { return [signature, ""]; }, signatureAnchorRef(signature) { - return this.shortSignature(signature) - .join("") + return this.shortSignature(signature)[1] .toLocaleLowerCase() .replace(/\s/g, ""); }, From ec5ed1fc6a91e20cff4f89f2a0cdd93a06e9249c Mon Sep 17 00:00:00 2001 From: Morteza Karimi Date: Tue, 21 May 2024 16:08:26 -0700 Subject: [PATCH 2/3] Remove unused overload property --- quasar_site/src/ViewModel.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/quasar_site/src/ViewModel.js b/quasar_site/src/ViewModel.js index 2e3358b0..4a149de2 100644 --- a/quasar_site/src/ViewModel.js +++ b/quasar_site/src/ViewModel.js @@ -66,8 +66,6 @@ const ViewModel = { return m.path == x.path; }); - console.log("x and its overloads:", x.path, overloads); - if (topLevelChild.includes(x.path)) { return null; } else { @@ -685,16 +683,16 @@ const ViewModel = { } } - // Adding an overload tag to members with same declarations - members.forEach((member, id) => { - const nextMember = members[id + 1]; - const prevMember = members[id - 1]; - if (prevMember && prevMember.path == member.path) { - member.overload = prevMember.overload + 1; - } else if (nextMember && nextMember.path == member.path) { - member.overload = 1; - } - }); + // // Adding an overload tag to members with same declarations + // members.forEach((member, id) => { + // const nextMember = members[id + 1]; + // const prevMember = members[id - 1]; + // if (prevMember && prevMember.path == member.path) { + // member.overload = prevMember.overload + 1; + // } else if (nextMember && nextMember.path == member.path) { + // member.overload = 1; + // } + // }); // Updating path for members with overloads and updating _pathMap members.forEach((member) => { From 4c9741e9336054cae376484ffa6ea5b7ca9f5a0f Mon Sep 17 00:00:00 2001 From: Morteza Karimi Date: Tue, 21 May 2024 16:25:21 -0700 Subject: [PATCH 3/3] Fade unselected members --- quasar_site/src/pages/MemberDetail.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quasar_site/src/pages/MemberDetail.vue b/quasar_site/src/pages/MemberDetail.vue index fe2a07bd..54f4eef0 100644 --- a/quasar_site/src/pages/MemberDetail.vue +++ b/quasar_site/src/pages/MemberDetail.vue @@ -4,8 +4,8 @@