Skip to content

Revert "To show Commits in Scrum Report " #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
- Edit it in the window.
- Copy the rich HTML using the `COPY` button.

## New Features
- The extension now uses parallel modern API requests along with data caching with a TTL(Time to Live) of 10 minutes.
- New fetch requests will be made if input data by user is changed.
- The cache data can be manually refreshed using the `Refresh Data` button.

## Setting up the code locally

```
Expand Down
Binary file modified docs/images/popup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,10 @@ body,input,div,h3,h4,p,label,hr, #scrumReport{
transition: color 0.3s ease-in-out;
}




.dark-mode hr {
border-color: #505050 !important;
transition: border-color 0.3s ease-in-out;
}

#scrumReport {
font-size: 13px !important;
line-height: 1.5 !important;
Expand Down
2 changes: 0 additions & 2 deletions src/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
</style>
</head>
<body>

<div class="pl-1 py-4 rounded-2xl">
<div class="bg-white px-4 py-4 mx-2 mb-2 rounded-3xl">
<div class="flex justify-between py-2">
Expand All @@ -28,7 +27,6 @@ <h3 class="text-3xl font-semibold ">Scrum Helper</h3>
<div>
<p class="">Report your development progress by auto-fetching your Git activity for a selected period</p>
</div>


<div class="center mt-2 ">
<label class="flex items-center justify-center gap-2">
Expand Down
65 changes: 17 additions & 48 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

var enableToggleElement = document.getElementById('enable');
var githubUsernameElement = document.getElementById('githubUsername');
var projectNameElement = document.getElementById('projectName');
Expand All @@ -8,7 +7,6 @@ var startingDateElement = document.getElementById('startingDate');
var endingDateElement = document.getElementById('endingDate');
var showOpenLabelElement = document.getElementById('showOpenLabel');
var userReasonElement = document.getElementById('userReason');

function handleBodyOnLoad() {
chrome.storage.local.get(
[
Expand Down Expand Up @@ -72,49 +70,22 @@ function handleBodyOnLoad() {
},
);
}

document.getElementById('refreshCache').addEventListener('click', async (e) => {
const button = e.currentTarget;
button.classList.add('loading');
button.disabled = true;

try {
const tabs = await chrome.tabs.query({active: true, currentWindow: true});
await chrome.tabs.sendMessage(tabs[0].id, {
action: 'forceRefresh',
timestamp: Date.now()
});

// Reload the active tab to re-inject content
chrome.tabs.reload(tabs[0].id);

M.toast({html: 'Data refreshed successfully!', classes: 'green'});
} catch (err) {
console.error('Refresh failed:', err);
M.toast({html: 'Failed to refresh data', classes: 'red'});
} finally {
setTimeout(() => {
button.classList.remove('loading');
button.disabled = false;
}, 500);
}
});

function handleEnableChange() {
let value = enableToggleElement.checked;
var value = enableToggleElement.checked;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

chrome.storage.local.set({ enableToggle: value });
}
function handleStartingDateChange() {
let value = startingDateElement.value;
var value = startingDateElement.value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

chrome.storage.local.set({ startingDate: value });
}
function handleEndingDateChange() {
let value = endingDateElement.value;
var value = endingDateElement.value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

chrome.storage.local.set({ endingDate: value });
}
function handleLastWeekContributionChange() {
let value = lastWeekContributionElement.checked;
let labelElement = document.querySelector("label[for='lastWeekContribution']");
var value = lastWeekContributionElement.checked;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

var labelElement = document.querySelector("label[for='lastWeekContribution']");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide


if (value) {
startingDateElement.disabled = true;
endingDateElement.disabled = true;
Expand Down Expand Up @@ -157,14 +128,12 @@ function handleYesterdayContributionChange() {
}

function getLastWeek() {

var today = new Date();
var lastWeek = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1);
var lastWeekMonth = lastWeek.getMonth() + 1;
var lastWeekDay = lastWeek.getDate();
var lastWeekYear = lastWeek.getFullYear();
var lastWeekDisplayPadded =

('0000' + lastWeekYear.toString()).slice(-4) +
'-' +
('00' + lastWeekMonth.toString()).slice(-2) +
Expand All @@ -187,12 +156,12 @@ function getYesterday() {
return yesterdayPadded;
}
function getToday() {
let today = new Date();
let Week = new Date(today.getFullYear(), today.getMonth(), today.getDate());
let WeekMonth = Week.getMonth() + 1;
let WeekDay = Week.getDate();
let WeekYear = Week.getFullYear();
let WeekDisplayPadded =
var today = new Date();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

var Week = new Date(today.getFullYear(), today.getMonth(), today.getDate());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

var WeekMonth = Week.getMonth() + 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

var WeekDay = Week.getDate();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

var WeekYear = Week.getFullYear();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

var WeekDisplayPadded =
('0000' + WeekYear.toString()).slice(-4) +
'-' +
('00' + WeekMonth.toString()).slice(-2) +
Expand All @@ -202,16 +171,16 @@ function getToday() {
}

function handleGithubUsernameChange() {
let value = githubUsernameElement.value;
var value = githubUsernameElement.value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

chrome.storage.local.set({ githubUsername: value });
}
function handleProjectNameChange() {
let value = projectNameElement.value;
var value = projectNameElement.value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

chrome.storage.local.set({ projectName: value });
}
function handleOpenLabelChange() {
let value = showOpenLabelElement.checked;
let labelElement = document.querySelector("label[for='showOpenLabel']");
var value = showOpenLabelElement.checked;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

var labelElement = document.querySelector("label[for='showOpenLabel']");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide


if (value) {
labelElement.classList.add("selectedLabel");
Expand All @@ -225,7 +194,7 @@ function handleOpenLabelChange() {
}

function handleUserReasonChange() {
let value = userReasonElement.value;
var value = userReasonElement.value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (code-quality): Use const or let instead of var. (avoid-using-var)

Explanation`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.

From the Airbnb JavaScript Style Guide

chrome.storage.local.set({ userReason: value });
}
enableToggleElement.addEventListener('change', handleEnableChange);
Expand Down
Loading