Skip to content
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

PR: Improve Variable Explorer UX #20868

Merged
merged 41 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
60d290e
first changes in variable explorer
jsbautista Apr 24, 2023
87f5f65
changes in variable explorer
jsbautista Apr 24, 2023
e141af6
Merge branch 'master' into VariableExplorerIssues
jsbautista Apr 24, 2023
48eca80
Apply suggestions
jsbautista May 4, 2023
fd97307
Merge branch 'VariableExplorerIssues' of https://github.com/jsbautist…
jsbautista May 4, 2023
a92d52a
Apply suggestions
jsbautista May 4, 2023
bd90a85
Apply suggestions
jsbautista May 8, 2023
191afe1
Merge branch 'master' into VariableExplorerIssues
jsbautista May 8, 2023
4e3ef83
Apply suggestions
jsbautista May 8, 2023
644d55b
Merge branch 'VariableExplorerIssues' of https://github.com/jsbautist…
jsbautista May 8, 2023
c04755e
Apply suggestions
jsbautista May 8, 2023
17b630a
Apply suggestions
jsbautista May 15, 2023
d61b818
Apply suggestions
jsbautista May 15, 2023
ee61c05
Apply suggestions
jsbautista May 18, 2023
5446cb8
Merge branch 'master' into VariableExplorerIssues
jsbautista May 18, 2023
111a90c
Update spyder/plugins/variableexplorer/widgets/main_widget.py
jsbautista May 29, 2023
06b6d2e
Merge branch 'master' into VariableExplorerIssues
jsbautista May 29, 2023
4bb6b65
Apply suggestions from code review
jsbautista Jun 5, 2023
f146d1c
Apply suggestions
jsbautista Jun 6, 2023
f6ca198
Merge branch 'master' into VariableExplorerIssues
jsbautista Jun 13, 2023
b1fba82
git subrepo pull --remote=https://github.com/jsbautista/spyder-kernel…
jsbautista Jun 13, 2023
4028882
Merge branch 'master' into VariableExplorerIssues
jsbautista Jun 19, 2023
d669a1a
git subrepo pull --remote=https://github.com/jsbautista/spyder-kernel…
jsbautista Jun 19, 2023
d71a5a1
Merge branch 'VariableExplorerIssues' of https://github.com/jsbautist…
jsbautista Jun 19, 2023
429c61a
Apply suggestions
jsbautista Jun 26, 2023
2f08bb1
Merge branch 'master' into VariableExplorerIssues
jsbautista Jun 26, 2023
e85910a
Merge branch 'master' into VariableExplorerIssues
jsbautista Jul 4, 2023
0d2e4ca
Merge branch 'master' into VariableExplorerIssues
jsbautista Jul 7, 2023
079132d
Apply suggestions
jsbautista Jul 10, 2023
cb27172
Merge branch 'VariableExplorerIssues' of https://github.com/jsbautist…
jsbautista Jul 10, 2023
8054316
Apply suggestions
jsbautista Jul 10, 2023
ea6243a
Apply suggestions
jsbautista Jul 10, 2023
b005727
Apply suggestions
jsbautista Jul 10, 2023
c1703d0
Apply suggestions
jsbautista Jul 10, 2023
cd1f439
Apply suggestions
jsbautista Jul 10, 2023
4952a49
Apply suggestions
jsbautista Jul 10, 2023
ae04a3c
Update spyder/widgets/collectionseditor.py
jsbautista Jul 12, 2023
dd82da9
git subrepo pull --remote=https://github.com/spyder-ide/spyder-kernel…
dalthviz Jul 12, 2023
4c68a79
Apply suggestions from code review
dalthviz Jul 13, 2023
7f930d7
Create private API section
dalthviz Jul 13, 2023
a9e895b
Update maininterpreter open preferences logic
dalthviz Jul 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions
  • Loading branch information
