chore: remove test category from forum, remove test toggle buttons
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Portal is production - no more test topics. Changed topic #1 category
from 'test' to 'announcement'. Removed toggle-test UI from forum list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-04-10 08:05:44 +02:00
parent 8b2bfc3f5b
commit 4b4f57c060
2 changed files with 4 additions and 69 deletions

View File

@ -1666,15 +1666,14 @@ class ForumTopic(Base):
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
# Constants for validation
CATEGORIES = ['feature_request', 'bug', 'question', 'announcement', 'test']
CATEGORIES = ['feature_request', 'bug', 'question', 'announcement']
STATUSES = ['new', 'in_progress', 'resolved', 'rejected']
CATEGORY_LABELS = {
'feature_request': 'Propozycja funkcji',
'bug': 'Błąd',
'question': 'Pytanie',
'announcement': 'Ogłoszenie',
'test': 'Testowy'
'announcement': 'Ogłoszenie'
}
STATUS_LABELS = {

View File

@ -168,26 +168,6 @@
border-color: #d1d5db;
}
.topic-card.test-topic {
opacity: 0.6;
border-left: 4px solid #9ca3af;
}
.toggle-test-btn {
background: #fef3c7;
border-color: #fcd34d;
color: #92400e;
}
.toggle-test-btn:hover {
background: #fde68a;
}
.toggle-test-btn.active {
background: var(--primary);
border-color: var(--primary);
color: white;
}
/* Status badges */
.badge-status {
@ -377,13 +357,7 @@
<a href="{{ url_for('forum_index', has_solution='1', q=search_query) }}" class="filter-btn {% if has_solution == '1' %}active{% endif %}">✓ Z rozwiązaniem</a>
</div>
<!-- Toggle test topics -->
<div class="filter-group" style="margin-left: auto;">
<button type="button" id="toggleTestBtn" class="filter-btn toggle-test-btn" onclick="toggleTestTopics()">
<span class="hide-label">🙈 Ukryj testowe</span>
<span class="show-label" style="display:none;">👁 Pokaż testowe</span>
</button>
</div>
</div>
{% if search_query %}
@ -395,7 +369,7 @@
{% if topics %}
<div class="topics-list">
{% for topic in topics %}
<article class="topic-card {% if topic.is_pinned %}pinned{% endif %} {% if topic.is_locked %}locked{% endif %} {% if topic.category == 'test' %}test-topic{% endif %}">
<article class="topic-card {% if topic.is_pinned %}pinned{% endif %} {% if topic.is_locked %}locked{% endif %}">
<div class="topic-main">
<a href="{{ url_for('forum_topic', topic_id=topic.id) }}" class="topic-title">
{% if topic.is_pinned %}
@ -494,42 +468,4 @@
{% endblock %}
{% block extra_js %}
function setTestTopicsVisibility(hidden) {
const btn = document.getElementById('toggleTestBtn');
const hideLabel = btn.querySelector('.hide-label');
const showLabel = btn.querySelector('.show-label');
const testTopics = document.querySelectorAll('.test-topic');
if (hidden) {
testTopics.forEach(t => t.style.display = 'none');
hideLabel.style.display = 'none';
showLabel.style.display = '';
btn.classList.add('active');
} else {
testTopics.forEach(t => t.style.display = '');
hideLabel.style.display = '';
showLabel.style.display = 'none';
btn.classList.remove('active');
}
localStorage.setItem('hideTestTopics', hidden ? 'true' : 'false');
// Update topic count
const visibleTopics = document.querySelectorAll('.topic-card:not([style*="display: none"])').length;
const statsEl = document.querySelector('.forum-stats');
if (statsEl) {
statsEl.textContent = visibleTopics + ' tematów';
}
}
function toggleTestTopics() {
const isCurrentlyHidden = localStorage.getItem('hideTestTopics') === 'true';
setTestTopicsVisibility(!isCurrentlyHidden);
}
// Apply saved preference on page load
(function() {
if (localStorage.getItem('hideTestTopics') === 'true') {
setTestTopicsVisibility(true);
}
})();
{% endblock %}