RTSDA-iOS/RUST_CRATE_IMPROVEMENTS.md
RTSDA 00679f927c docs: Update README for v2.0 release and fix git remote URL
- Comprehensive README update documenting v2.0 architectural changes
- Updated git remote to ssh://rockvilleav@git.rockvilletollandsda.church:10443/RTSDA/RTSDA-iOS.git
- Documented unified ChurchService and 60% code reduction
- Added new features: Home Feed, responsive reading, enhanced UI
- Corrected license information (GPL v3 with church content copyright)
- Updated build instructions and technical stack details
2025-08-16 18:41:51 -04:00

44 lines
1.3 KiB
Markdown

# Rust Crate Improvements Needed
## HTML Tag Stripping in Scripture Readings
**Issue**: Scripture readings contain HTML tags that appear in the iOS UI.
**Solution**: Update the Rust crate to strip HTML tags from scripture_reading fields in the ClientBulletin model.
**Suggested Implementation**:
```rust
// In src/models/client_models.rs - ClientBulletin::from() implementation
impl From<Bulletin> for ClientBulletin {
fn from(bulletin: Bulletin) -> Self {
Self {
// ... other fields
scripture_reading: strip_html_tags(&bulletin.scripture_reading),
// ... other fields
}
}
}
// Helper function to strip HTML tags
fn strip_html_tags(text: &str) -> String {
// Use a regex or HTML parsing library to remove HTML tags
// This could use the `html2text` crate that's already a dependency
html2text::from_read(text.as_bytes(), 80)
.replace('\n', " ")
.split_whitespace()
.collect::<Vec<&str>>()
.join(" ")
}
```
**Benefits**:
- Clean data for all client platforms
- Consistent text rendering
- Better performance (processed once on server)
- Easier maintenance
**Files to Update**:
- `src/models/client_models.rs`
- Possibly `src/models/bulletin.rs` if the cleaning should happen earlier
**Priority**: Medium - affects user experience but doesn't break functionality