Repository navigation
fix: present manga tools sheets from the Form - #1329
Merged
Merged
Conversation
The model and provider sheets sat on a Group of sections, and the panel model sheet on a Section inside the Form. SwiftUI copies such modifiers onto every row, so several sheets shared one binding and the first tap opened and closed the sheet at once. MangaToolsSettingsModel now holds the sheet and the loaded configuration, and the Form presents it once. The Manage Model button in the panel model prompt also uses the adaptive prominent style, so its label stays readable in dark mode. Claude-Session: https://claude.ai/code/session_01W7dP3MknpRju7QRKjYpmFX
Raw button styles keep slipping in, and a raw borderedProminent is unreadable in dark mode with the white accent. Claude-Session: https://claude.ai/code/session_01W7dP3MknpRju7QRKjYpmFX
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.
Two UI bugs reported from iOS device testing.
Sheets opening and closing on the first tap
On the Manga Tools page, the Panel Mode Model and Detection Model sheets closed right after opening on the first tap; the second tap worked.
Groupof sections inMangaTranslationSettingsContent.Sectioninside the Form.MangaToolsSettingsModel(@Observable) holds the sheet (MangaToolsSheet: providers, a model role, the panel model) and the loaded provider and model archives.MangaToolsSettingsViewand the in-readerMangaTranslationSettingsView, own one model and apply.mangaToolsSheets(model:). That modifier presents the single sheet and reloads the configuration on appear and on dismiss.model.sheet.GrouporSectioninside it) is recorded in therepo-conventionsSettings Pages section.Unreadable Manage Model button in dark mode
The Manage Model button in the "Panel Mode Model Required" prompt (
DivinaReaderView) used.buttonStyle(.borderedProminent)directly, so with the white accent the label was white on white. It now uses.adaptiveButtonStyle(.borderedProminent), which pairs the tint and foreground assets.AGENTS.mdgains rule 26: style buttons with.adaptiveButtonStyle(_:), never.buttonStyle(...)directly. A raw style is allowed only where no adaptive case fits, with a comment saying why. Existing raw uses are not migrated here.Includes build 682.
Testing
CI builds iOS, macOS and tvOS; the sheet fix still needs a device check.