feat(gui): Rename Context Hub to Project Settings
- gui_2.py: Window title changed to 'Project Settings' - app_controller.py: show_windows key updated - Updated tests to reference new name
This commit is contained in:
@@ -4,7 +4,8 @@
|
|||||||
Focus: Remove redundant ui_summary_only, rename Context Hub, establish project-level vs discussion-level separation
|
Focus: Remove redundant ui_summary_only, rename Context Hub, establish project-level vs discussion-level separation
|
||||||
|
|
||||||
- [x] Task: Audit current ui_summary_only usages and document behavior to deprecate [f6fe3ba] (embedded audit)
|
- [x] Task: Audit current ui_summary_only usages and document behavior to deprecate [f6fe3ba] (embedded audit)
|
||||||
- [~] Task: Remove ui_summary_only checkbox from _render_projects_panel (gui_2.py)
|
- [x] Task: Remove ui_summary_only checkbox from _render_projects_panel (gui_2.py) [f5d4913]
|
||||||
|
- [~] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar
|
||||||
- [ ] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar
|
- [ ] Task: Rename Context Hub to "Project Settings" in _gui_func tab bar
|
||||||
- [ ] Task: Remove Context Presets tab from Project Settings (Context Hub)
|
- [ ] Task: Remove Context Presets tab from Project Settings (Context Hub)
|
||||||
- [ ] Task: Update references in show_windows dict and any help text
|
- [ ] Task: Update references in show_windows dict and any help text
|
||||||
|
|||||||
@@ -950,7 +950,7 @@ class AppController:
|
|||||||
bg_shader.get_bg().enabled = gui_cfg.get("bg_shader_enabled", False)
|
bg_shader.get_bg().enabled = gui_cfg.get("bg_shader_enabled", False)
|
||||||
|
|
||||||
_default_windows = {
|
_default_windows = {
|
||||||
"Context Hub": True,
|
"Project Settings": True,
|
||||||
"Files & Media": True,
|
"Files & Media": True,
|
||||||
"AI Settings": True,
|
"AI Settings": True,
|
||||||
"MMA Dashboard": True,
|
"MMA Dashboard": True,
|
||||||
|
|||||||
@@ -639,9 +639,9 @@ class App:
|
|||||||
self._tool_log_cache = log_raw
|
self._tool_log_cache = log_raw
|
||||||
self._tool_log_dirty = False
|
self._tool_log_dirty = False
|
||||||
|
|
||||||
if self.show_windows.get("Context Hub", False):
|
if self.show_windows.get("Project Settings", False):
|
||||||
exp, opened = imgui.begin("Context Hub", self.show_windows["Context Hub"])
|
exp, opened = imgui.begin("Project Settings", self.show_windows["Project Settings"])
|
||||||
self.show_windows["Context Hub"] = bool(opened)
|
self.show_windows["Project Settings"] = bool(opened)
|
||||||
if exp:
|
if exp:
|
||||||
if imgui.begin_tab_bar('context_hub_tabs'):
|
if imgui.begin_tab_bar('context_hub_tabs'):
|
||||||
if imgui.begin_tab_item('Projects')[0]:
|
if imgui.begin_tab_item('Projects')[0]:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ def test_gui2_hubs_exist_in_show_windows(app_instance: App) -> None:
|
|||||||
This ensures they will be available in the 'Windows' menu.
|
This ensures they will be available in the 'Windows' menu.
|
||||||
"""
|
"""
|
||||||
expected_hubs = [
|
expected_hubs = [
|
||||||
"Context Hub",
|
"Project Settings",
|
||||||
"AI Settings",
|
"AI Settings",
|
||||||
"Discussion Hub",
|
"Discussion Hub",
|
||||||
"Operations Hub",
|
"Operations Hub",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ def test_new_hubs_defined_in_show_windows(mock_app: App) -> None:
|
|||||||
This ensures they will be available in the 'Windows' menu.
|
This ensures they will be available in the 'Windows' menu.
|
||||||
"""
|
"""
|
||||||
expected_hubs = [
|
expected_hubs = [
|
||||||
"Context Hub",
|
"Project Settings",
|
||||||
"AI Settings",
|
"AI Settings",
|
||||||
"Discussion Hub",
|
"Discussion Hub",
|
||||||
"Operations Hub",
|
"Operations Hub",
|
||||||
@@ -53,7 +53,7 @@ def test_hub_windows_exist_in_gui2(app_instance_simple: Any) -> None:
|
|||||||
"""
|
"""
|
||||||
Verifies that the new Hub windows are present in the show_windows dictionary.
|
Verifies that the new Hub windows are present in the show_windows dictionary.
|
||||||
"""
|
"""
|
||||||
hubs = ["Context Hub", "AI Settings", "Discussion Hub", "Operations Hub"]
|
hubs = ["Project Settings", "AI Settings", "Discussion Hub", "Operations Hub"]
|
||||||
for hub in hubs:
|
for hub in hubs:
|
||||||
assert hub in app_instance_simple.show_windows
|
assert hub in app_instance_simple.show_windows
|
||||||
|
|
||||||
|
|||||||
22
tests/test_project_settings_rename.py
Normal file
22
tests/test_project_settings_rename.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import pytest
|
||||||
|
import inspect
|
||||||
|
|
||||||
|
|
||||||
|
def test_context_hub_renamed_to_project_settings():
|
||||||
|
import src.gui_2 as gui_2
|
||||||
|
|
||||||
|
source = inspect.getsource(gui_2.App._gui_func)
|
||||||
|
assert "Project Settings" in source, (
|
||||||
|
"Context Hub should be renamed to Project Settings"
|
||||||
|
)
|
||||||
|
assert '"Context Hub"' not in source, '"Context Hub" string should be removed'
|
||||||
|
|
||||||
|
|
||||||
|
def test_show_windows_key_updated():
|
||||||
|
import src.app_controller as app_controller
|
||||||
|
|
||||||
|
source = inspect.getsource(app_controller.AppController)
|
||||||
|
assert '"Project Settings"' in source or "'Project Settings'" in source, (
|
||||||
|
"show_windows key should be Project Settings"
|
||||||
|
)
|
||||||
|
assert '"Context Hub"' not in source, '"Context Hub" key should be removed'
|
||||||
Reference in New Issue
Block a user