Implement standardized native dialog opt-in and unified file logic#255
Open
google-labs-jules[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context & Rationale
Researchers on macOS currently face a suboptimal experience where file dialogs do not support platform-standard features like the Favorites sidebar or Tag filtering. This is caused by a known conflict between the IPython event loop and native Qt dialogs, which can cause panels to close prematurely in certain configurations.
This PR introduces a unified utility for handling file dialogs and provides an experimental opt-in for native OS dialogs. By making this feature strictly opt-in, we satisfy the needs of power users who require a native macOS experience while maintaining stability for the general user base.
Key Changes
1. Unified Dialog Logic
_select_fileinsrc/eegprep/functions/guifunc/qt.pyto utilize the_file_dialog_kwargshelper.2. Global Configuration & Persistence
option_native_dialogsto theEEGOptionsdataclass insrc/eegprep/functions/adminfunc/eeg_options.py.0(disabled) to ensure application stability on first launch. This setting is persisted in the user's global configuration.3. Settings UI Enhancement
src/eegprep/functions/guifunc/menu_actions.pyfrom a simple message box to a comprehensiveQDialog.Design Decisions
EEG_OPTIONSdirectly when spawning file panels. This allows users to toggle the native dialog setting and see the change reflected immediately without restarting the application.Success Metrics & Validation