Implement responsive profile and account data controls

This commit is contained in:
hz
2026-07-19 13:39:15 -05:00
parent 7508d4fe1d
commit dacf2b89b2
22 changed files with 1099 additions and 290 deletions
+21
View File
@@ -72,6 +72,27 @@ func _run() -> void:
var question_bank_nav := main_screen.sidebar.find_child("NavQuestionBank", true, false) as Button
_assert(question_bank_nav != null and question_bank_nav.text == "Question Bank", "the Practice navigation item should be replaced by Question Bank")
_assert(main_screen.sidebar.find_child("NavPractice", true, false) == null, "the sidebar should not retain a Practice navigation item")
var profile_nav := main_screen.sidebar.find_child("NavPerformance", true, false) as Button
var settings_nav := main_screen.sidebar.find_child("NavSettings", true, false) as Button
_assert(profile_nav != null and settings_nav != null and profile_nav.get_index() + 1 == settings_nav.get_index(), "Profile should sit directly above Settings in the lower navigation group")
var theme_service = root.get_node("UIThemeService")
var prior_dark_mode: bool = theme_service.is_dark_mode()
theme_service.set_dark_mode(true)
await process_frame
theme_service.set_dark_mode(false)
await process_frame
var dashboard = main_screen.screens.get("dashboard")
var dashboard_card := dashboard.metric_grid.get_parent() as PanelContainer
var dashboard_box := dashboard_card.get_theme_stylebox("panel") as StyleBoxFlat
_assert(dashboard_box.bg_color.is_equal_approx(Color.WHITE), "dashboard cards should remain light after the shell refresh")
var simulations = main_screen.screens.get("simulation_history")
var simulation_box := simulations.active_section.get_theme_stylebox("panel") as StyleBoxFlat
_assert(simulation_box.bg_color.is_equal_approx(simulations._section_box(false).bg_color), "exam simulation panels should remain light after the shell refresh")
var notes_screen = main_screen.screens.get("notes")
var notes_box := notes_screen.notes_editor.editor.get_theme_stylebox("normal") as StyleBoxFlat
_assert(notes_box.bg_color.is_equal_approx(Color.WHITE), "the Notes editor should remain light after the shell refresh")
theme_service.set_dark_mode(prior_dark_mode)
await process_frame
host.queue_free()
await process_frame