Skip to content

🚀 App Enhancement v3.1.19 - Improved UX, Performance & Stability#98

Merged
manimaran96 merged 15 commits into
masterfrom
dev-app-enhancement
Sep 20, 2025
Merged

🚀 App Enhancement v3.1.19 - Improved UX, Performance & Stability#98
manimaran96 merged 15 commits into
masterfrom
dev-app-enhancement

Conversation

@manimaran96

Copy link
Copy Markdown
Owner

Major enhancement release focusing on user experience improvements and stability fixes.

Key Features:
✨ Wiktionary pages auto-expand sections for better readability
⚡ Enhanced WebView performance and smoother browsing
🎨 Modern UI with edge-to-edge display and polished dialogs
🔧 Configurable Wiktionary cleanup settings
🌐 Improved network error handling and connectivity checks
📋 Better category selection with enhanced empty states
🔍 Language search improvements with helpful messaging
💬 Added Telegram support channel link
🗃️ Database stability fixes and memory optimizations

Technical Changes:

  • Added user-configurable Wiktionary cleanup setting
  • Enhanced About screen with improved donation UI
  • Fixed database DAO initialization issues
  • Improved text input handling (no unwanted styles after paste)
  • Better file handling with improved storage access
  • Network connectivity enhancements
  • UI/UX polish across multiple screens

This commit introduces a "Cancel" button to the word availability filter dialog, allowing users to stop the filtering process. It also adds a "Join Spell4Wiki Support" link with a Telegram icon on the main screen and updates the About screen.

Key changes:
- `MainViewModel.kt`: Added `cancelFilter()` function and related LiveData to handle filter cancellation. The `checkWordsAvailability` function now checks for cancellation.
- `loading_file_availability.xml`: Added a "Cancel" button to the layout.
- `activity_main.xml`: Added a "Join Spell4Wiki Support" TextView with a Telegram icon.
- `MainActivity.kt`: Added an OnClickListener for the new Telegram link.
- `Spell4WordListActivity.kt` & `Spell4Wiktionary.kt`: Implemented the cancel functionality in the filter dialog and observed `filterCancelled` LiveData.
- `activity_about.xml`: Removed the "Join Telegram" text view.
- `AboutActivity.kt`: Removed the OnClickListener for the old Telegram link and updated the app version display to include the version code.
- `strings.xml`: Added new strings for "Join Spell4Wiki Support" and "Filter operation cancelled".
This commit improves network error handling across various parts of the application and refines internet connectivity checks.

Key changes:
- `MainViewModel.kt`:
    - Added `networkError` LiveData to communicate specific network issues (no internet, timeout, general error) to the UI.
    - Implemented timeout settings (10 seconds) for `HttpURLConnection` when checking word audio availability.
    - Added try-catch blocks to handle `UnknownHostException`, `SocketTimeoutException`, and general `IOException` during network operations, posting appropriate error messages.
- `WiktionarySearchActivity.kt`, `Spell4Wiktionary.kt`:
    - Wrapped API response handling and failure callbacks in try-catch blocks to prevent crashes from unexpected errors during response processing or in `onFailure`.
    - Replaced `error()` logging with `Print.error()` for better error tracking.
- `AboutActivity.kt`:
    - Implemented `executeWithNetworkCheck` for all actions involving opening URLs to ensure internet connectivity before attempting to open links.
- `WebViewFragment.kt`:
    - Added an internet connectivity check before loading a web page. If offline, `showPageNotFound()` is called.
    - Updated `WebSettings.cacheMode` to use `LOAD_DEFAULT` when online and `LOAD_CACHE_ELSE_NETWORK` when offline.
    - Enhanced `onReceivedError` and added `onReceivedHttpError` to provide more specific error logging and UI updates when a web page fails to load.
- `Spell4WordListActivity.kt`, `Spell4Wiktionary.kt`, `CategorySelectionFragment.kt`:
    - Added an internet connectivity check before initiating "Run Filter" or category search operations, showing a Snackbar message if offline.
    - Observed the new `networkError` LiveData from `MainViewModel` to display specific error messages from network operations during filtering.
