From f6e9f73d97728f2d10660c3b6a2e46e305277e86 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 13 Oct 2022 14:17:10 -0700 Subject: [PATCH 1/6] markdown --- .../api-documenter/src/documenters/MarkdownDocumenter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts index 2be5cb87143..3d27a081c86 100644 --- a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -975,7 +975,7 @@ page_type: reference // Header for each group of functions grouped by first param. // Doesn't make sense if there's only one group. const headerText = paramKey ? `function(${paramKey}...)` : 'function()'; - const formattedHeaderText = `${headerText}`; + const formattedHeaderText = `**${headerText}**`; if (sortedFunctionsFirstParamKeys.length > 1) { finalFunctionsTable.addRow( new DocTableRow({ configuration }, [ From fb73d8532366f46c577f557e74ecfd7343f5d02c Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 13 Oct 2022 14:43:24 -0700 Subject: [PATCH 2/6] Do bolding right --- .../api-documenter/src/documenters/MarkdownDocumenter.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts index 3d27a081c86..2265c23b83b 100644 --- a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -975,13 +975,14 @@ page_type: reference // Header for each group of functions grouped by first param. // Doesn't make sense if there's only one group. const headerText = paramKey ? `function(${paramKey}...)` : 'function()'; - const formattedHeaderText = `**${headerText}**`; if (sortedFunctionsFirstParamKeys.length > 1) { finalFunctionsTable.addRow( new DocTableRow({ configuration }, [ new DocTableCell({ configuration }, [ new DocParagraph({ configuration }, [ - new DocPlainText({ configuration, text: formattedHeaderText }) + new DocEmphasisSpan({ configuration, bold: true }, [ + new DocPlainText({ configuration, text: headerText }) + ]) ]) ]) ]) From 8cc076a64020f5a7edfe5984c46bfcd38b5bde5a Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 13 Oct 2022 14:55:44 -0700 Subject: [PATCH 3/6] Try h4 --- .../api-documenter/src/documenters/MarkdownDocumenter.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts index 2265c23b83b..b80d2dd919a 100644 --- a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -980,9 +980,7 @@ page_type: reference new DocTableRow({ configuration }, [ new DocTableCell({ configuration }, [ new DocParagraph({ configuration }, [ - new DocEmphasisSpan({ configuration, bold: true }, [ - new DocPlainText({ configuration, text: headerText }) - ]) + new DocHeading({ configuration, title: headerText, level: 4 }) ]) ]) ]) From 3503ef9c396921271573a8d82f5f9dc54f55168b Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 13 Oct 2022 14:58:13 -0700 Subject: [PATCH 4/6] try h4 right --- .../api-documenter/src/documenters/MarkdownDocumenter.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts index b80d2dd919a..d36b545982d 100644 --- a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -979,9 +979,7 @@ page_type: reference finalFunctionsTable.addRow( new DocTableRow({ configuration }, [ new DocTableCell({ configuration }, [ - new DocParagraph({ configuration }, [ - new DocHeading({ configuration, title: headerText, level: 4 }) - ]) + new DocHeading({ configuration, title: headerText, level: 4 }) ]) ]) ); From f3b2d2729855d4fd2419811c94d8b64a72df16f0 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 13 Oct 2022 14:59:36 -0700 Subject: [PATCH 5/6] that didnt work --- .../api-documenter/src/documenters/MarkdownDocumenter.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts index d36b545982d..2265c23b83b 100644 --- a/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts +++ b/repo-scripts/api-documenter/src/documenters/MarkdownDocumenter.ts @@ -979,7 +979,11 @@ page_type: reference finalFunctionsTable.addRow( new DocTableRow({ configuration }, [ new DocTableCell({ configuration }, [ - new DocHeading({ configuration, title: headerText, level: 4 }) + new DocParagraph({ configuration }, [ + new DocEmphasisSpan({ configuration, bold: true }, [ + new DocPlainText({ configuration, text: headerText }) + ]) + ]) ]) ]) ); From 59e0d67ea139c90dfda5cdc6dc7cebe041c54ef3 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Mon, 17 Oct 2022 10:39:35 -0700 Subject: [PATCH 6/6] bump version and remove "section: []" --- repo-scripts/api-documenter/package.json | 2 +- repo-scripts/api-documenter/src/toc.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/repo-scripts/api-documenter/package.json b/repo-scripts/api-documenter/package.json index 03883703044..9e4911fb24d 100644 --- a/repo-scripts/api-documenter/package.json +++ b/repo-scripts/api-documenter/package.json @@ -1,6 +1,6 @@ { "name": "@firebase/api-documenter", - "version": "0.2.0", + "version": "0.2.1", "description": "Read JSON files from api-extractor, generate documentation pages", "repository": { "directory": "repo-scripts/documenter", diff --git a/repo-scripts/api-documenter/src/toc.ts b/repo-scripts/api-documenter/src/toc.ts index 71a1031ab59..b4887949407 100644 --- a/repo-scripts/api-documenter/src/toc.ts +++ b/repo-scripts/api-documenter/src/toc.ts @@ -48,8 +48,7 @@ export function generateToc({ if (jsSdk) { const firebaseToc: ITocItem = { title: 'firebase', - path: `${g3Path}/index`, - section: [] + path: `${g3Path}/index` }; toc.push(firebaseToc); }