Repository navigation
Split BuilderView into cards, delete ContentView.swift (#387 step 8) - #476
Merged
Merged
Conversation
, step 8) The Builds and Settings pages are cards now: files, target, install, log, action, outcome and progress on the Builds page, library, controls, tools and app on the Settings page. Each card takes the stores it shows as parameters and observes only those. The cards that need no app type move to NXLauncher with the shared row and group pieces, the failure and copy cards, the update sheet, the drop target, the row scroller and the dock progress. FilesCard stays in the app target because it runs KeyCheck. Adds LayerImportsTests: NXCore and NXModel import no SwiftUI or AppKit.
5 of 6 tasks
# Conflicts: # frontend/Sources/NX2Apple/ContentView.swift # frontend/Sources/NXCore/ShellInstall.swift # frontend/Tests/NX2AppleTests/ShellInstallTests.swift
# Conflicts: # frontend/Sources/NX2Apple/ContentView.swift # frontend/Sources/NXModel/BuildStore+ShellRoot.swift
# Conflicts: # frontend/Tests/NX2AppleTests/BuildNotificationsTests.swift # frontend/Tests/NX2AppleTests/KeyCheckTests.swift # frontend/Tests/NX2AppleTests/LauncherPerformanceTests.swift # frontend/Tests/NX2AppleTests/LibraryTests.swift
4 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #473 (stack #459), retarget to main after the ones below merge.
Part of #387, step 8.
Fix or feature
A step of #387. No behavior change.
What and why
BuilderViewandContentView.swiftare gone. The Builds and Settings pages are one view per card now. Each card takes the stores it shows as parameters and observes only those. A value from another store comes as a value or a closure, never through another store.SetupHintCard,TargetCard,InstallCard,LogCard,ActionCard,OutcomeCard,ProgressCard,ControlsCard,ToolsCard,AppCard, plus the sharedCardGroup,CardRow,CardDivider,CardDisclosure,LauncherPageScroll. Moved there too:BuildFailureCard,EngineSyncBanner,ShellCopyCard, the stale frameworks prompt,UpdateSheet,GameFilesDrop,RowScroller,DockProgress.FilesCard(it runsKeyCheck, which needs CommonCrypto),LibraryCard(observesGameLibrary),BuildPageandSettingsPage(list the cards),CardPages(the shared scrolling column, so the open log and the scroll position stay when going between the two pages). The other views read app types (LibraryGame,LauncherGamepad,ConsoleState,OnboardingState,CheatFiles,FrameTimes) and stay.struct ContentViewis renamed toLauncherViewin its own commit, "Rename ContentView to LauncherView", so it reads apart (14 files, 21 lines).LayerImportsTests: NXCore and NXModel import no SwiftUI or AppKit. The audit found none.tools/engine.py,frontend-qt,requirements.txt). ARCHITECTURE.md says what each target holds and where a new feature goes.Done when (#387)
BuildModelandContentView.swiftdo not existgit grep BuildModelfinds only prose in ARCHITECTURE.md and AGENTS.md. NoContentView.swift, noContentViewleft.NSPortBuilderonly in the bundle id, the executable and the data folder--install-shellusage text (the executable name), the test fixtures for them, and the QtQSettingskey, which holds players' settings and stays. A patch comment inpatches/0009names an old path and is history.grep -rn "import SwiftUI|import AppKit" frontend/Sources/NXCore frontend/Sources/NXModelfinds nothing.LayerImportsTestschecks it.LauncherPerformanceTests, step "1000 log lines in a build", budget 0 cards. Passes.NXModelTests:AppUpdateStore,RepoStore,EngineSyncStore,DependencyStore,DeviceStore,BuildStore.LocalizerandBuildLogare tested inNX2AppleTests(LocalizerTests,BuildLogTests), which link SwiftUI. Not moved here.NXCore/Localization.swift4237 (a string table) andNX2Apple/LauncherView.swift967 (library page, hero, collection, activity bar, pad routing).LauncherViewdid not shrink. Its limit stays 967.startBuildis still one long method inBuildStore+Run. I did not split it: it needs its own tests first. It stays on the list for #387.Checked
cd frontend && swift testthree times, green (118 NXModelTests, 113 NXCoreTests, 637 NX2AppleTests, 868 in all, 865 before).python3 -m unittest discover -s frontend-qt/testsgreen.Screenshots
None, no visible change.
Scope
dm/,scripts/,docs/,ref/) is added to the repository