From 0b31708b4842fb0dbaa66ca606e24399c5e0f4f8 Mon Sep 17 00:00:00 2001
From: Benoit
Date: Mon, 25 May 2026 10:02:20 +0200
Subject: [PATCH] fix: correction layout matrice routing (affichage en grille)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Ajout grid-template-columns dynamique basé sur nombre groupes
- Suppression display:contents qui causait le bug
- Utilisation de fragments React au lieu de div wrapper
- Matrice 1: 120px + N colonnes pour les groupes
- Matrice 2: 120px + 8 colonnes pour les outputs
- Nettoyage CSS classes inutilisées
---
client/src/components/AudioRoutingMatrix.css | 14 ++-----
client/src/components/AudioRoutingMatrix.jsx | 40 +++++++++-----------
2 files changed, 22 insertions(+), 32 deletions(-)
diff --git a/client/src/components/AudioRoutingMatrix.css b/client/src/components/AudioRoutingMatrix.css
index b862d15..8fd071d 100644
--- a/client/src/components/AudioRoutingMatrix.css
+++ b/client/src/components/AudioRoutingMatrix.css
@@ -41,20 +41,18 @@
}
.routing-matrix {
- display: grid;
+ display: inline-grid;
gap: 2px;
background: var(--color-border);
border: 1px solid var(--color-border);
border-radius: 8px;
- overflow: hidden;
+ overflow-x: auto;
+ max-width: 100%;
}
.matrix-corner {
background: var(--color-surface-hover);
-}
-
-.matrix-header-row {
- display: contents;
+ min-height: 50px;
}
.matrix-header-cell {
@@ -72,10 +70,6 @@
hyphens: auto;
}
-.matrix-row {
- display: contents;
-}
-
.matrix-label-cell {
background: var(--color-surface-hover);
padding: var(--spacing-sm);
diff --git a/client/src/components/AudioRoutingMatrix.jsx b/client/src/components/AudioRoutingMatrix.jsx
index f88ab2f..59e63a9 100644
--- a/client/src/components/AudioRoutingMatrix.jsx
+++ b/client/src/components/AudioRoutingMatrix.jsx
@@ -119,20 +119,18 @@ function AudioRoutingMatrix({ groups, channelNames }) {
Sélectionnez quels inputs audio alimentent chaque groupe
-
+
-
- {groups.map(group => (
-
- {group.name}
-
- ))}
-
+ {groups.map(group => (
+
+ {group.name}
+
+ ))}
{Array.from({length: 8}, (_, i) => (
-
-
+ <>
+
{getChannelName('inputs', i)}
@@ -145,7 +143,7 @@ function AudioRoutingMatrix({ groups, channelNames }) {
{isInputRoutedToGroup(String(i), group.id) &&
✓}
))}
-
+ >
))}
@@ -156,20 +154,18 @@ function AudioRoutingMatrix({ groups, channelNames }) {
Sélectionnez vers quels outputs chaque groupe envoie son audio
-
+
-
- {Array.from({length: 8}, (_, i) => (
-
- {getChannelName('outputs', i)}
-
- ))}
-
+ {Array.from({length: 8}, (_, i) => (
+
+ {getChannelName('outputs', i)}
+
+ ))}
{groups.map(group => (
-
-
+ <>
+
{group.name}
@@ -182,7 +178,7 @@ function AudioRoutingMatrix({ groups, channelNames }) {
{isGroupRoutedToOutput(group.id, String(i)) &&
✓}
))}
-
+ >
))}