Skip to content

Commit de3f0d4

Browse files
committed
Remove progress tracking features and related UI elements from the application
1 parent d5ac560 commit de3f0d4

File tree

5 files changed

+16
-71
lines changed

5 files changed

+16
-71
lines changed

flask_app/app.py

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -260,39 +260,12 @@ def get_card_type(category, demo):
260260
return "algorithm-card"
261261

262262
def get_demo_status(demo):
263-
# Placeholder logic for demo status
264-
if "TODO" in demo.get("title", "").upper():
265-
return "todo"
266-
if demo.get("id") and hash(demo["id"]) % 5 == 0:
267-
return "partial"
268-
return "complete"
269-
270-
def get_progress_percentage(demo):
271-
status = get_demo_status(demo)
272-
if status == "complete":
273-
return 100
274-
if status == "partial":
275-
return 50
276-
return 0
277-
278-
def get_progress_text(demo):
279-
status = get_demo_status(demo)
280-
if status == "complete":
281-
return "Completed"
282-
if status == "partial":
283-
return "In Progress"
284-
return "Not Started"
285-
286-
def get_category_progress(category, demos):
287-
completed = sum(1 for d in demos if get_demo_status(d) == "complete")
288-
return int((completed / len(demos)) * 100) if demos else 0
263+
# Simplified: no progress tracking
264+
return "ok"
289265

290266
return dict(
291267
get_card_type=get_card_type,
292268
get_demo_status=get_demo_status,
293-
get_progress_percentage=get_progress_percentage,
294-
get_progress_text=get_progress_text,
295-
get_category_progress=get_category_progress,
296269
)
297270

298271

flask_app/static/style.css

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -760,26 +760,22 @@ code {
760760
margin-bottom: 1rem;
761761
}
762762

763-
.progress-indicator {
764-
margin-top: 1rem;
763+
/* Removed old progress-indicator */
765764
}
766765

767-
.progress-bar {
768-
width: 100%;
766+
/* Removed old progress-bar */
769767
height: 6px;
770768
background-color: var(--border);
771769
border-radius: 9999px;
772770
overflow: hidden;
773771
}
774772

775-
.progress-fill {
776-
height: 100%;
773+
/* Removed old progress-fill */
777774
background-color: var(--accent-2);
778775
border-radius: 9999px;
779776
}
780777

781-
.progress-text {
782-
font-size: 0.75rem;
778+
/* Removed old progress-text */
783779
color: var(--muted);
784780
margin-top: 0.25rem;
785781
}

flask_app/templates/index.html

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h2 class="text-2xl font-bold text-white mb-2">Python DSA Dashboard</h2>
88
<div class="dashboard-stats flex flex-wrap gap-4 text-sm text-gray-400">
99
<span class="badge-info">{{ total_demos or 134 }} demos</span>
1010
<span class="badge-info">{{ categories|length or 17 }} categories</span>
11-
<span class="badge-success">{{ completion_percentage or 87 }}% complete</span>
11+
<!-- Removed old completion percentage -->
1212
{% if remaining_todos %}
1313
<span class="badge-warning">{{ remaining_todos }} TODOs</span>
1414
{% endif %}
@@ -37,12 +37,7 @@ <h2 class="text-2xl font-bold text-white mb-2">Python DSA Dashboard</h2>
3737
{% endfor %}
3838
</select>
3939

40-
<select id="status-filter" class="filter-select" aria-label="Filter by completion status">
41-
<option value="">All Status</option>
42-
<option value="complete">Complete</option>
43-
<option value="partial">In Progress</option>
44-
<option value="todo">TODO</option>
45-
</select>
40+
<!-- Removed old status filter -->
4641
</div>
4742
</div>
4843
</div>
@@ -61,9 +56,7 @@ <h2 class="text-2xl font-bold text-white mb-2">Python DSA Dashboard</h2>
6156
<button class="view-tab" data-view="visualizations" role="tab">
6257
Visualizations
6358
</button>
64-
<button class="view-tab" data-view="progress" role="tab">
65-
Progress Tracking
66-
</button>
59+
<!-- Removed old tab -->
6760
</nav>
6861
</header>
6962

@@ -123,15 +116,7 @@ <h3 class="card-title">{{ d.title }}</h3>
123116
{% endif %}
124117
</div>
125118

126-
<!-- Progress indicator for incomplete items -->
127-
{% if get_demo_status(d) != 'complete' %}
128-
<div class="progress-indicator">
129-
<div class="progress-bar">
130-
<div class="progress-fill" style="width: {{ get_progress_percentage(d) }}%"></div>
131-
</div>
132-
<span class="progress-text">{{ get_progress_text(d) }}</span>
133-
</div>
134-
{% endif %}
119+
<!-- Removed old indicator -->
135120
</div>
136121

137122
<!-- Card Actions -->
@@ -220,7 +205,7 @@ <h3>Search Results</h3>
220205
// Event listeners
221206
document.getElementById('global-search').addEventListener('input', handleSearch);
222207
document.getElementById('category-filter').addEventListener('change', handleFilters);
223-
document.getElementById('status-filter').addEventListener('change', handleFilters);
208+
// Removed old status filter listener
224209

225210
// View tabs
226211
document.querySelectorAll('.view-tab').forEach(tab => {
@@ -233,8 +218,7 @@ <h3>Search Results</h3>
233218
// Menu dropdowns
234219
document.addEventListener('click', handleMenus);
235220

236-
// Initialize progress circles
237-
initializeProgressCircles();
221+
// Removed old initialization
238222
}
239223

240224
// Search functionality
@@ -264,18 +248,12 @@ <h3>Search Results</h3>
264248
// Filter functionality
265249
function handleFilters() {
266250
const categoryFilter = document.getElementById('category-filter').value;
267-
const statusFilter = document.getElementById('status-filter').value;
268-
269251
let filtered = allCards;
270252

271253
if (categoryFilter) {
272254
filtered = filtered.filter(card => card.dataset.category === categoryFilter);
273255
}
274256

275-
if (statusFilter) {
276-
filtered = filtered.filter(card => card.dataset.status === statusFilter);
277-
}
278-
279257
filterCards(filtered);
280258
}
281259

tests/test_demos.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,5 @@ def test_run_all_demos_headless():
4949
assert hasattr(mod, "demo"), f"Module {module_id} missing demo()"
5050
out = run_demo(module_id)
5151
assert isinstance(out, str)
52-
# Ensure no progress tracking remnants in output (UI-related only)
53-
assert "progress tracking" not in out.lower()
54-
assert "progress ui" not in out.lower()
55-
# Do not assert on generic words like "complete" since they appear in algorithm logs
52+
# Ensure no UI remnants of old progress system
53+
assert "progress" not in out.lower()

tests/test_flask_smoke.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def test_index_page(client):
2222
assert resp.status_code == 200
2323
# Dashboard should contain some known entries injected at runtime
2424
assert b"Sorting Visualizations" in resp.data
25-
# Ensure progress UI is not present
25+
# Ensure no remnants of old progress UI
2626
page = resp.data.lower()
27-
assert b"progress-tracking" not in page
27+
assert b"progress" not in page
2828
assert b"todos" not in page
2929

3030

0 commit comments

Comments
 (0)