Skip to content
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
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
# SCRUM Helper

This chrome extension helps you to write scrums in google groups for FOSSASIA related projects. You need to add your github username, dates, and other options. It fetches your PRs, Issues, and the PRs you reviewed from Github API, and prefills the SCRUM. You can edit the scrum further to meet your needs.
**SCRUM Helper** is a Chrome extension designed to simplify writing scrums in Google Groups for FOSSASIA projects. By adding your GitHub username, date range, and other options, it automatically fetches your PRs, Issues, and reviewed PRs via the GitHub API and pre-fills the scrum. You can then edit the scrum to fit your needs.


![SCRUMLOGO](docs/images/scrumhelper-png.png)

## Features

- Fetches your GitHub PRs, Issues, and reviewed PRs
- Auto-generates scrum updates
- Supports Google Groups, Gmail, Yahoo, and Outlook compose windows

## How to install

1. Clone this repository to your local machine.
2. Go to `chrome://extensions` on your chrome browser.
3. Turn on developer mode if not already on.
4. Load unpacked extension from `src` folder.
5. Click on the Scrum Helper icon you see on your browser toolbar.
6. Fill in the settings in the popup.
7. **For Google Groups:**
- Open https://groups.google.com/forum/#!newtopic/<groupname> and start a New Conversation.
8. Refresh the page to apply the new settings.
9. **For Gmail, Yahoo, and Outlook:**
- Open the Compose window.
- Follow Step 8 to ensure the settings take effect.
3. Enable Developer Mode (toggle in the top-right) if not already.
4. Click Load unpacked and select the `src` folder inside the cloned repo
5. Click the Scrum Helper icon on your browser toolbar
6. Fill in your settings in the popup (GitHub username, date range, etc.)

## Usage
### For Google Groups:
- Open Google Groups New Topic
- Start a New Conversation
- Refresh the page to apply the Scrum Helper settings
- Use the pre-filled scrum and edit as needed

### For Gmail, Yahoo, and Outlook:
- Open the Compose window.
- Ensure the Scrum Helper settings are applied (follow step 6 above)
- The extension will prefill scrum content for you to edit

## 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.
Binary file modified docs/images/scrum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,17 @@ li {
list-style-type: disc !important;
margin-left: 1rem;
}
.selectedLabel {
font-weight: 400;
color: #333333;
}

.unselectedLabel {
font-weight: 300;
color: #666666;
}

.selectedLabel, .unselectedLabel {
transition: color 0.3s ease-in-out, font-weight 0.3s ease-in-out;
}

15 changes: 13 additions & 2 deletions src/scripts/emailClientAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,19 @@ class EmailClientAdapter {
},
yahoo: {
selectors: {
body: '#editor-container [contenteditable="true"][role="textbox"]',
subject: 'input[placeholder="Subject"][type="text"]',
body: [
'[aria-multiline="true"][aria-label="Message body"][contenteditable="true"][role="textbox"]',
'[aria-label="Message body"][contenteditable="true"]',
'[role="textbox"][contenteditable="true"]',
'[data-test-id*="compose"][contenteditable="true"]',
'.compose-editor [contenteditable="true"]'
].join(', '),
subject: [
'#compose-subject-input',
'input[placeholder="Subject"]',
'input[aria-label*="subject" i]',
'input[data-test-id*="subject" i]'
].join(', ')
},
eventTypes: {
contentChange: 'input',
Expand Down
50 changes: 39 additions & 11 deletions src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function handleBodyOnLoad() {
'userReason',
'lastWeekContribution',
'gsoc',
'selectedTab',
],
(items) => {
if (items.githubUsername) {
Expand Down Expand Up @@ -65,6 +66,15 @@ function handleBodyOnLoad() {
} else {
handleCodeheatClick();
}
if (items.selectedTab === 'gsoc') {
handleGsocClick();
}
else {
handleCodeheatClick();
}

// initialize materialize tabs
$('.tabs').tabs('select_tab', items.selectedTab === 'gsoc' ? 'gsocBox' : 'codeheatBox' );
},
);
}
Expand All @@ -82,19 +92,27 @@ function handleEndingDateChange() {
}
function handleLastWeekContributionChange() {
var value = lastWeekContributionElement.checked;
var labelElement = document.querySelector("label[for='lastWeekContribution']");

if (value) {
startingDateElement.disabled = true;
endingDateElement.disabled = true;
endingDateElement.value = getToday();
startingDateElement.value = getLastWeek();
handleEndingDateChange();
handleStartingDateChange();
startingDateElement.disabled = true;
endingDateElement.disabled = true;
endingDateElement.value = getToday();
startingDateElement.value = getLastWeek();
handleEndingDateChange();
handleStartingDateChange();
labelElement.classList.add("selectedLabel");
labelElement.classList.remove("unselectedLabel");
} else {
startingDateElement.disabled = false;
endingDateElement.disabled = false;
startingDateElement.disabled = false;
endingDateElement.disabled = false;
labelElement.classList.add("unselectedLabel");
labelElement.classList.remove("selectedLabel");
}

chrome.storage.local.set({ lastWeekContribution: value });
}

function getLastWeek() {
var today = new Date();
var noDays_to_goback = gsoc == 0 ? 7 : 1;
Expand Down Expand Up @@ -135,9 +153,19 @@ function handleProjectNameChange() {
}
function handleOpenLabelChange() {
var value = showOpenLabelElement.checked;
var labelElement = document.querySelector("label[for='showOpenLabel']");

if (value) {
labelElement.classList.add("selectedLabel");
labelElement.classList.remove("unselectedLabel");
} else {
labelElement.classList.add("unselectedLabel");
labelElement.classList.remove("selectedLabel");
}

chrome.storage.local.set({ showOpenLabel: value });
chrome.storage.local.set({ showClosedLabel: value });
}

function handleUserReasonChange() {
var value = userReasonElement.value;
chrome.storage.local.set({ userReason: value });
Expand All @@ -147,15 +175,15 @@ function handleCodeheatClick() {
$('#codeheatTab').addClass('active');
$('.tabs').tabs();
$('#noDays').text('7 days');
chrome.storage.local.set({ gsoc: 0 });
chrome.storage.local.set({ gsoc: 0, selectedTab: 'codeheat' });
handleLastWeekContributionChange();
}
function handleGsocClick() {
gsoc = 1;
$('#gsocTab').addClass('active');
$('.tabs').tabs();
$('#noDays').text('1 day');
chrome.storage.local.set({ gsoc: 1 });
chrome.storage.local.set({ gsoc: 1, selectedTab: 'gsoc' });
handleLastWeekContributionChange();
}
enableToggleElement.addEventListener('change', handleEnableChange);
Expand Down