Fix: Design-System-Regression v1102 — .hidden(!important) vs style.display app-weit
Rene: 'Tagebuch Kalenderansicht/Karte nicht mehr da' — Root-Cause: 459cd42
ersetzte style="display:none" durch class="hidden", aber die Show-Pfade
setzten weiter style.display. .hidden hat !important und gewinnt immer
(gleiche Klasse wie Filter-Panel-Hotfix v1242). Prod-Logs bewiesen: kein
einziger /diary/calendar- oder /locations-Request kam je an.
Unsichtbar seit v1102, jetzt per classList gefixt:
- diary: Stats-Bar mit View-Switcher (Liste/Medien/Kalender/Karte) + Medien-Grid neuer Eintrag
- health: KI-Tierarzt-Ergebnis erschien nie
- walks: Challenge-/Stamm-Gassi-Tabs leer
- welcome: iOS-Panel der Desktop-Install-Anleitung
- wiki: Fotos-Mod-Badge + Foto-Fallback (via app.js data-fb show-el/sibling-Handler)
- routes: Filter-Badge; breeder: Fotos-Section
Zweite Fehlerklasse aus demselben Sprint: doppelte class-Attribute
(class="x" id=… class="hidden") — Browser verwirft das zweite Attribut.
87 Vorkommen in 23 Dateien zusammengeführt; betroffene Show/Hide-Pfade
(ev-map, rk-mine/nearby-group, chat-partner-dot, eh-panel, zh-section)
auf classList umgestellt.
This commit is contained in:
parent
5acbaaa97b
commit
178aef7fb0
32 changed files with 197 additions and 188 deletions
|
|
@ -352,13 +352,13 @@ window.Page_routes = (() => {
|
|||
<button class="rk-chip" data-filter="sort" data-val="dog">Hundefreundlich</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rk-filter-group" id="rk-mine-group" class="hidden">
|
||||
<div class="rk-filter-group hidden" id="rk-mine-group">
|
||||
<div class="rk-filter-label">Eigene</div>
|
||||
<div class="rk-chips-row">
|
||||
<button class="rk-chip" data-filter="mine" data-val="mine">🔒 Nur meine</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rk-filter-group" id="rk-nearby-group" class="hidden">
|
||||
<div class="rk-filter-group hidden" id="rk-nearby-group">
|
||||
<div class="rk-filter-label">Umgebung</div>
|
||||
<div class="rk-chips-row">
|
||||
<button class="rk-chip" id="rk-nearby-btn" data-filter="nearby" data-val="">${UI.icon('map-pin')} In meiner Nähe</button>
|
||||
|
|
@ -430,7 +430,7 @@ window.Page_routes = (() => {
|
|||
const badge = document.getElementById('rk-filter-badge');
|
||||
if (!badge) return;
|
||||
const hasFilter = _difficulty !== '' || _terrain !== '' || _sortBy !== 'newest' || _onlyMine;
|
||||
badge.style.display = hasFilter ? '' : 'none';
|
||||
badge.classList.toggle('hidden', !hasFilter); // .hidden hat !important → nur classList
|
||||
}
|
||||
|
||||
function _setBrowseMode(mode) {
|
||||
|
|
@ -450,8 +450,8 @@ window.Page_routes = (() => {
|
|||
if (mode === 'suggest') {
|
||||
if (recBtn) recBtn.style.display = 'none';
|
||||
if (impWrap) impWrap.style.display = 'none';
|
||||
if (mineGrp) mineGrp.style.display = 'none';
|
||||
if (nearbyGrp) nearbyGrp.style.display = 'none';
|
||||
if (mineGrp) mineGrp.classList.add('hidden');
|
||||
if (nearbyGrp) nearbyGrp.classList.add('hidden');
|
||||
if (searchRow) searchRow.style.display = 'none';
|
||||
if (actRow) actRow.style.display = 'none';
|
||||
const filterPanel = document.getElementById('rk-filter-panel');
|
||||
|
|
@ -474,13 +474,13 @@ window.Page_routes = (() => {
|
|||
if (mode === 'discover') {
|
||||
if (recBtn) recBtn.style.display = 'none';
|
||||
if (impWrap) impWrap.style.display = 'none';
|
||||
if (mineGrp) mineGrp.style.display = 'none';
|
||||
if (nearbyGrp && _userPos) nearbyGrp.style.display = '';
|
||||
if (mineGrp) mineGrp.classList.add('hidden');
|
||||
if (nearbyGrp && _userPos) nearbyGrp.classList.remove('hidden');
|
||||
} else {
|
||||
if (recBtn) recBtn.style.display = '';
|
||||
if (impWrap) impWrap.style.display = '';
|
||||
if (_appState.user && mineGrp) mineGrp.style.display = '';
|
||||
if (nearbyGrp) nearbyGrp.style.display = 'none';
|
||||
if (_appState.user && mineGrp) mineGrp.classList.remove('hidden');
|
||||
if (nearbyGrp) nearbyGrp.classList.add('hidden');
|
||||
}
|
||||
_onlyMine = false;
|
||||
document.querySelectorAll('#rk-mine-group .rk-chip').forEach(c => c.classList.remove('active'));
|
||||
|
|
@ -1439,9 +1439,9 @@ window.Page_routes = (() => {
|
|||
const pending = _getPending();
|
||||
if (pending.length) _data = [...pending, ..._data];
|
||||
if (_appState.user && _browseMode === 'mine')
|
||||
document.getElementById('rk-mine-group')?.style.setProperty('display', '');
|
||||
document.getElementById('rk-mine-group')?.classList.remove('hidden');
|
||||
if (_browseMode === 'discover' && _userPos)
|
||||
document.getElementById('rk-nearby-group')?.style.setProperty('display', '');
|
||||
document.getElementById('rk-nearby-group')?.classList.remove('hidden');
|
||||
if (!online && pending.length)
|
||||
UI.toast.info('Offline — ' + pending.length + ' Route(n) warten auf Sync.');
|
||||
_applyFilter();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue