Refine library dashboard layout - #46
Conversation
| hero_l.setContentsMargins(30, 24, 30, 24) | ||
| kicker = QLabel("FEATURED") | ||
| kicker.setStyleSheet(section_header_style(theme) + "padding:0;") | ||
| hero_title = QLabel("Elden Ring") |
There was a problem hiding this comment.
Populate the hero card from the user's library
This hero card is rendered for every user with hard-coded Elden Ring copy, so libraries that do not contain that game still advertise it; the Launch/Details buttons created below are also not connected to any Game, so they cannot act on the displayed item. Please derive this card from an actual featured/selected game or hide it when no valid game is available.
Useful? React with 👍 / 👎.
|
|
||
| layout.addWidget(self.list, 1) | ||
|
|
||
| help_card = QLabel("All your games.\nOrganized and healthy.\n\nWe manage shortcut-based libraries, updates, health checks, and notes so you can just play.") |
There was a problem hiding this comment.
Hide the help card when collapsing the sidebar
When set_collapsed(True) runs, _update_collapsed_visuals hides only the title, New Collection button, and version label; this added help_card is local and remains visible in the 48px icon-only sidebar, consuming nav space and rendering wrapped text in the collapsed rail. Store it as an attribute and toggle its visibility with the other expanded-only controls.
Useful? React with 👍 / 👎.
| hero_l.addWidget(hero_desc) | ||
| hero_l.addSpacing(theme.spacing_md) | ||
| hero_l.addLayout(hero_actions) | ||
| content_layout.addWidget(hero) |
There was a problem hiding this comment.
Hide the hero on non-library pages
When the user navigates to Health Checks or Updates, _on_nav_changed hides only the grid and the new dashboard_cards; this hero is added unconditionally and kept as a local widget, so those tool pages still show the featured library panel above their tables. Store the hero as an attribute and hide it alongside the dashboard cards for non-library navigation.
Useful? React with 👍 / 👎.
| update_games = [ | ||
| g for g in self._all_games | ||
| if getattr(g, "source_version_raw", "") | ||
| and getattr(g, "installed_version_raw", "") | ||
| and g.source_version_raw != g.installed_version_raw | ||
| ] |
There was a problem hiding this comment.
Reuse version comparison for update summary
For games with both versions set, this raw string inequality reports an update even when the installed version is newer or the versions only differ in formatting (for example 2.0 installed vs 1.0 source, or v1.0 vs 1.0). The Updates view and quick-filter counts use parsed version comparison and only treat CompareResult.OLDER as an update, so the dashboard can show “updates available” while the Updates page shows none; use the same game_needs_update/parsed comparison here.
Useful? React with 👍 / 👎.
89c4a00 to
8af2a83
Compare
2cb2088 to
667e8b6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8af2a830e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| missing_shortcuts = sum(1 for g in self._all_games if not getattr(g, "shortcut_path", "")) | ||
| missing_sources = sum(1 for g in self._all_games if not getattr(g, "source_url", "")) | ||
| issues = missing_shortcuts + missing_sources |
There was a problem hiding this comment.
Use the real health issue count for the overview
When a game has a recorded shortcut path/source URL but the target EXE, archive folder, game folder, or version state is bad, HealthChecksWidget._collect_issues still reports errors/warnings, while this new overview counts only blank shortcut/source fields and can display “Good” above a Health Checks page full of issues. Reuse the same health issue collector or another shared predicate so the dashboard does not falsely report a healthy library in those cases.
Useful? React with 👍 / 👎.
Move the primary controls into a compact content dashboard, refresh the dark theme tokens, and document the layout verification notes.
8af2a83 to
4d752d4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d752d43bf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| layout = QVBoxLayout(self) | ||
| layout.setContentsMargins(0, theme.spacing_sm, 0, theme.spacing_sm) | ||
| layout.setSpacing(0) | ||
| layout.setContentsMargins(theme.spacing_md, theme.spacing_lg, theme.spacing_md, theme.spacing_lg) |
There was a problem hiding this comment.
Remove horizontal margins from collapsed sidebar
When the sidebar is collapsed to its 48px rail, these new 12px left/right margins leave only 24px of content width, while collapsed nav items are sized to self._collapsed_width - 8 (40px). In compact mode or after pressing the collapse button, the icon-only list and collapse control are therefore clipped even if the text-only help card is hidden; keep the outer horizontal margins at zero or adjust them when collapsed.
Useful? React with 👍 / 👎.
Motivation
Description
src/app/ui/main_window/window.py: larger default window size, full-window gradient background, moved the primary search/filter/view/tools controls into the content area, added a featured hero card, and simplified the library toolbar and control arrangement.src/app/ui/theme.py: new dark palette colors, adjusted surface/alts, accent colors, interactive colors, increased corner radii and spacing tokens, and raised toolbar height to better fit the new dashboard look.src/app/ui/widgets/library_sidebar.py: increased padding/margins, updated branding text with icon and two-line title, added a bottom informational help card, removed per-item count badges from nav text to reduce clutter, and kept collapsible behavior.Testing
python -m compileall src/app/ui/main_window/window.py src/app/ui/widgets/library_sidebar.py src/app/ui/theme.pywhich succeeded.python -m pytest src/testswhich failed due to the test environment not having thesrcpackage onPYTHONPATH(import errors during collection).PYTHONPATH=src python -m pytest src/testswhich failed early during collection because the environment is missing thelxmldependency required byapp.services.update_checker.