-
Notifications
You must be signed in to change notification settings - Fork 35
Add comprehensive web platform optimizations for PWA functionality #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Implement PWA features with enhanced manifest and service worker - Add drag-and-drop file upload functionality for web - Implement web keyboard shortcuts for better UX - Add offline functionality with service worker caching - Create web-specific widgets for PWA install prompts and network status - Add responsive design utilities for web platform - Update dependencies for web-specific packages - Integrate all web features into main canvas screen
Our Pull Request Approval ProcessThanks for contributing! ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
Other🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Congratulations on making your first PR! If you haven't already, check out our Contributing Guidelines and README to ensure that you are following our guidelines for contributing.
|
After making all these changes, please upload a working screen recording for both the Android/iOS and web platforms to ensure nothing is broken. |
|
i will keep a fresh pr |
|
Okay |
|
sure.
|
This PR implements comprehensive web platform optimizations to enhance the TextEditingApp's web version with native app-like features and improved user experience.
Key Features Implemented:
Progressive Web App (PWA) Features:
Enhanced PWA manifest with comprehensive app metadata, categories, screenshots, and shortcuts
Complete service worker implementation with offline caching strategy for static assets and dynamic content
Background sync capabilities for offline data synchronization
PWA installation prompts and update notifications
Network status monitoring with visual indicators
Drag-and-Drop File Upload:
Web drag-and-drop overlay with visual feedback
Support for multiple file types (images set as background, text files loaded as editable content)
User feedback for unsupported file types
Web Keyboard Shortcuts:
Comprehensive keyboard shortcuts for common actions:
Ctrl/Cmd + N: New page
Ctrl/Cmd + Z: Undo
Ctrl/Cmd + Y / Ctrl/Cmd + Shift + Z: Redo
Ctrl/Cmd + S: Save page
Delete/Backspace: Clear canvas
Ctrl/Cmd + T: Add text
Ctrl/Cmd + D: Toggle drawing mode
Escape: Exit drawing mode / deselect text
Offline Functionality:
Service worker caching for offline access to static assets
Network status indicator showing offline state
Background sync for queued actions when connection returns
Responsive Design Utilities:
WebResponsive class with breakpoint-based design helpers
Adaptive sizing for fonts, icons, and padding across different screen sizes
Technical Implementation:
New Dependencies Added:
universal_html (^2.2.4) - Cross-platform HTML/JS interop
file_picker (^8.1.2) - File handling for web
url_launcher (^6.3.0) - External links and downloads
connectivity_plus (^6.0.5) - Network status monitoring
Files Created/Modified:
web_utils.dart - Core web utilities and PWA functionality
web_widgets.dart - Web-specific UI components
sw.js - Service worker for offline functionality
manifest.json - Enhanced PWA configuration
index.html - PWA integration and install prompts
canvas_screen.dart - Integrated web features
main.dart - Web utilities initialization
pubspec.yaml - Added web-specific dependencies
Cross-Platform Compatibility:
All web features are conditionally enabled only on web platform
No impact on existing mobile/desktop functionality
Graceful degradation when web APIs are unavailable
Testing:
The implementation includes proper error handling, user feedback, and cross-browser compatibility. Web features can be tested by building for web (flutter build web --release) and testing PWA installation, drag-and-drop, keyboard shortcuts, and offline functionality.
This enhancement transforms the web version of TextEditingApp into a fully-featured PWA with native app-like capabilities while maintaining compatibility across all platforms.