Skip to content

Conversation

@magicbug
Copy link
Owner

@magicbug magicbug commented Dec 17, 2025

This pull request introduces a new database migration to tag the application as version 2.8.3 and significantly improves the user experience when navigating away from the QSO entry page with unsaved changes. It adds a custom modal dialog for internal navigation warnings, ensures browser-native dialogs for external navigation, and refines the UI for switching between LIVE and POST modes without unnecessary prompts.

Migration and Versioning:

  • Added migration 239_tag_2_8_3.php to update the application version to 2.8.3 and reset the version info dialog for users. The migration can be rolled back to 2.8.2. (application/migrations/239_tag_2_8_3.php, application/config/migration.php) [1] [2]

Enhanced Unsaved Changes Handling:

  • Improved detection of unsaved form changes and ensured the browser's native "Leave site?" dialog appears only for external navigation (e.g., closing tab/window), using the correct event object and properties. (application/views/interface_assets/footer.php) [1] [2]
  • Added logic to intercept internal link clicks: if there are unsaved changes, a custom Bootstrap modal is shown (if available), otherwise a fallback confirm dialog is used. (application/views/interface_assets/footer.php)
  • Implemented a custom "Leave QSO Entry?" modal dialog and handler, allowing users to confirm navigation away and preserving unsaved changes warning for internal navigation. (application/views/qso/index.php)

UI/UX Improvements for Mode Switching:

  • Refactored the UI for switching between LIVE and POST (Manual) modes by moving the toggle to a badge on the right and using a new switchMode(url) JS function to avoid unnecessary "unsaved changes" prompts. (application/views/qso/index.php) [1] [2] [3]

Note

Tags release 2.8.3 with a new migration and overhauls QSO unsaved-change flow via a custom modal, proper beforeunload behavior, and smoother LIVE/POST switching.

  • Migration/Versioning
    • Bump application/config/migration.php migration_version to 239.
    • Add application/migrations/239_tag_2_8_3.php to set options.version to 2.8.3, reset user_options version dialog, and support rollback to 2.8.2.
  • QSO unsaved-changes handling
    • Update application/views/interface_assets/footer.php:
      • Correct beforeunload handler (use event, native prompt for external navigation).
      • Intercept internal links; show Bootstrap modal if available, else confirm fallback; unbind on submit.
    • Add custom "Leave QSO Entry" modal and navigation handler in application/views/qso/index.php.
  • Mode switching UX
    • Add switchMode(url) and move LIVE/POST toggle to a right-aligned badge to switch without beforeunload prompts in application/views/qso/index.php.

Written by Cursor Bugbot for commit 7859254. This will update automatically on new commits. Configure here.

Added a check for the 'manual' URL parameter to bypass CAT data updates and reset the UI when manual QSO entry is active. This ensures that CAT updates do not interfere with manual logging workflows.
Enhanced the unsaved changes detection to show a custom Bootstrap modal when navigating away from QSO entry via internal links, while retaining native browser dialogs for external navigation. Refactored the LIVE/POST mode switch to avoid triggering the beforeunload warning. Added a custom modal for confirming navigation away from QSO entry, and updated related JavaScript logic for better user experience.
Reduced the font size and padding of the LIVE and POST mode badges for a more compact appearance in the QSO index page.
Changed the tooltip text for the LIVE badge from 'Switch to POST mode' to 'Switch to Manual mode' to better reflect the action performed when switching modes.
Introduces migration 239 to update the application version to 2.8.3 and trigger the version info dialog for users. Updates the migration version in the configuration to 239.
@magicbug magicbug self-assigned this Dec 17, 2025
@magicbug magicbug merged commit d8cc21f into master Dec 17, 2025
1 of 2 checks 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.

2 participants