Skip to content

Commit

Permalink
Move "Panel Options" control to the top as "Display"
Browse files Browse the repository at this point in the history
I chose the title "Display" even though it is called "layout" in the
state because "Layout" is already used to describe tree layout, and I
didn't want translations to conflict.
  • Loading branch information
victorlin committed Oct 23, 2023
1 parent 0b1a5d5 commit bc770ec
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 22 deletions.
19 changes: 10 additions & 9 deletions src/components/controls/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import ToggleTangle from "./toggle-tangle";
import Language from "./language";
import { ControlsContainer } from "./styles";
import FilterData, {FilterInfo} from "./filter";
import {TreeInfo, MapInfo, AnimationOptionsInfo, PanelOptionsInfo,
import {TreeInfo, MapInfo, AnimationOptionsInfo, PanelLayoutInfo,
ExplodeTreeInfo, EntropyInfo, FrequencyInfo, MeasurementsInfo} from "./miscInfoText";
import { ControlHeader } from "./controlHeader";
import MeasurementsOptions from "./measurementsOptions";
Expand Down Expand Up @@ -54,6 +54,15 @@ function Controls({ mobileDisplay }: Props) {
<ControlHeader title={t("sidebar:Filter Data")} tooltip={FilterInfo} mobile={mobileDisplay}/>
<FilterData measurementsOn={panelsToDisplay.includes("measurements")} />

{canTogglePanelLayout ?
<>
<ControlHeader title={t("sidebar:Display")} tooltip={PanelLayoutInfo} mobile={mobileDisplay} />
<PanelLayout />
</>
:
<span style={{ marginTop: "10px" }}></span>
}

{panelsAvailable.includes("tree") &&
<PanelSection
panel="tree"
Expand Down Expand Up @@ -122,14 +131,6 @@ function Controls({ mobileDisplay }: Props) {
<AnimationOptions />
</span>

{canTogglePanelLayout &&
<>
<span style={{ paddingTop: "10px" }} />
<ControlHeader title={t("sidebar:Panel Options")} tooltip={PanelOptionsInfo} mobile={mobileDisplay} />
<PanelLayout />
</>
}

<span style={{ paddingTop: "10px" }} />
<ControlHeader title={t("sidebar:Language")} mobile={mobileDisplay}/>
<Language />
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/miscInfoText.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const AnimationOptionsInfo = (
</>
);

export const PanelOptionsInfo = (
export const PanelLayoutInfo = (
<>
Control whether to show the tree and the map side-by-side (<em>grid</em>) or expanded (<em>full</em>).
</>
Expand Down
1 change: 0 additions & 1 deletion src/locales/ar/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Animation Speed": "سرعة الحركة",
"Loop animation": "حركة متكررة",
"Animate cumulative history": "تحريك التاريخ التراكمي",
"Panel Options": "خيارات اللوحة",
"Tree": "الشجرة",
"Map": "الخريطة",
"Entropy": "الانتروبيا",
Expand Down
1 change: 0 additions & 1 deletion src/locales/de/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"Animation Speed": "Geschwindigkeit der Animation",
"Loop animation": "In einer Schleife animieren",
"Animate cumulative history": "Gesamten Verlauf miteinbeziehen",
"Panel Options": "Hauptansicht-Einstellungen",
"Tree": "Baum",
"Map": "Karte",
"Entropy": "Entropie",
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"Animation Speed": "Animation Speed",
"Loop animation": "Loop animation",
"Animate cumulative history": "Animate cumulative history",
"Panel Options": "Panel Options",
"Display": "Display",
"Tree": "Tree",
"Map": "Map",
"Entropy": "Entropy",
Expand Down
1 change: 0 additions & 1 deletion src/locales/es/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"Animation Speed": "Velocidad de la animación",
"Loop animation": "Repitir la animación",
"Animate cumulative history": "Animar historial cumulativo",
"Panel Options": "Opciones del panel",
"Tree": "Árbol",
"Map": "Mapa",
"Entropy": "Entropía",
Expand Down
1 change: 0 additions & 1 deletion src/locales/fr/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Animation Speed": "Vitesse d'animation",
"Loop animation": "Animation en boucle",
"Animate cumulative history": "Animer l'historique cumulatif",
"Panel Options": "Options du panneau",
"Tree": "Arbre",
"Map": "Carte",
"Entropy": "Entropie",
Expand Down
1 change: 0 additions & 1 deletion src/locales/it/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Animation Speed": "Velocità di animazioni",
"Loop animation": "Animazioni in loop",
"Animate cumulative history": "Animare la storia cumulativa",
"Panel Options": "Opzioni di pannello",
"Tree": "Albero",
"Map": "Mappa",
"Entropy": "Entropia",
Expand Down
1 change: 0 additions & 1 deletion src/locales/ja/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Animation Speed": "アニメーション速度",
"Loop animation": "アニメーションを繰り返し",
"Animate cumulative history": "累積の履歴をアニメーション",
"Panel Options": "パネルのオプション",
"Tree": "ツリー",
"Map": "地図",
"Entropy": "エントロピー",
Expand Down
1 change: 0 additions & 1 deletion src/locales/lt/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Animation Speed": "Animacijos greitis",
"Loop animation": "Kartoti laiko atkarpą",
"Animate cumulative history": "Rodyti kauptinę istoriją",
"Panel Options": "Langų parinktys",
"Tree": "Medį",
"Map": "Žemėlapį",
"Entropy": "Entropiją",
Expand Down
1 change: 0 additions & 1 deletion src/locales/pl/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"Animation Speed": "Szybkość animacji",
"Loop animation": "Animacja pętli",
"Animate cumulative history": "Animuj historię zbiorczą",
"Panel Options": "Opcje panelu",
"Tree": "Drzewo",
"Map": "Mapę",
"Entropy": "Entropię",
Expand Down
1 change: 0 additions & 1 deletion src/locales/pt/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Animation Speed": "Velocidade de Animação",
"Loop animation": "Repetir a animação",
"Animate cumulative history": "Animar o histórico acumulado",
"Panel Options": "Painel de Opções",
"Tree": "Árvore",
"Map": "Mapa",
"Entropy": "Entropia",
Expand Down
1 change: 0 additions & 1 deletion src/locales/ru/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"Animation Speed": "Скорость Анимации",
"Loop animation": "Повтор анимации",
"Animate cumulative history": "Анимировать кумулятивную историю",
"Panel Options": "Настройки Панели",
"Tree": "Дерево",
"Map": "Карту",
"Entropy": "Энтропию",
Expand Down
1 change: 0 additions & 1 deletion src/locales/tr/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Animation Speed": "Animasyon Hızı",
"Loop animation": "Döngülü animasyon",
"Animate cumulative history": "Kümülatif tarihçeyi canlandır",
"Panel Options": "Panel Seçenekleri",
"Tree": "Ağacı",
"Map": "Haritayı",
"Entropy": "Entropiyi",
Expand Down

0 comments on commit bc770ec

Please sign in to comment.