Skip to content

Commit 4821275

Browse files
authored
Merge pull request #141 from Preeti9764/name-rog
Added organisation name button
2 parents c3f2150 + f4e7c31 commit 4821275

File tree

6 files changed

+1007
-859
lines changed

6 files changed

+1007
-859
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ Scrum Helper is not limited to the [FOSSASIA](https://github.com/fossasia) organ
120120
* Save your changes.
121121
* For Chrome: Rebuild or reload the extension in your browser (`chrome://extensions` → Refresh your extension).
122122
* For Firefox: Reload the temporary add-on by going to `about:debugging`"This Firefox" → Click "Reload" next to your extension.
123-
124123
4. **How to Obtain a GitHub Personal Access Token**
125124

126125
- To use Scrum Helper with authenticated requests (for higher rate limits and private repositories), you need a GitHub personal access token.
@@ -155,8 +154,6 @@ Scrum Helper is not limited to the [FOSSASIA](https://github.com/fossasia) organ
155154
5. **Get Customized SCRUM Reports**
156155
- The reports will now be generated using contributions from your organization.
157156

158-
159-
160157
## About contributing
161158

162159
- Follow the Issues and PRs templates as far as possible.

src/index.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
@import "tailwindcss";
23
@tailwind base;
34
@tailwind components;
@@ -365,4 +366,4 @@ body,input,div,h3,h4,p,label,hr, #scrumReport{
365366
}
366367
.dark-mode .token-preview-char {
367368
box-shadow: 0 1px 4px rgba(0,0,0,0.18);
368-
}
369+
}

src/popup.html

Lines changed: 126 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
22
<html>
3+
34
<head>
45
<meta charset="UTF-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -8,71 +9,82 @@
89
<link rel="stylesheet" type="text/css" href="index.css">
910
<script src="./scripts/fontawesome.js"></script>
1011
<style type="text/css">
11-
html,body{
12-
width: 375px !important;
13-
height: 600px !important;
14-
max-height: 600px !important;
15-
overflow-y: scroll;
16-
background: #eae4e4;
17-
}
18-
</style>
12+
html,
13+
body {
14+
width: 375px !important;
15+
height: 600px !important;
16+
max-height: 600px !important;
17+
overflow-y: scroll;
18+
background: #eae4e4;
19+
}
20+
</style>
1921
</head>
22+
2023
<body>
2124
<div class="pl-1 py-4 rounded-2xl">
2225
<div class="bg-white px-4 py-4 mx-2 mb-2 rounded-3xl">
23-
<div class="flex justify-between py-2">
24-
<h3 id="scrumHelperHeading" class="text-3xl font-semibold cursor-pointer">Scrum Helper</h3>
25-
<img src="icons/night-mode.png" alt="Night Mode" class="w-7 h-7 mx-3 cursor-pointer">
26-
</div>
27-
<div>
28-
<p class="">Report your development progress by auto-fetching your Git activity for a selected period</p>
29-
</div>
30-
26+
<div class="flex justify-between py-2">
27+
<h3 id="scrumHelperHeading" class="text-3xl font-semibold cursor-pointer">Scrum Helper</h3>
28+
<img src="icons/night-mode.png" alt="Night Mode" class="w-7 h-7 mx-3 cursor-pointer">
29+
</div>
30+
<div>
31+
<p class="">Report your development progress by auto-fetching your Git activity for a selected period</p>
32+
</div>
33+
3134
<div class="center mt-2 flex justify-between">
32-
<label class="flex items-center justify-center gap-2 ">
33-
Disable
34-
<input type="checkbox" value="" id="enable" class="sr-only peer" >
35-
<div class="relative w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600 dark:peer-checked:bg-blue-600"></div>
36-
<span class=""></span>
37-
Enable
38-
</label>
39-
<div class="flex">
40-
<button id="homeButton" title="Go to Report" class="ml-1 p-2 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition">
41-
<i class="fa fa-home text-2xl text-gray-600 dark:text-gray-300"></i>
42-
</button>
43-
<button id="settingsToggle">
44-
<img id="settingsIcon" src="icons/settings-light.png" alt="Settings" class="w-6 h-6 mx-3 cursor-pointer">
45-
</button>
35+
<label class="flex items-center justify-center gap-2 ">
36+
Disable
37+
<input type="checkbox" value="" id="enable" class="sr-only peer">
38+
<div
39+
class="relative w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600 dark:peer-checked:bg-blue-600">
4640
</div>
41+
<span class=""></span>
42+
Enable
43+
</label>
44+
<div class="flex">
45+
<button id="homeButton" title="Go to Report"
46+
class="ml-1 p-2 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition">
47+
<i class="fa fa-home text-2xl text-gray-600 dark:text-gray-300"></i>
48+
</button>
49+
<button id="settingsToggle">
50+
<img id="settingsIcon" src="icons/settings-light.png" alt="Settings" class="w-6 h-6 mx-3 cursor-pointer">
51+
</button>
52+
</div>
4753
</div>
4854
</div>
49-
55+
5056
<div class="rounded-2xl">
5157
<div class=" border-gray-100 border-2 bg-white rounded-3xl px-4 py-4 mx-2 my-2">
5258

