Commit Graph
15 Commits
Author SHA1 Message Date
Innei 6e6b7e3936 feat(ios): Use the native image preview component (#3017)
* init

* done

* feat(mobile): integrate Galeria component for image preview and carousel

Signed-off-by: Innei <tukon479@gmail.com>

* revert

Signed-off-by: Innei <tukon479@gmail.com>

* chore: auto-fix linting and formatting issues

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-10 22:41:20 +08:00
Innei a54a1b89dd fix(mobile): setURLSchemeHandler not working
- Extract WebView configuration into a separate class
- Improve JavaScript injection mechanism
- Move injected script loading to a static method
- Enhance URL scheme handling and script management

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-05 22:31:12 +08:00
Innei cead6dffd0 refactor(mobile): Simplify WebView delegate and improve state management
- Convert WebViewDelegate to an extension of FOWebView
- Remove separate delegate class
- Use direct access to state and view controller
- Simplify navigation and script message handling

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-03 19:04:21 +08:00
Innei 11b4027dfd refactor(mobile): Improve WebView architecture and state management
Refactored the WebView implementation in the mobile app to:
- Separate concerns in WebView delegate and configuration
- Simplify WebView initialization and state management
- Improve JavaScript injection and custom URL scheme handling
- Add content height change event support

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-03 17:50:14 +08:00
Innei 7de1132f6c refactor(mobile): replace custom web view with SFSafariViewController
This change updates the web view presentation logic to use SFSafariViewController instead of custom modal web view controllers. The modification simplifies the web view handling and provides a more standard iOS browsing experience with built-in Safari features.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-01 01:02:07 +08:00
Innei d45ba9ecfe feat(mobile): add RNS base view controller and navigation utilities
- Create RNSViewController as a base view controller
- Update WebViewController to inherit from RNSViewController
- Add UIWindow extension to find RNS navigation controller
- Modify HelperModule to use new navigation and web view utilities
- Refactor WebViewManager to use WebViewController for modal views

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-27 21:09:14 +08:00
Innei 6c2bc6633e feat(mobile): enhance web view navigation and header interactions
- Add ModalWebViewController and WebViewController for improved web browsing
- Implement WebViewManager method to push modal web views
- Create UINavigationHeaderActionButton for consistent header button styling
- Update header components to use new action button and back button components
- Refactor navigation header and scroll view interactions

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-27 19:44:49 +08:00
Innei ae89d8d716 refactor(mobile): simplify entry list rendering and context management
- Refactored EntryListContentGrid to use direct entry IDs instead of complex masonry item mapping
- Introduced EntryListContext to provide view type context
- Updated EntryGridItem to handle multiple media types and scrolling
- Simplified ViewPagerList to render a single view instead of multiple pages
- Removed unused pager view logic and simplified entry list rendering

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-21 21:48:02 +08:00
Innei ad06db9744 feat(mobile): enhance CORS handling and image loading in WebView
- Add CORS headers to CustomURLSchemeHandler for cross-origin requests
- Implement custom URL scheme protocol for image loading in MarkdownImage
- Replace HTTP/HTTPS URLs with a custom protocol to enable cross-origin image rendering

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 22:47:47 +08:00
Innei 17c7f9d3e9 chore(mobile): update dependencies and refactor UI components
- Upgrade react-native-uikit-colors to v0.2.0
- Enhance CustomURLSchemeHandler with improved task management
- Update RecommendationListItem and EntryListItem with context menu improvements
- Refactor entry list item styling using system colors and context menu preview
- Add context menu preview to login and entry list modules

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 22:24:17 +08:00
Innei b534667c05 feat(mobile): enhance HTML renderer with image rendering and blurhash support
- Add blurhash and image scaling to MarkdownImage component
- Implement useCalculateNaturalSize hook for responsive image sizing
- Create atoms and types for entry model and media
- Update HTML renderer to support dynamic image rendering with Jotai state management
- Improve iOS image preview with save functionality and dynamic root view controller retrieval

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 19:12:47 +08:00
Innei 0011861e3f feat(mobile): enhance iOS image preview with SDWebImage and improved QuickLook handling
- Add SDWebImage dependency to FollowNative.podspec
- Refactor ImagePreview and PreviewControllerController for robust image preview
- Implement dynamic file extension handling for image preview
- Update WebView bridge to support more flexible image preview payload
- Improve MarkdownImage component to use Uint8Array for image conversion

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 17:50:13 +08:00
Innei 975285ec30 feat(mobile): implement native image preview with QuickLook on iOS
- Add ImagePreview helper class for displaying images using QuickLook
- Extend HelperModule with previewImage function to load and display images
- Update WebView bridge to support image preview from web content
- Implement MarkdownImage component with base64 image conversion
- Add cross-platform quickLookImage method for native image preview

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 01:24:56 +08:00
Innei 64db32ef34 feat: Implement the webview sandbox using a microfront end for rn to implement the full html renderer (#2691)
* init

Signed-off-by: Innei <tukon479@gmail.com>

* feat: parser and renderer

Signed-off-by: Innei <tukon479@gmail.com>

* feat: shared webview

* feat: add UIColor hex conversion extension and accent color asset and xhr rewrite

* feat(mobile): enhance WebView and HTML rendering for iOS

- Refactor SharedWebView module with improved JavaScript injection and link handling
- Add ModalWebViewController for opening links in a modal view
- Implement dynamic content height measurement
- Update HTML renderer with Jotai state management
- Improve WebView configuration and debug mode

Signed-off-by: Innei <tukon479@gmail.com>

* lockfile

Signed-off-by: Innei <tukon479@gmail.com>

* chore: auto-fix linting and formatting issues

* fix(mobile): improve WebView debug mode and UI text styling

- Remove debug-only conditional for WebView inspector
- Add text label class to GroupedInsetListActionCell for consistent styling

Signed-off-by: Innei <tukon479@gmail.com>

* update

Signed-off-by: Innei <tukon479@gmail.com>

* feat(mobile): add FullScreenWKWebView for iOS WebView layout

- Create custom WKWebView subclass to override safe area insets
- Enables full-screen WebView rendering without default padding

Signed-off-by: Innei <tukon479@gmail.com>

* chore(mobile): remove FullScreenWKWebView Swift file

- Delete unused custom WKWebView subclass for iOS
- Cleanup unnecessary file after previous implementation

Signed-off-by: Innei <tukon479@gmail.com>

* feat(mobile): refactor iOS WebView infrastructure

Signed-off-by: Innei <tukon479@gmail.com>

* feat(mobile): add native helper module and improve entry detail screen

- Add HelperModule for iOS to open links in a modal WebView
- Implement cross-platform link opening mechanism
- Enhance entry detail screen with dynamic title and scroll behavior
- Add loading indicator for entry content
- Refactor navigation and scroll view components

Signed-off-by: Innei <tukon479@gmail.com>

* fix(mobile): improve WebView JavaScript and URL loading thread safety

- Dispatch JavaScript evaluation and URL loading on the main thread
- Ensure thread-safe WebView interactions for iOS
- Prevent potential race conditions in SharedWebViewModule

Signed-off-by: Innei <tukon479@gmail.com>

* refactor(mobile): remove useOpenLink hook and update link opening mechanism

- Replace custom useOpenLink hook with native openLink function
- Update WebView navigation and recommendation list item to use new link opening method
- Remove unnecessary hook and simplify link handling

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-07 23:15:29 +08:00
Innei e1bf881e85 feat: use expo module to write native component/module (#2675)
* init

Signed-off-by: Innei <tukon479@gmail.com>

* test uikit

Signed-off-by: Innei <tukon479@gmail.com>

* uitable

Signed-off-by: Innei <tukon479@gmail.com>

* test webview

Signed-off-by: Innei <tukon479@gmail.com>

* shared webview

Signed-off-by: Innei <tukon479@gmail.com>

* refactor(shared-webview): Simplify WebView height management

Signed-off-by: Innei <tukon479@gmail.com>

* fix: add url prop

Signed-off-by: Innei <tukon479@gmail.com>

* rename

Signed-off-by: Innei <tukon479@gmail.com>

* feat: native module

Signed-off-by: Innei <tukon479@gmail.com>

* cleanup

Signed-off-by: Innei <tukon479@gmail.com>

* fix: export

Signed-off-by: Innei <tukon479@gmail.com>

* fix

Signed-off-by: Innei <tukon479@gmail.com>

* fix

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-02 23:55:05 +08:00