Skip to content

feat(core): Modernized data loading, performance optimizations, and new .particles effect#19

Open
iTarek wants to merge 7 commits into1998code:mainfrom
iTarek:main
Open

feat(core): Modernized data loading, performance optimizations, and new .particles effect#19
iTarek wants to merge 7 commits into1998code:mainfrom
iTarek:main

Conversation

@iTarek
Copy link
Copy Markdown

@iTarek iTarek commented Apr 10, 2026

Overview

This PR introduces several significant performance improvements, Swift Concurrency modernization, UI refinements, and fully resolves Arabic RTL localization issues. It also adds a new customizable visual effect and makes the header customizable.

Key Changes

⚡️ Performance & Concurrency

  • Async JSON Parsing: Refactored loadData() to parse JSON asynchronously via Task.detached and Swift Concurrency. This prevents the UI from freezing on presentation, allowing the ProgressView to appear instantly.
  • Sendable Models: Vmodel and Model now conform to Sendable, making them safe for concurrent operations.
  • GPU Rendering (drawingGroup): Fixed severe lag when opening/closing the history sheet. The lag was caused by NoiseView rendering 100,000 Canvas dots on the main thread. Reduced the noise density to 5,000 dots (visually identical) and isolated .drawingGroup() strictly to the noise layer to allow ignoresSafeArea to function correctly globally.

✨ New Features

  • Hide Build Number: Added a new showBuild parameter to the SwiftNEW initializer (defaults to true for backward compatibility). App developers can now choose to hide internal build numbers in the UI.
  • New .particles Effect: Added an alternative floating rainbow particles effect (FloatingParticlesView) powered by TimelineView and Canvas.
  • Snowfall Modernization: Re-wrote SnowfallView from a heavy @State array + Timer to a highly performant TimelineView(.animation) + Canvas implementation. Removed hit-testing and hid it from VoiceOver.

🌐 Localization & UI Fixes

  • Arabic RTL Improvements:
    • Fixed the formatting of "Version X" so the number correctly appears on the proper side using localized format strings ("Version %@").
    • Fixed the "Loading..." string dots.
    • Corrected Arabic translations ("الإستعمالات السابقة" → "التحديثات السابقة").
  • Readable Body Text: Removed the .lineLimit(2) truncation on release notes body text.
  • UI Polish: Added horizontal padding to the version badge inside the History Sheet for better spacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant