feat: Enable text selection and improve bookmark error handling

- Enable text selection and copy functionality in article WebView
- Add CSS properties for proper text selection on iOS devices
- Preserve bookmark data during reload errors for better UX
- Update documentation with new offline sync features
- Restructure changelog with planned version roadmap

Users can now select and copy text from articles, and bookmark lists
remain visible even when refresh operations fail.
This commit is contained in:
Ilyas Hallak 2025-08-20 21:00:50 +02:00
parent 76bc28ae02
commit fd50f28628
5 changed files with 58 additions and 8 deletions

View File

@ -2,7 +2,7 @@
All changes to this project will be documented in this file.
## 1.0.0
## Planned for Version 1.0.0
**Initial release:**
- Browse and manage bookmarks (All, Unread, Favorites, Archive, Article, Videos, Pictures)
@ -15,11 +15,13 @@ All changes to this project will be documented in this file.
- Search functionality
- Support for tags
- Support for reading progress
- Save bookmarks when server is unavailable and sync when reconnected
## Planned for Version 1.1.0
## [Unreleased]
### Planned Features
- [ ] Add support for bookmark filtering and sorting options
- [ ] Offline sync with Core Data
- [ ] Add support for collection management
- [ ] Add offline sync capabilities
- [ ] Add support for collection management
- [ ] Add support for custom themes
- [ ] Text highlighting of selected text in a article
- [ ] Multiple selection of bookmarks for bulk actions

View File

@ -48,6 +48,9 @@
},
"%lld min" : {
},
"%lld minutes" : {
},
"%lld." : {
@ -99,6 +102,12 @@
},
"Are you sure you want to log out? This will delete all your login credentials and return you to setup." : {
},
"Automatic sync" : {
},
"Automatically mark articles as read" : {
},
"Available tags" : {
@ -111,6 +120,9 @@
},
"Changes take effect immediately. Lower log levels include higher ones (Debug includes all, Critical includes only critical messages)." : {
},
"Clear cache" : {
},
"Close" : {
@ -120,6 +132,9 @@
},
"Critical" : {
},
"Data Management" : {
},
"Debug" : {
@ -258,6 +273,9 @@
},
"OK" : {
},
"Open external links in in-app Safari" : {
},
"Optional: Custom title" : {
@ -301,12 +319,18 @@
}
}
}
},
"Reading Settings" : {
},
"Remove" : {
},
"Reset" : {
},
"Reset settings" : {
},
"Reset to Defaults" : {
@ -316,6 +340,9 @@
},
"Resume listening" : {
},
"Safari Reader Mode" : {
},
"Save bookmark" : {
@ -364,6 +391,12 @@
},
"Speed" : {
},
"Sync interval" : {
},
"Sync Settings" : {
},
"Syncing with server..." : {

View File

@ -45,6 +45,7 @@ If you are interested in joining the internal beta, please contact me directly a
- Article View with Reading Time and Word Count
- Search functionality
- Support for reading progress
- Save bookmarks when server is unavailable and sync when reconnected
## Configuration

View File

@ -101,7 +101,7 @@ class BookmarksViewModel {
hasMoreData = newBookmarks.currentPage != newBookmarks.totalPages // check if more data is available
} catch {
errorMessage = "Error loading bookmarks"
bookmarks = nil
// Don't clear bookmarks on error - keep existing data visible
}
isLoading = false

View File

@ -9,12 +9,23 @@ struct WebView: UIViewRepresentable {
@Environment(\.colorScheme) private var colorScheme
func makeUIView(context: Context) -> WKWebView {
let webView = WKWebView()
let configuration = WKWebViewConfiguration()
// Enable text selection and copy functionality
let preferences = WKWebpagePreferences()
preferences.allowsContentJavaScript = true
configuration.defaultWebpagePreferences = preferences
let webView = WKWebView(frame: .zero, configuration: configuration)
webView.navigationDelegate = context.coordinator
webView.scrollView.isScrollEnabled = false
webView.isOpaque = false
webView.backgroundColor = UIColor.clear
// Allow text selection and copying
webView.allowsBackForwardNavigationGestures = false
webView.allowsLinkPreview = true
// Message Handler hier einmalig hinzufügen
webView.configuration.userContentController.add(context.coordinator, name: "heightUpdate")
webView.configuration.userContentController.add(context.coordinator, name: "scrollProgress")
@ -66,6 +77,9 @@ struct WebView: UIViewRepresentable {
color: var(--text-color);
font-size: var(--base-font-size);
-webkit-text-size-adjust: 100%;
-webkit-user-select: text;
-webkit-touch-callout: default;
user-select: text;
}
h1, h2, h3, h4, h5, h6 {