jsbautista committed Jun 6, 2023
commit f146d1c69f5aa0ddf76c1d0ebc6e17a0555750fb
7 changes: 1 addition & 6 deletions spyder/config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@
'dataframe_format': '.6g', # No percent sign to avoid problems
# with ConfigParser's interpolation
'excluded_names': EXCLUDED_NAMES,
'exclude_private_preferences': True,
'exclude_uppercase_preferences': False,
'exclude_capitalized_preferences': False,
'exclude_unsupported_preferences': False,
'exclude_callables_and_modules_preferences': True,
'exclude_private': True,
'exclude_uppercase': False,
'exclude_capitalized': False,
Expand All @@ -186,7 +181,7 @@
'minmax': False,
'show_callable_attributes': True,
'show_special_attributes': False,
'filter_on': False
'filter_on': True
}),
('debugger',
{
Expand Down
10 changes: 5 additions & 5 deletions spyder/plugins/variableexplorer/confpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class VariableExplorerConfigPage(PluginConfigPage):
def setup_page(self):
filter_group = QGroupBox(_("Filter"))
filter_data = [
('exclude_private_preferences',
('exclude_private',
_("Exclude private references")),
('exclude_capitalized_preferences',
('exclude_capitalized',
_("Exclude capitalized references")),
('exclude_uppercase_preferences',
('exclude_uppercase',
_("Exclude all-uppercase references")),
('exclude_unsupported_preferences',
('exclude_unsupported',
_("Exclude unsupported data types")),
('exclude_callables_and_modules_preferences',
('exclude_callables_and_modules',
_("Exclude callables and modules"))
]
filter_boxes = [self.create_checkbox(text, option)
Expand Down
43 changes: 19 additions & 24 deletions spyder/plugins/variableexplorer/widgets/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,15 @@ def setup(self):
text=_("Exclude private variables"),
tip=_("Exclude variables that start with an underscore"),
toggled=True,
option='exclude_private',
initial=self.get_conf('exclude_private_preferences'),
option=self.get_conf('exclude_private'),
)

self.exclude_uppercase_action = self.create_action(
VariableExplorerWidgetActions.ToggleExcludeUpperCase,
text=_("Exclude all-uppercase variables"),
tip=_("Exclude variables whose name is uppercase"),
toggled=True,
option='exclude_uppercase',
initial=self.get_conf('exclude_uppercase_preferences'),
option=self.get_conf('exclude_uppercase'),
)

self.exclude_capitalized_action = self.create_action(
Expand All @@ -145,8 +143,7 @@ def setup(self):
tip=_("Exclude variables whose name starts with a capital "
"letter"),
toggled=True,
option='exclude_capitalized',
initial=self.get_conf('exclude_capitalized_preferences'),
option=self.get_conf('exclude_capitalized'),
)

self.exclude_unsupported_action = self.create_action(
Expand All @@ -155,8 +152,7 @@ def setup(self):
tip=_("Exclude references to data types that don't have "
"an specialized viewer or can't be edited."),
toggled=True,
option='exclude_unsupported',
initial=self.get_conf('exclude_unsupported_preferences'),
option=self.get_conf('exclude_unsupported'),
)

self.exclude_callables_and_modules_action = self.create_action(
Expand All @@ -165,8 +161,7 @@ def setup(self):
tip=_("Exclude references to functions, modules and "
"any other callable."),
toggled=True,
option='exclude_callables_and_modules',
initial=self.get_conf('exclude_callables_and_modules_preferences')
option=self.get_conf('exclude_callables_and_modules')
)

self.show_minmax_action = self.create_action(
Expand Down Expand Up @@ -453,20 +448,6 @@ def switch_widget(self, nsb, old_nsb):
# ---- Public API
# ------------------------------------------------------------------------

def change_filter_state(self, value):
"""Handle the change of the filter state."""
self.filter_on = not self.filter_on
self.filter_button.setChecked(self.filter_on)
self.filter_button.setToolTip(_("Filter variables"))
self.filter_variables()

def filter_variables(self):
self.exclude_private_action.setEnabled(self.filter_on)
self.exclude_uppercase_action.setEnabled(self.filter_on)
self.exclude_capitalized_action.setEnabled(self.filter_on)
self.exclude_unsupported_action.setEnabled(self.filter_on)
self.exclude_callables_and_modules_action.setEnabled(self.filter_on)

def create_new_widget(self, shellwidget):
"""Create new NamespaceBrowser."""
nsb = NamespaceBrowser(self)
Expand Down Expand Up @@ -631,3 +612,17 @@ def _set_actions_and_menus(self, nsb):
# several places in CollectionsEditor.
editor.insert_action_above = QAction()
editor.insert_action_below = QAction()

def _change_filter_state(self, value):
"""Handle the change of the filter state."""
self.filter_on = not self.filter_on
self.filter_button.setChecked(self.filter_on)
self.filter_button.setToolTip(_("Filter variables"))
self.filter_variables()

def _enable_filter_actions(self):
self.exclude_private_action.setEnabled(self.filter_on)
self.exclude_uppercase_action.setEnabled(self.filter_on)
self.exclude_capitalized_action.setEnabled(self.filter_on)
self.exclude_unsupported_action.setEnabled(self.filter_on)
self.exclude_callables_and_modules_action.setEnabled(self.filter_on)