diff --git a/build.gradle b/build.gradle
index 95e377018b..97e295dd2a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -284,6 +284,7 @@ def syncFrontendPublic = tasks.register('syncFrontendPublic', Sync) {
preserve {
include 'index.html'
include 'favicon.ico'
+ include 'title.md'
}
}
diff --git a/docs/_markbind/layouts/ug-sitenav.md b/docs/_markbind/layouts/ug-sitenav.md
index aef7cbef49..5acddb1015 100644
--- a/docs/_markbind/layouts/ug-sitenav.md
+++ b/docs/_markbind/layouts/ug-sitenav.md
@@ -7,7 +7,7 @@
{name: "Appendices"},
{level: 2, name: "CLI syntax reference", link: "ug/cli.html"},
{level: 2, name: "Config files format", link: "ug/configFiles.html"},
- {level: 2, name: "Advanced syntax: `author-config.csv`", link: "ug/authorConfigSyntax.html"},
+ {level: 2, name: "Advanced syntax: `author-config.csv`", link: "ug/authorConfigSyntax.html"},
{level: 2, name: "Using `@@author` tags", link: "ug/usingAuthorTags.html"},
{level: 2, name: "RepoSense with Netlify", link: "ug/withNetlify.html"},
{level: 2, name: "RepoSense with GitHub Actions", link: "ug/withGithubActions.html"},
diff --git a/docs/about.md b/docs/about.md
index 2946256f1f..1f1f2668ac 100644
--- a/docs/about.md
+++ b/docs/about.md
@@ -30,7 +30,7 @@ Contributor [2023 January - 2024 January]
### [Gokul Rajiv](https://github.com/gok99)
-**Role**: Senior Developer [2024 January - ]
+**Role**: Senior Developer [2024 January - ]
Contributor [2022 January - 2024 January]
diff --git a/docs/images/title-example.png b/docs/images/title-example.png
new file mode 100644
index 0000000000..a5aa8c908c
Binary files /dev/null and b/docs/images/title-example.png differ
diff --git a/docs/ug/authorConfigSyntax.md b/docs/ug/authorConfigSyntax.md
index c498f5e276..999820ce63 100644
--- a/docs/ug/authorConfigSyntax.md
+++ b/docs/ug/authorConfigSyntax.md
@@ -9,7 +9,7 @@
-Given below are the advanced syntax available for `author-config.csv`.
+Given below are the advanced syntax available for `author-config.csv`.
## Multiple `Repository's Location` per author
diff --git a/docs/ug/cli.md b/docs/ug/cli.md
index 55bbbb84a0..db0cbe5243 100644
--- a/docs/ug/cli.md
+++ b/docs/ug/cli.md
@@ -31,8 +31,7 @@ The section below provides explanations for each of the flags.
**`--assets ASSETS_DIRECTORY`**: Specifies where to place assets for report generation.
-* Parameter: `ASSETS_DIRECTORY` The directory containing the assets files. A `favicon.ico` file can be placed here to customize the favicon of the dashboard,
-while a `title.md` file can be placed to customize the header of the report using [Markdown syntax](https://www.markdownguide.org/basic-syntax/).
+* Parameter: `ASSETS_DIRECTORY` The directory containing the assets files. A `favicon.ico` file can be placed here to customize the favicon of the dashboard, while a `title.md` file can be placed to customize the [title](https://reposense.org/ug/customizingReports.html#add-a-title) of the report using [Markdown syntax](https://www.markdownguide.org/basic-syntax/).
* Alias: `-a`
* Example: `--assets ./assets` or `-a ./assets`
diff --git a/docs/ug/customizingReports.md b/docs/ug/customizingReports.md
index 24808775bd..da6ad7f49e 100644
--- a/docs/ug/customizingReports.md
+++ b/docs/ug/customizingReports.md
@@ -59,3 +59,17 @@ In both instances, it is **necessary to commit any changes** for them to be dete
3\. Add a git `.mailmap` file at the top-level of the repository, specifying mapped authors/commiters and/or e-mail addresses as per [gitmailmap documentation](https://git-scm.com/docs/gitmailmap). Any mappings specified here will be applied by git before all other RepoSense configurations. Configuration via `.mailmap` is particularly useful if you want the mapping to apply for all git commands as well instead of just for RepoSense.
+
+
+
+### Add a title
+
+A title component can be added by creating a file titled `title.md` in the assets directory. You can specify the assets directory according to the reference below:
+{{ embed("Appendix: **CLI syntax reference → `assets` flag**", "cli.md#section-assets") }}
+
+The title can render a combination of Markdown/HTML and plaintext ([example](https://github.com/reposense/RepoSense/blob/master/docs/ug/title.md)), and will appear on the top of the left panel as shown below:
+![Title Component Example](../images/title-example.png)
+
+Do note that the width of the title is bound by the width of the left panel.
+
+For more information on how to use Markdown, see the [Markdown Guide](https://www.markdownguide.org/).
diff --git a/docs/ug/title.md b/docs/ug/title.md
new file mode 100644
index 0000000000..4872c78a76
--- /dev/null
+++ b/docs/ug/title.md
@@ -0,0 +1,9 @@
+# RepoSense
+
+RepoSense is a powerful tool for analyzing repositories. It provides valuable insights into your codebase, helping you understand the development patterns, identify areas for improvement, and track the contributions of individual team members.
+
+## Features
+
+- Repository analysis: Gain a comprehensive overview of your codebase, including commit statistics, file changes, and code ownership.
+- Contribution tracking: Easily track the contributions made by each team member, including the number of commits, lines of code added/removed, and more.
+- Visualization: Visualize your repository's history and changes over time through interactive graphs and charts.
diff --git a/docs/ug/usingReports.md b/docs/ug/usingReports.md
index 7c19e8ba8c..ebe587bd2c 100644
--- a/docs/ug/usingReports.md
+++ b/docs/ug/usingReports.md
@@ -144,7 +144,7 @@ The `Code panel` allows users to see the code attributed to a specific author. C
* Clicking the file title toggles the file content.
* Clicking the first icon beside the file title opens the history view of the file on the remote repository.
* Clicking the second icon beside the file title opens the blame view of the file on the remote repository.
-* When using the code panel for a specific author, code attributed to the author is highlighted in green.
+* When using the code panel for a specific author, code attributed to the author is highlighted in green.
* When using the `merge group` option with `group by repos`, the code panel will consist of multiple authors' contributions. Code attributed to these authors can be differentiated by the highlight colors of the code. The color legend is shown at the top of each file and consists only those authors that edited a particular file.
* Non-trivial code segments that the selected author has not written are hidden by default, but you can toggle them by clicking on the %%:fas-plus-circle:%% icon.
diff --git a/frontend/cypress/config/repo-config.csv b/frontend/cypress/config/repo-config.csv
index 2766cf6f7d..ac97718da5 100644
--- a/frontend/cypress/config/repo-config.csv
+++ b/frontend/cypress/config/repo-config.csv
@@ -5,3 +5,6 @@ https://github.com/reposense/testrepo-Empty2.git,master,,,,,,,
https://github.com/reposense/testrepo-Empty3.git,master,,,,,,,
https://github.com/reposense/testrepo-Empty4.git,master,,,,,,,
https://github.com/reposense/testrepo-Empty5.git,master,,,,,,,
+https://github.com/reposense/publish-RepoSense.git,master,,,,,,,
+https://github.com/reposense/repoSense-action.git,main,,,,,,,
+https://github.com/reposense/RepoSense-auth-helper.git,master,,,,,,,
diff --git a/frontend/cypress/tests/chartView/chartView_mergeGroup.cy.js b/frontend/cypress/tests/chartView/chartView_mergeGroup.cy.js
index 9f363d802a..9c3a9bc460 100644
--- a/frontend/cypress/tests/chartView/chartView_mergeGroup.cy.js
+++ b/frontend/cypress/tests/chartView/chartView_mergeGroup.cy.js
@@ -8,18 +8,18 @@ describe('merge group', () => {
.check()
.should('be.checked');
- // after checking merge group, only one merged repo group will show
+ // after checking merge group, only four merged repo groups will show
cy.get('#summary-charts').find('.summary-chart')
- .should('have.length', 1);
+ .should('have.length', 4);
cy.get('#summary label.merge-group > input:visible')
.should('be.visible')
.uncheck()
.should('not.be.checked');
- // after un-checking merge group, all 5 summary charts will show
+ // after un-checking merge group, all 14 summary charts will show
cy.get('#summary-charts').find('.summary-chart')
- .should('have.length', 5);
+ .should('have.length', 14);
});
it('check and uncheck merge group when group by authors', () => {
@@ -31,9 +31,9 @@ describe('merge group', () => {
.check()
.should('be.checked');
- // after checking merge group, 5 merged author groups will show
+ // after checking merge group, 14 merged author groups will show
cy.get('#summary-charts').find('.summary-chart')
- .should('have.length', 5);
+ .should('have.length', 14);
cy.get('#summary label.merge-group > input:visible')
.first()
@@ -41,9 +41,9 @@ describe('merge group', () => {
.uncheck()
.should('not.be.checked');
- // after un-checking merge group, all 5 summary charts will show
+ // after un-checking merge group, all 14 summary charts will show
cy.get('#summary-charts').find('.summary-chart')
- .should('have.length', 5);
+ .should('have.length', 14);
});
it('merge group option should be disabled when group by none', () => {
@@ -56,26 +56,22 @@ describe('merge group', () => {
});
it('should have the correct number of merge group contribution bars and correct length', () => {
- // Assumption: The number of merge group contribution bars is 3 and the width of the third bar is 50%.
cy.get('#summary label.merge-group > input:visible')
.should('be.visible')
.check()
.should('be.checked');
- // get the three chart bars and assert they have the correct initial widths
+ // get the chart bars and assert they have the correct initial widths
+ const expectedWidths = [100, 100, 100, 15, 100, 100, 90, 30, 15];
cy.get('.stacked-bar__contrib--bar')
- .should('have.length', 3)
+ .should('have.length', expectedWidths.length)
.then(($bars) => {
// calculate the percentage of the width relative to the parent container
const parentWidth = $bars.eq(0).parent().width();
- const width1 = (parseFloat(window.getComputedStyle($bars[0]).width) / parentWidth) * 100;
- const width2 = (parseFloat(window.getComputedStyle($bars[1]).width) / parentWidth) * 100;
- const width3 = (parseFloat(window.getComputedStyle($bars[2]).width) / parentWidth) * 100;
-
- // assert that the widths are close enough to 100% and 50%
- expect(width1).to.be.closeTo(100, 1);
- expect(width2).to.be.closeTo(100, 1);
- expect(width3).to.be.closeTo(50, 1);
+ expectedWidths.forEach((expectedWidth, index) => {
+ const width = (parseFloat(window.getComputedStyle($bars[index]).width) / parentWidth) * 100;
+ expect(width).to.be.closeTo(expectedWidth, 1);
+ });
});
});
diff --git a/frontend/cypress/tests/chartView/chartView_scrollToActiveRepo.cy.js b/frontend/cypress/tests/chartView/chartView_scrollToActiveRepo.cy.js
index 97afc7b1ea..aa7d3a887a 100644
--- a/frontend/cypress/tests/chartView/chartView_scrollToActiveRepo.cy.js
+++ b/frontend/cypress/tests/chartView/chartView_scrollToActiveRepo.cy.js
@@ -49,8 +49,8 @@ describe('scroll to active repo', () => {
});
cy.url()
- .should('contain', 'tabAuthor=yong24s')
- .should('contain', 'tabRepo=reposense%2FRepoSense%5Bcypress%5D');
+ .should('contain', 'tabAuthor=Yong%20Hao%20TENG')
+ .should('contain', 'tabRepo=reposense%2Fpublish-RepoSense%5Bmaster%5D');
cy.reload();
diff --git a/frontend/cypress/tests/chartView/chartView_toolBar_searchBox.cy.js b/frontend/cypress/tests/chartView/chartView_toolBar_searchBox.cy.js
index 8fb9352fb6..51afc43787 100644
--- a/frontend/cypress/tests/chartView/chartView_toolBar_searchBox.cy.js
+++ b/frontend/cypress/tests/chartView/chartView_toolBar_searchBox.cy.js
@@ -18,7 +18,7 @@ describe('search bar', () => {
it('unique author shows one result', () => {
cy.get('#app #tab-resize .tab-close').click();
cy.get('#summary-wrapper input[type=text]')
- .type('Yong Hao TENG')
+ .type('Metta')
.type('{enter}');
cy.get('#summary-wrapper form.summary-picker')
diff --git a/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js b/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js
index d9667eee02..214ef84c40 100644
--- a/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js
+++ b/frontend/cypress/tests/codeView/codeView_switchAuthorship.cy.js
@@ -24,7 +24,7 @@ describe('switch authorship', () => {
// switch authorship view
cy.get('.icon-button.fa-code')
.should('exist')
- .last()
+ .eq(4)
.click();
// check default controls
diff --git a/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js b/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js
index 2ffa7eb383..dba07ecbc6 100644
--- a/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js
+++ b/frontend/cypress/tests/zoomView/zoomView_switchZoom.cy.js
@@ -24,7 +24,7 @@ describe('switch zoom', () => {
// switch zoom view
cy.get('.icon-button.fa-list-ul')
.should('exist')
- .last()
+ .eq(4)
.click();
cy.get('#tabs-wrapper').scrollTo('top');
diff --git a/frontend/public/title.md b/frontend/public/title.md
new file mode 100644
index 0000000000..b10a80835c
--- /dev/null
+++ b/frontend/public/title.md
@@ -0,0 +1,3 @@
+# RepoSense
+
+RepoSense is a powerful tool for analyzing repositories. It provides valuable insights into your codebase, helping you understand the development patterns, identify areas for improvement, and track the contributions of individual team members.
diff --git a/frontend/src/components/c-summary-charts.vue b/frontend/src/components/c-summary-charts.vue
index 7ebe313ddf..34f676bb88 100644
--- a/frontend/src/components/c-summary-charts.vue
+++ b/frontend/src/components/c-summary-charts.vue
@@ -27,11 +27,13 @@
)
| [{{ getGroupTotalContribution(repo) }} lines]
span.tooltip-text(
- v-if="filterGroupSelection === 'groupByRepos' && !isChartGroupWidgetMode"
- )(v-bind:ref="`summary-charts-${i}-total-contribution`") Total contribution of group
+ v-if="filterGroupSelection === 'groupByRepos' && !isChartGroupWidgetMode",
+ v-bind:ref="`summary-charts-${i}-total-contribution`"
+ ) Total contribution of group
span.tooltip-text(
- v-else-if="filterGroupSelection === 'groupByAuthors' && !isChartGroupWidgetMode"
- )(v-bind:ref="`summary-charts-${i}-total-contribution`") Total contribution of author
+ v-else-if="filterGroupSelection === 'groupByAuthors' && !isChartGroupWidgetMode",
+ v-bind:ref="`summary-charts-${i}-total-contribution`"
+ ) Total contribution of author
a(
v-if="!isGroupMerged(getGroupName(repo)) && !isChartGroupWidgetMode",
v-on:click="handleMergeGroup(getGroupName(repo))"