5359
<div id="reportSection" class="tab-content">
5460
<div>
5561
<h4>Your Project Name</h4>
56-
<input id="projectName" type="text" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Enter your project name">
62+
<input id="projectName" type="text"
63+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
64+
placeholder="Enter your project name">
5765
</div>
5866
<div>
5967
<h4>Your Github Username</h4>
60-
<input id="githubUsername" type="text" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Required for fetching your contributions">
68+
<input id="githubUsername" type="text"
69+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
70+
placeholder="Required for fetching your contributions">
6171
</div>
62-
72+
6373
<div>
6474
<p class="text-sm">Fetch your contributions between:</p>
6575
<div class="flex justify-between items-center my-2 mx-4">
6676
<div class="flex items-center gap-2">
67-
<input type="radio" id="lastWeekContribution" name="timeframe" class="form-radio" onclick="toggleRadio(this)">
77+
<input type="radio" id="lastWeekContribution" name="timeframe" class="form-radio"
78+
onclick="toggleRadio(this)">
6879
<label for="lastWeekContribution">Last 7 days</label>
6980
</div>
7081
<div class="flex items-center gap-2">
71-
<input type="radio" id="yesterdayContribution" name="timeframe" class="form-radio" onclick="toggleRadio(this)">
82+
<input type="radio" id="yesterdayContribution" name="timeframe" class="form-radio"
83+
onclick="toggleRadio(this)">
7284
<label for="yesterdayContribution">Last 1 day</label>
7385
</div>
7486
</div>
75-
87+
7688
<div id="customDateContainer" class="flex justify-between items-center mt-2">
7789
<div>
7890
<label for="startingDate">Start Date:</label>
@@ -84,38 +96,56 @@ <h4>Your Github Username</h4>
8496
</div>
8597
</div>
8698
</div>
87-
99+
88100
<div class="col s12">
89101
<br />
90102
<input type="checkbox" id="showOpenLabel" class="form-checkbox h-4 w-4 text-blue-600">
91-
<label id="checkboxLabel" for="showOpenLabel" class="text-gray-700 font-medium text-sm">Show Open/Closed Label</label>
103+
<label id="checkboxLabel" for="showOpenLabel" class="text-gray-700 font-medium text-sm">Show Open/Closed
104+
Label</label>
92105
</div>
93106
<div class="my-4">
94107
<p class="text-sm font-medium">What is blocking you from making progress?</p>
95-
<input id="userReason" type="text" class="w-full text-gray-800 mt-3 rounded-xl px-4 py-1" placeholder="Enter your reason">
108+
<input id="userReason" type="text" class="w-full text-gray-800 mt-3 rounded-xl px-4 py-1"
109+
placeholder="Enter your reason">
96110
<hr class="border-t-2 border-gray-700 mt-1 ">
97111
</div>
98112
<div>
99113
<div>
100114
<h6 class="text-base font-semibold">Scrum Report</h6>
101-
<div id="scrumReport"
102-
contenteditable="true"
103-
class="min-h-[200px] overflow-y-auto whitespace-pre-wrap border-2 border-gray-200 bg-gray-100 rounded-xl text-gray-800 p-2 my-2">
115+
<div id="scrumReport" contenteditable="true"
116+
class="min-h-[200px] overflow-y-auto whitespace-pre-wrap border-2 border-gray-200 bg-gray-100 rounded-xl text-gray-800 p-2 my-2">
104117
</div>
105118
</div>
106119
<div class="flex justify-between gap-2">
107-
<button id="generateReport" class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
108-
<i class="fa fa-refresh"></i> Generate Report
120+
<button id="generateReport"
121+
class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
122+
<i class="fa fa-refresh"></i> Generate Report
109123
</button>
110-
<button id="copyReport" class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
111-
<i class="fa fa-copy"></i> Copy Report
124+
<button id="copyReport"
125+
class="flex items-center gap-2 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded">
126+
<i class="fa fa-copy"></i> Copy Report
112127
</button>
113128
</div>
114129
</div>
115130
</div>
116131

