Skip to content

Commit 9825b9d

Browse files
Update footer settings
1 parent 7484678 commit 9825b9d

4 files changed

Lines changed: 77 additions & 10 deletions

File tree

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Quand vous ajoutez ou modifiez une fractale, mettez à jour tous les points conc
4646
- chargement des exports WASM
4747
- source map
4848
- listes de coloration syntaxique si nécessaire
49+
- puis mettez à jour le module UI concerné dans `public/js/` si le changement touche l'export, les signets, le panneau source/benchmark ou un autre helper navigateur extrait
4950
6. Mettez à jour `README.md` si les capacités documentées changent.
5051

5152
## Règles de rendu
@@ -69,6 +70,9 @@ Exécutez ces commandes après toute modification significative :
6970

7071
```powershell
7172
node --check public\js\renderer.js
73+
node --check public\js\renderer-source-panel.js
74+
node --check public\js\renderer-bookmarks.js
75+
node --check public\js\renderer-export.js
7276
python scripts\compile_wasm.py
7377
python scripts\integration_checks.py
7478
python scripts\ui_smoke_checks.py
@@ -82,7 +86,7 @@ Ordre important : `compile_wasm.py` régénère des artefacts dans `public/`. Re
8286
- Décrivez le comportement modifié et les zones du dépôt touchées.
8387
- Indiquez les commandes de validation exécutées localement.
8488
- Ajoutez des captures d'écran ou une courte vidéo si l'interface ou le rendu changent visiblement.
85-
- Si vous ajoutez une fractale, vérifiez sa présence dans `src/main.ml`, `scripts/compile_wasm.ml`, `scripts/integration_checks.py` et `public/js/renderer.js`.
89+
- Si vous ajoutez une fractale, vérifiez sa présence dans `src/main.ml`, `scripts/compile_wasm.ml`, `scripts/integration_checks.py` et dans les registres conservés dans `public/js/renderer.js` (`VIEW_PRESETS`, `FRACTAL_FAMILIES`, `FRACTAL_SOURCE_MAP`, `wasmFunctions`, `POINT_FRACTALS`/`LINE_FRACTALS` selon le cas).
8690

8791
## Documentation
8892

public/css/style.css

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,13 @@ pre {
639639
/* ---- Barre de contrôles ---- */
640640
#controls {
641641
grid-area: controls;
642+
position: relative;
642643
display: flex;
643644
flex-direction: column;
644645
align-items: flex-start;
645646
justify-content: space-between;
646-
gap: 16px;
647-
padding: 8px 20px;
647+
gap: 12px;
648+
padding: 8px 16px;
648649
background: rgba(8, 12, 22, 0.98);
649650
border-top: 1px solid var(--border);
650651
-webkit-backdrop-filter: blur(10px);
@@ -653,6 +654,13 @@ pre {
653654
z-index: 10;
654655
}
655656

657+
.controls-minimize-btn {
658+
position: absolute;
659+
top: 10px;
660+
right: 16px;
661+
z-index: 2;
662+
}
663+
656664
.controls-summary {
657665
width: 100%;
658666
display: flex;
@@ -697,6 +705,10 @@ pre {
697705
display: flex;
698706
}
699707

708+
#controls.collapsed .controls-minimize-btn {
709+
display: none;
710+
}
711+
700712
#controls:not(.collapsed) .controls-summary {
701713
display: none;
702714
}
@@ -711,6 +723,9 @@ pre {
711723
align-items: flex-start;
712724
gap: 16px;
713725
min-width: 0;
726+
width: 100%;
727+
padding-right: 44px;
728+
box-sizing: border-box;
714729
flex: 1 1 auto;
715730
flex-wrap: nowrap;
716731
overflow: visible;
@@ -741,7 +756,7 @@ pre {
741756
align-items: center;
742757
gap: 10px 12px;
743758
min-width: 0;
744-
padding: 12px 14px;
759+
padding: 10px 12px;
745760
border: 1px solid rgba(255, 255, 255, 0.06);
746761
border-radius: var(--radius-lg);
747762
background:
@@ -962,6 +977,25 @@ pre {
962977
padding: 4px 10px;
963978
}
964979

980+
#btn-close-custom-palette {
981+
display: none;
982+
}
983+
984+
.icon-btn {
985+
justify-content: center;
986+
width: 32px;
987+
min-width: 32px;
988+
height: 32px;
989+
padding: 0;
990+
border-radius: 999px;
991+
font-size: 15px;
992+
line-height: 1;
993+
}
994+
995+
.palette-control-stack .icon-btn {
996+
margin-left: auto;
997+
}
998+
965999
.custom-palette-preview {
9661000
height: 20px;
9671001
border: 1px solid var(--border);

public/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ <h2>Source &amp; Performances</h2>
219219
BARRE DE CONTRÔLES
220220
============================================================ -->
221221
<footer id="controls" role="toolbar" aria-label="Contrôles de rendu">
222+
<button id="btn-minimize-controls" class="btn btn-secondary icon-btn controls-minimize-btn" type="button"
223+
aria-expanded="true" aria-controls="controls-main" aria-label="Réduire les contrôles" title="Réduire les contrôles">
224+
<span aria-hidden="true"></span>
225+
</button>
222226
<div id="controls-summary" class="controls-summary hidden">
223227
<div class="controls-summary-main">
224228
<span id="controls-summary-fractal" class="controls-summary-fractal">mandelbrot</span>

public/js/renderer.js

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ const controlsSummary = document.getElementById("controls-summary");
166166
const controlsSummaryFractal = document.getElementById("controls-summary-fractal");
167167
const controlsSummaryDetails = document.getElementById("controls-summary-details");
168168
const btnToggleControls = document.getElementById("btn-toggle-controls");
169+
const btnMinimizeControls = document.getElementById("btn-minimize-controls");
169170
const familySelect = document.getElementById("family-select");
170171
const fractalSelect = document.getElementById("fractal-select");
171172
const multibrotPower = document.getElementById("multibrot-power");
@@ -617,7 +618,9 @@ function definirVisibiliteEditeurPalette(forceOuverture) {
617618
customPaletteControls.classList.toggle("hidden", !afficher);
618619
toggleCustomPaletteButton.classList.toggle("hidden", !palettePersonnalisee);
619620
toggleCustomPaletteButton.setAttribute("aria-expanded", afficher ? "true" : "false");
620-
toggleCustomPaletteButton.textContent = afficher ? "Reduire" : "Editer";
621+
toggleCustomPaletteButton.innerHTML = `<span aria-hidden="true">${afficher ? "▴" : "▾"}</span>`;
622+
toggleCustomPaletteButton.setAttribute("aria-label", afficher ? "Réduire la palette personnalisée" : "Afficher la palette personnalisée");
623+
toggleCustomPaletteButton.title = afficher ? "Réduire la palette personnalisée" : "Afficher la palette personnalisée";
621624
if (afficher) rendreEditeurPalette();
622625
}
623626

@@ -651,8 +654,19 @@ function mettreAJourResumeControles() {
651654

652655
function appliquerEtatControles() {
653656
if (controlsFooter) controlsFooter.classList.toggle("collapsed", controlsCollapsed);
654-
if (btnToggleControls) btnToggleControls.setAttribute("aria-expanded", controlsCollapsed ? "false" : "true");
655-
if (btnToggleControls) btnToggleControls.textContent = controlsCollapsed ? "Afficher" : "Réduire";
657+
if (btnToggleControls) {
658+
btnToggleControls.setAttribute("aria-expanded", controlsCollapsed ? "false" : "true");
659+
btnToggleControls.textContent = controlsCollapsed ? "Afficher" : "Réduire";
660+
btnToggleControls.innerHTML = `<span aria-hidden="true">${controlsCollapsed ? "▴" : "▾"}</span>`;
661+
btnToggleControls.setAttribute("aria-label", controlsCollapsed ? "Afficher les contrôles" : "Réduire les contrôles");
662+
btnToggleControls.title = controlsCollapsed ? "Afficher les contrôles" : "Réduire les contrôles";
663+
}
664+
if (btnMinimizeControls) {
665+
btnMinimizeControls.setAttribute("aria-expanded", controlsCollapsed ? "false" : "true");
666+
btnMinimizeControls.innerHTML = `<span aria-hidden="true">${controlsCollapsed ? "▴" : "▾"}</span>`;
667+
btnMinimizeControls.setAttribute("aria-label", controlsCollapsed ? "Afficher les contrôles" : "Réduire les contrôles");
668+
btnMinimizeControls.title = controlsCollapsed ? "Afficher les contrôles" : "Réduire les contrôles";
669+
}
656670
if (controlsSummary) controlsSummary.classList.toggle("hidden", false);
657671
mettreAJourResumeControles();
658672
}
@@ -2597,6 +2611,13 @@ if (btnToggleControls) {
25972611
btnToggleControls.addEventListener("click", () => {
25982612
definirEtatControles(!controlsCollapsed);
25992613
});
2614+
btnToggleControls.classList.add("icon-btn");
2615+
}
2616+
2617+
if (btnMinimizeControls) {
2618+
btnMinimizeControls.addEventListener("click", () => {
2619+
definirEtatControles(true);
2620+
});
26002621
}
26012622

26022623
multibrotPower.addEventListener("change", () => {
@@ -2623,14 +2644,18 @@ paletteSelect.addEventListener("change", () => {
26232644
render();
26242645
});
26252646

2647+
toggleCustomPaletteButton.classList.add("icon-btn");
26262648
toggleCustomPaletteButton.addEventListener("click", () => {
26272649
if (params.palette !== "personnalisee") return;
26282650
definirVisibiliteEditeurPalette(!customPaletteEditorOpen);
26292651
});
26302652

2631-
closeCustomPaletteButton.addEventListener("click", () => {
2632-
definirVisibiliteEditeurPalette(false);
2633-
});
2653+
if (closeCustomPaletteButton) {
2654+
closeCustomPaletteButton.classList.add("hidden");
2655+
closeCustomPaletteButton.addEventListener("click", () => {
2656+
definirVisibiliteEditeurPalette(false);
2657+
});
2658+
}
26342659

26352660
paletteBackgroundInput.addEventListener("input", () => {
26362661
params.palette = "personnalisee";

0 commit comments

Comments
 (0)