- `NetworkUtils.kt`:
    - Updated `isConnected` to provide a more robust check for internet connectivity using `NetworkCapabilities.NET_CAPABILITY_INTERNET` and `NET_CAPABILITY_VALIDATED`.
    - Added `checkConnectivityWithFeedback` to check connectivity and show a Snackbar/Toast if offline.
    - Added `executeWithNetworkCheck` utility function to encapsulate the pattern of checking connectivity before executing an operation.
- `loading_file_availability.xml`:
    - Updated the style of the "Cancel" button.
- `ListItemActivity.kt`:
    - Removed unused edge-to-edge setup.
- `strings.xml`:
    - Added new string resources for specific network error messages: `network_error_general`, `network_timeout_error`, `no_internet_connection`.
- `bg_cancel_button.xml`:
    - Added a new drawable for the cancel button with a ripple effect and updated styling.
This commit updates the language selection bottom sheet to display a "Result not found" message when a search query in the language list yields no results.

Key changes:
- `bottom_sheet_language_selection.xml`: Added a `TextView` (`txtLanguageSearchInfo`) to display the message when search results are empty. This view is initially hidden.
- `LanguageAdapter.kt`:
    - Added an `onFilterResultListener` to communicate whether the filtered list is empty.
    - The `publishResults` method in the filter now invokes this listener. If the search constraint is not empty, it passes whether the resulting list is empty. If the constraint is empty, it indicates the list is not empty.
- `LanguageSelectionFragment.kt`:
    - Implemented the `setOnFilterResultListener` for the `LanguageAdapter`.
    - When the listener indicates that the search results are empty, the `RecyclerView` is hidden, and the `txtLanguageSearchInfo` `TextView` is made visible with the "Result not found" message.
    - If the results are not empty, the `RecyclerView` is shown, and the `txtLanguageSearchInfo` `TextView` is hidden.
This commit adds a top margin to the root `ConstraintLayout` in `activity_list_info.xml`.

Key changes:
- `activity_list_info.xml`: Added `android:layout_marginTop="@dimen/search_view_height"` to the `ConstraintLayout`.
This commit updates the FloatingActionButton (FAB) styling in `web_view_layout.xml` and `activity_web_view_content.xml`. It also removes an unused FAB style from `styles.xml`.

Key changes:
- `web_view_layout.xml` & `activity_web_view_content.xml`:
    - Changed `layout_width` and `layout_height` to `@dimen/fab_size`.
    - Set `app:backgroundTint` to `@color/transparent`.
    - Set `app:tint` to `@null`.
    - Removed `app:elevation`, `app:fabCustomSize`, and `app:rippleColor` attributes.
- `styles.xml`:
    - Removed the unused `FABStyle`.
This commit updates the `HELP_DEVELOPMENT` URL in `Urls.kt` to a direct PayPal link.
It also adds safety checks in `CategorySelectionFragment.kt` to prevent crashes by ensuring the fragment is still attached and its binding is not null before updating the UI or handling API responses. Specifically, checks `_binding == null || !isAdded` are added in `onResponse`, `onFailure` callbacks of category fetching, and in the `showLoader` function.
This commit refactors the "Support Development" section in the `AboutActivity` screen.
It introduces a heart icon with a pulse animation next to the "Buy Coffee to Developer" text. The entire layout area for this option is now clickable.

Key changes:
- `colors.xml`: Added `colorHeart` for the new icon.
- `dimens.xml`: Added `spacing_medium` for layout consistency.
- `AboutActivity.kt`:
    - Updated the click listener to `layoutHelpDevelopment`.
    - Added `startPulseAnimation()` method to animate the new heart icon.
    - Renamed `feedback()` method to `sendFeedback()` for clarity.
- `strings.xml`: Added `support_development` string for accessibility.
- `anim/pulse.xml`: New animation resource for the heart icon pulse effect.
- `drawable/pulse_heart_bg.xml`: New drawable for the heart icon's background.
- `layout/activity_about.xml`:
    - Wrapped the "Help Development" text view and a new `AppCompatImageView` (for the heart icon) within a `LinearLayout` (`layout_help_development`).
    - The `LinearLayout` is now the clickable element.
    - The heart icon `imgSupportDev` uses the new pulse animation and color.