117132
<div id="settingsSection" class="tab-content hidden">
118-
133+
<div class="">
134+
<div class="flex items-center mt-4">
135+
<h4>Organisation Name</h4>
136+
<span class="tooltip-container ml-2">
137+
<i class="fa fa-question-circle question-icon"></i>
138+
<span class="tooltip-bubble">
139+
<b>Which organisation's GitHub activity?</b><br>
140+
Enter the GitHub organisation name to fetch activites for. Default is <b>fossasia</b>.
141+
Organisation name is not case-sensitive.
142+
</span>
143+
</span>
144+
</div>
145+
<input id="orgInput" type="text"
146+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
147+
placeholder="Enter organisation name (default: fossasia)">
148+
</div>
119149
<div class="">
120150
<div class="flex items-center justify-between">
121151
<div class="flex">
@@ -124,9 +154,13 @@ <h4>Your Github Token</h4>
124154
<i class="fa fa-question-circle question-icon"></i>
125155
<span class="tooltip-bubble">
126156
<b>Why is it recommended to add a GitHub token?</b><br>
127-
Scrum Helper works without a GitHub token, but adding a personal access token is recommended for a better experience. It raises your API limits, allows access to private repos (if permitted), and improves accuracy and speed. Tokens are stored locally and never sent to us and used only to fetch your git data. You can add one anytime in the extension settings.<br><br>
157+
Scrum Helper works without a GitHub token, but adding a personal access token is recommended for a
158+
better experience. It raises your API limits, allows access to private repos (if permitted), and
159+
improves accuracy and speed. Tokens are stored locally and never sent to us and used only to fetch
160+
your git data. You can add one anytime in the extension settings.<br><br>
128161
<b>How to obtain:</b><br>
129-
1. Go to <a href="https://github.com/settings/tokens" target="_blank" style="color:#2563eb;text-decoration:underline;">GitHub Developer Settings</a>.<br>
162+
1. Go to <a href="https://github.com/settings/tokens" target="_blank"
163+
style="color:#2563eb;text-decoration:underline;">GitHub Developer Settings</a>.<br>
130164
3. Click "Generate new token", select classic token<br>
131165
4. Paste it here.<br>
132166
<i>Keep your token secret!</i>
@@ -137,19 +171,26 @@ <h4>Your Github Token</h4>
137171
<i id="tokenEyeIcon" class="fa fa-eye text-gray-600"></i>
138172
</button>
139173
</div>
140-
<input id="githubToken" type="password" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2 pr-10" placeholder="Required for making authenticated requests">
174+
<input id="githubToken" type="password"
175+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2 pr-10"
176+
placeholder="Required for making authenticated requests">
141177
<p class="text-sm font-medium">Enter cache TTL <span class="text-sm font-normal">(in minutes)</span>
142178
<span class="tooltip-container">
143179
<i class="fa fa-question-circle question-icon"></i>
144180
<span class="tooltip-bubble">
145-
We are caching the data to avoid redundant calls. By default the cache expires after 10 minutes, you can change it here to your desired time. We have given a refresh cache button in case you want to fetch fresh data right now.
181+
We are caching the data to avoid redundant calls. By default the cache expires after 10 minutes, you
182+
can change it here to your desired time. We have given a refresh cache button in case you want to
183+
fetch fresh data right now.
146184
</span>
147185
</span>
148-
</p>
149-
<input type="text" id="cacheInput" class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2" placeholder="Write Cache TTL in minutes (Default 10 minutes)">
186+
</p>
187+
<input type="text" id="cacheInput"
188+
class="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2"
189+
placeholder="Write Cache TTL in minutes (Default 10 minutes)">
150190
</div>
151191
<div class="">
152-
<button id="refreshCache" class="w-full mt-3 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded flex items-center justify-center gap-2 transition-colors duration-200">
192+
<button id="refreshCache"
193+
class="w-full mt-3 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded flex items-center justify-center gap-2 transition-colors duration-200">
153194
<i class="fa fa-refresh"></i>
154195
<span>Refresh Data (bypass cache)</span>
155196
</button>
@@ -158,53 +199,55 @@ <h4>Your Github Token</h4>
158199
Use this button to fetch fresh data immediately.
159200
</p>
160201
</div>
161-
202+
162203
</div>
163204

