Add Apple UI new views - #59
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the macOS SwiftUI “Mojibake” developer-tools app with several new analysis views (Security/UTS #39, IDNA/UTS #46, Collation/DUCET, Caseless matching, Encoding inspector, Characters list) and refactors shared UI/formatting utilities to reduce duplication across tools. It also updates some IDNA documentation/examples and tests to use the reserved .example domain.
Changes:
- Add new SwiftUI tool views (Security, IDNA, Collation, Caseless Matching, Encoding Inspector, Characters) and wire them into the app navigation.
- Introduce shared SwiftUI/support utilities (
ToolHeader,ToolTextEditor,MojibakeFormatting,MojibakeBytes/MojibakeString) and refactor existing views to use them. - Update IDNA examples/tests/docs from
.deto.examplein selected locations.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/generate/functions.ts | Updates generated API metadata example for mjb_idna_to_unicode to use .example. |
| tests/example.c | Updates the IDNA-to-Unicode example/assertion to use .example. |
| src/ui/Mojibake/Mojibake/TerminalWidthView.swift | Refactors header and error/codepoint formatting to shared helpers. |
| src/ui/Mojibake/Mojibake/SecurityView.swift | Adds a new Security (UTS #39) analysis view. |
| src/ui/Mojibake/Mojibake/NormalizationView.swift | Refactors header and normalization transform to shared helpers. |
| src/ui/Mojibake/Mojibake/MojibakeSupport.swift | Adds shared SwiftUI components and common formatting/transform helpers. |
| src/ui/Mojibake/Mojibake/Info.plist | Adds an (currently empty) Info.plist file. |
| src/ui/Mojibake/Mojibake/IDNAView.swift | Adds a new IDNA (UTS #46) conversion/validation view. |
| src/ui/Mojibake/Mojibake/FilterView.swift | Refactors header and filter transform to shared helpers. |
| src/ui/Mojibake/Mojibake/EncodingInspectorView.swift | Adds a new encoding inspector view (detect/validate/decode/convert). |
| src/ui/Mojibake/Mojibake/EmojiView.swift | Refactors emoji detail rendering to shared DetailSectionView / formatting helpers. |
| src/ui/Mojibake/Mojibake/ContentView.swift | Extends navigation to include new tool sections and codepoint deep-linking. |
| src/ui/Mojibake/Mojibake/CollationView.swift | Adds a new collation comparison/sort-key view. |
| src/ui/Mojibake/Mojibake/CodepointView.swift | Adds support for programmatic codepoint requests from other views. |
| src/ui/Mojibake/Mojibake/CharactersView.swift | Adds a new view listing a string’s Unicode scalars and enabling navigation to codepoints. |
| src/ui/Mojibake/Mojibake/CharacterDetailsView.swift | Makes DetailSectionView reusable and adds optional codepoint-link behavior. |
| src/ui/Mojibake/Mojibake/CharacterDetails.swift | Refactors character display/formatting helpers and uses shared formatting/transform utilities. |
| src/ui/Mojibake/Mojibake/CaseView.swift | Refactors header and case-mapping transform to shared helpers. |
| src/ui/Mojibake/Mojibake/CaselessMatchingView.swift | Adds a new caseless matching comparison view across supported modes. |
| src/ui/Mojibake/Mojibake/BreaksView.swift | Refactors header and codepoint formatting to shared helpers. |
| src/ui/Mojibake/Mojibake/BidiView.swift | Refactors header and status/codepoint formatting to shared helpers. |
| src/ui/Mojibake/Mojibake.xcodeproj/project.pbxproj | Updates the human-readable copyright build setting. |
| src/api/tests/index.ts | Updates IDNA API tests to use .example inputs/outputs. |
| API.md | Updates the mjb_idna_to_unicode documentation example to use .example. |
Comments suppressed due to low confidence (2)
utils/generate/functions.ts:726
- The IDNA example was updated to use the reserved
.exampledomain here, but the earliermjb_idna_to_asciiexample in the same generator file still usesbücher.de/xn--bcher-kva.de. Keeping the examples consistent (preferably using.exampleeverywhere) will reduce confusion and avoids mixing a real TLD with a reserved one.
example: `const char *domain = "xn--bcher-kva.example";
mjb_idna_info info;
mjb_result result;
if(mjb_idna_to_unicode(domain, strlen(domain), MJB_ENC_UTF_8, MJB_ENC_UTF_8,
API.md:928
- This
mjb_idna_to_unicodeexample now uses.example, but themjb_idna_to_asciiexample earlier in API.md still uses.de. It would be clearer to use the same reserved domain in both examples so readers can round-trip the same input and so the documentation doesn’t mix a real TLD with a reserved one.
const char *domain = "xn--bcher-kva.example";
mjb_idna_info info;
mjb_result result;
if(mjb_idna_to_unicode(domain, strlen(domain), MJB_ENC_UTF_8, MJB_ENC_UTF_8,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.