From 086a64b81258e0655a845b7e4d46bf2c584909e3 Mon Sep 17 00:00:00 2001 From: Sky Blaise <69448615+SkyBlaise99@users.noreply.github.com> Date: Mon, 8 Jan 2024 14:07:16 +0800 Subject: [PATCH] [#944] Improve visualization for full and partial credit (#2070) * [#2027] Fix date range bug (#2034) Currently, users are unable to select a zoom range that includes the until date. This results in misleading data being presented to users. * [#2039] Update cypress minimum requirement to 12.15.0 (#2041) Chrome bug is causing cypress to fail to open a browser on Github Actions, causing frontend tests and CI to fail. Upgrading cypress to greater than 12.15.0 will fix this issue. Let's upgrade cypress to fix the failing CI. * [#1936] Migrate c-segment.vue to typescript (#2035) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate the rest of the JavaScript code to TypeScript code to facilitate future changes to the code. * [#1936] Migrate load-font-awesome-icons.js to typescript (#2040) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate the rest of the JavaScript code to TypeScript code to facilitate future changes to the code. * [#2045] Fix cypress zoom feature test (#2047) Currently, Cypress zoom feature tests are failing due to a recent change in behavior caused by a bug fix. With the tests failing, we are unable to detect any future regressions. Let's update the Cypress tests to test for the new intended behavior. * [#1936] Migrate random-color-gen.js to typescript (#2043) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate random-color-generator.js JavaScript code to TypeScript code to facilitate future changes to the code. * [#1936] Migrate c-segment-collection.vue to typescript (#2036) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate the rest of the JavaScript code to TypeScript code to facilitate future changes to the code. * [#1936] Migrate c-resizer.vue to typescript (#2038) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate the rest of the JavaScript code to TypeScript code to facilitate future changes to the code. * Bump zod from 3.20.6 to 3.22.3 in /frontend (#2048) Bumps [zod](https://github.com/colinhacks/zod) from 3.20.6 to 3.22.3. - [Release notes](https://github.com/colinhacks/zod/releases) - [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md) - [Commits](https://github.com/colinhacks/zod/compare/v3.20.6...v3.22.3) --- updated-dependencies: - dependency-name: zod dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump @cypress/request and cypress in /frontend/cypress (#2042) Bumps [@cypress/request](https://github.com/cypress-io/request) to 3.0.1 and updates ancestor dependency [cypress](https://github.com/cypress-io/cypress). These dependencies need to be updated together. Updates `@cypress/request` from 2.88.12 to 3.0.1 - [Release notes](https://github.com/cypress-io/request/releases) - [Changelog](https://github.com/cypress-io/request/blob/master/CHANGELOG.md) - [Commits](https://github.com/cypress-io/request/compare/v2.88.12...v3.0.1) Updates `cypress` from 12.17.4 to 13.3.0 - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](https://github.com/cypress-io/cypress/compare/v12.17.4...v13.3.0) --- updated-dependencies: - dependency-name: "@cypress/request" dependency-type: indirect - dependency-name: cypress dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [#1936] Migrate c-ramp.vue to typescript (#2037) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate the rest of the JavaScript code to TypeScript code to facilitate future changes to the code. * Give partial credit if annotated author is not the same as the blame author * [#2054] Fix zoom view bug (#2055) Currently, when granularity is set to day or week, clicking on a ramp will open up a zoom view where commit messages are not being displayed and sorting by insertions does not result in any sorting. Let's fix the unintended behaviour of the zoom view. * [#1936] Migrate repo-sorter.js to typescript (#2052) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate repo-sorter.js to TypeScript code to facilitate future changes to the code. * [#1936] Migrate safari_date.js to typescript (#2053) Currently, there is still some JavaScript code which remains unmigrated. This allows for type unsafe code to be written, potentially resulting in unintended behavior. Let's migrate safari_date.js to TypeScript code to facilitate future changes to the code. * Remove frontend JS lint (#2063) Currently, frontend linter is failing due to lint scripts checking javascript files, the last of which has been removed in PR #2053. Lets update the lint command to exclude javascript files front the check. * use full and partial credit color * [#1929] Add dynamic positioning support for tooltips (#2056) Currently, most tooltips are shown above buttons and text. When these tooltips appear at the top of the viewport, part of the tooltips will not be rendered. Let's implement changes such that these tooltips appear below the text or button, when appearing at the top of the viewport. * Add test cases for annotated author overriding last author's credit * revert merge from master * revert merge from master 58b70025 * [#1928] Fix tooltip zIndex such that it doesn't occlude next file title (#2057) Currently, if one hovers over a tooltip of the pinned title of a file whose content is scrolled almost completely, such that the title of the next file is just below the pinned title, the tooltip is not displayed appropriately, as the title of the next file obstructs it. Let's fix this issue. * [#1726] Update GitHub-specific references in codebase and docs (#2050) There are still leftover references specific to GitHub on parts of the codebase and docs that have been generalized to accept other remote git hosts. Let's update these GitHub references to use more general language. * Trigger workflow * Revert "Merge branch 'master' into 944-analyze-authorship" This reverts commit 950c9121699f3d87e6a6d3333c2536e1b7b0afb9, reversing changes made to 4bd05a7042d26169b12458679e244055c8d3670b. * fix frontend test failing --------- Signed-off-by: dependabot[bot] Co-authored-by: jq1836 <95712150+jq1836@users.noreply.github.com> Co-authored-by: Chan Jun Da <65345505+chan-j-d@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pratham Jain <71367149+pratham31012002@users.noreply.github.com> --- frontend/src/styles/_colors.scss | 3 ++- frontend/src/views/c-authorship.vue | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/styles/_colors.scss b/frontend/src/styles/_colors.scss index ca250b293a..e7ba7fc5c8 100644 --- a/frontend/src/styles/_colors.scss +++ b/frontend/src/styles/_colors.scss @@ -303,7 +303,8 @@ $mui-colors: ( 'github': ( 'title-background': #FAFBFC, 'border': #E1E4E8, - 'authored-code-background': #E6FFED, + 'full-authored-code-background': #C8E6C9, + 'partial-authored-code-background': #E6FFED, ), 'grey': ( '50': #FAFAFA, diff --git a/frontend/src/views/c-authorship.vue b/frontend/src/views/c-authorship.vue index 7222b86146..550025dfd6 100644 --- a/frontend/src/views/c-authorship.vue +++ b/frontend/src/views/c-authorship.vue @@ -984,7 +984,7 @@ export default defineComponent({ .segment { border-left: .25rem solid mui-color('green'); .code { - background-color: mui-color('github', 'authored-code-background'); + background-color: mui-color('github', 'full-authored-code-background'); padding-left: 1rem; } .line-number { @@ -1009,7 +1009,7 @@ export default defineComponent({ } &.isNotFullCredit { .code { - background-color: mui-color('green', '100'); + background-color: mui-color('github', 'partial-authored-code-background'); } } &.untouched {