164205
<!-- asdfghjklkjhgfdsasdfghjkjhgfdsasdfghjk -->
165206
<div class="border-gray-100 border-2 bg-white rounded-3xl px-4 py-2 mx-2 my-2">
166207
<div>
167208
<h4 class="font-semibold text-xl">Note:</h4>
168209
<ul class="text-xs list-disc list-inside">
169-
<li>The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week. (<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues/20">See this issue</a>.)
210+
<li>The PRs fetched are based on the most recent review by any contributor. If you reviewed a PR 10 days
211+
ago and someone else reviewed it 2 days ago, it will still appear in your activity for the past week.
212+
(<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues/20">See this issue</a>.)
170213
</li>
171-
<li>Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing and editing the report to ensure accuracy before sharing
214+
<li>Please note that some discrepancies may occur in the generated SCRUM. We recommend manually reviewing
215+
and editing the report to ensure accuracy before sharing
172216
</li>
173217
</ul>
174218
</div>
175219
</div>
176-
</div>
220+
</div>
177221

178-
<div class="mt-6 border-t border-gray-300">
179-
<div class="bg-white rounded-3xl mx-2 mt-4 mb-2 p-4 border border-gray-100 shadow-sm">
180-
<div class="flex items-center justify-center space-x-3">
181-
<a target="_blank"
182-
href="https://github.com/fossasia/scrum_helper"
183-
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
184-
<i class="fa fa-code text-sm"></i>
185-
<span class="text-sm font-medium">View Code</span>
186-
</a>
187-
<a target="_blank"
188-
href="https://github.com/fossasia/scrum_helper/issues"
189-
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
190-
<i class="fa fa-bug text-sm"></i>
191-
<span class="text-sm font-medium">Report Issue</span>
192-
</a>
193-
</div>
194-
</div>
195-
<div class="mt-3 pt-3 border-t border-gray-200 flex justify-center items-center py-5">
196-
<p class="text-xs text-gray-600 text-center">
197-
Made with ❤️ by <strong>FOSSASIA</strong>
198-
<span class="text-gray-500 dark:text-gray-300">v2.0</span>
199-
</p>
222+
<div class="mt-6 border-t border-gray-300">
223+
<div class="bg-white rounded-3xl mx-2 mt-4 mb-2 p-4 border border-gray-100 shadow-sm">
224+
<div class="flex items-center justify-center space-x-3">
225+
<a target="_blank" href="https://github.com/fossasia/scrum_helper"
226+
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
227+
<i class="fa fa-code text-sm"></i>
228+
<span class="text-sm font-medium">View Code</span>
229+
</a>
230+
<a target="_blank" href="https://github.com/fossasia/scrum_helper/issues"
231+
class="bg-blue-50 hover:bg-blue-100 text-blue-600 transition-all duration-200 rounded-lg px-4 py-2 flex items-center space-x-2">
232+
<i class="fa fa-bug text-sm"></i>
233+
<span class="text-sm font-medium">Report Issue</span>
234+
</a>
235+
</div>
236+
</div>
237+
<div class="mt-3 pt-3 border-t border-gray-200 flex justify-center items-center py-5">
238+
<p class="text-xs text-gray-600 text-center">
239+
Made with ❤️ by <strong>FOSSASIA</strong>
240+
<span class="text-gray-500 dark:text-gray-300">v2.0</span>
241+
</p>
242+
</div>
243+
</div>
200244
</div>
201245
</div>
202-
</div>
203-
</div>
204246
<script src="scripts/jquery-3.2.1.min.js"></script>
205247
<script type="text/javascript" type="text/javascript" src="materialize/js/materialize.min.js"></script>
206248
<script src="scripts/main.js"></script>
207249
<script src="scripts/scrumHelper.js"></script>
208250
<script src="scripts/popup.js"></script>
209251
</body>
252+
210253
</html>

0 commit comments

Comments
 (0)