- `drawable/ic_favorite.xml`: New vector drawable for the heart icon.
This commit introduces a new setting to enable/disable Wiktionary page cleanup and improves the cleanup functionality for better readability.

Key changes:
- `SettingsActivity.kt`: Added a new Switch for "Wiktionary Simplified" setting.
- `activity_settings.xml`: Added UI elements for the new setting, including a title, description, and Switch.
- `strings.xml`: Added new strings for "Wiktionary Simplified" title and description.
- `WebViewFragment.kt`:
    - Added `applyWiktionaryReadabilityEnhancement()` function which uses JavaScript to:
        - Hide unwanted elements (header, banners, page actions, edit sections, footer, notifications).
        - Expand all collapsible sections (accordions).
        - Update expand icons to collapse icons.
        - Observe DOM changes for lazy-loaded content and re-apply cleanup.
    - The cleanup is now conditional based on the new setting. If disabled, the old basic cleanup logic is used.
- `PrefManager.kt`: Added `isWiktionaryCleanupEnabled` preference to store and retrieve the state of the new setting, defaulting to `true`.
This commit enhances the category selection functionality and user experience for empty states within the Spell4Wiktionary feature.

Key changes:
- `activity_spell_4_wiktionary.xml`: Added a `TextView` (`txtCategoryInfo`) to display a message when no categories are available.
- `strings.xml`: Added new string resources for category-related messages, including:
    - `no_categories_available`: Message for when no categories exist.
    - `no_categories_message`: Informative message guiding users to add categories.
    - `category_search_hint`: Placeholder text for the category search.
    - `category_search_no_results`: Message for when category search yields no results.
- `CategorySelectionFragment.kt`:
    - Updated the "no results" message for category search to use the new `category_search_no_results` string.
    - Improved network failure handling by displaying more specific error messages for timeouts, SSL issues, and general network problems.
    - Changed the subtitle/hint for category search to use the new `category_search_hint` string.
- `Spell4Wiktionary.kt`:
    - Modified `setupCategorySpinnerData` to:
        - Display "No categories available" in the spinner if the category list is empty.
        - Show the `txtCategoryInfo` message when no categories are available and hide it when categories are present.
        - If no categories are available, clear the selected category and disable the spinner's item selection listener.
        - Ensure a default selection (first item) if the previously selected category is no longer available.
    - Added a `showNoCategoriesState` function to hide the word list and display an empty state view when no categories are available.
This commit increments the `versionName` to "3.1" and `versionCode` to 19 in `app/build.gradle.kts`. A new changelog file `19.txt` has been added under `fastlane/metadata/android/en-US/changelogs/`.

The changelog highlights the following updates:
- Wiktionary pages now open with sections expanded.
- Improved WebView performance and smoother browsing.
- Modernized UI with edge-to-edge display and polished dialogs.
- Enhanced text input handling, preventing unwanted styles after pasting.
- Improved storage access for easier file handling.
- Stability fixes, memory optimizations, and overall smoother app performance.
- Various issue and crash fixes.
This commit significantly updates the README.md file with a more structured and detailed overview of the Spell4Wiki application. It also revises the short and full descriptions in the fastlane metadata.

Key changes:
- **README.md**:
- **fastlane/metadata/android/en-US/short_description.txt**:
    - Minor wording update for conciseness.
- **fastlane/metadata/android/en-US/full_description.txt**:
    - Restructured the description for clarity.
    - Added "What Spell4Wiki App Achieved:", "Technical Features:", and "How to Use" sections.
    - Updated links and formatting.
This commit corrects a typo in the filename of the contribution statistics image from `spell4wiki_files_uploded_stats.png` to `spell4wiki_files_uploaded_stats.png`.

The `README.md` file has been updated to reflect this change in the image path.
This commit updates the changelog file `19.txt` under `fastlane/metadata/android/en-US/changelogs/`.

The changelog highlights the following new updates:
- Better category selection with enhanced empty states.
- Enhanced network connectivity checks and error handling.
@manimaran96 manimaran96 self-assigned this Sep 20, 2025
@manimaran96 manimaran96 merged commit 5eee79f into master Sep 20, 2025
1 check passed
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