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: Several fixes related to the tabify plugins functionality #19163

Merged
merged 12 commits into from
Aug 27, 2022

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Aug 24, 2022

Description of Changes

  • Fix tabifying external and internal plugins (e.g. Spyder-notebook and Debugger) that are loaded after Spyder runs for the first time.
  • Move methods related to tabifying plugins and registering custom layouts from MainWindow to the Layout plugin.
  • Fix error when trying to restore visible plugins that are no longer available (this error was reported by @dalthviz).
  • Show visible external plugins when switching layouts. For instance, if Spyder-notebook is displayed in the interface and the user switches to the Matlab layout, then that plugin is displayed again (it was not before).
  • Fix TABIFY class attribute for the Pylint and Profiler plugins.
  • Reorganize code a bit in the Layout plugin.

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @ccordoba12

@ccordoba12 ccordoba12 added this to the v5.3.3 milestone Aug 24, 2022
@ccordoba12 ccordoba12 self-assigned this Aug 24, 2022
@ccordoba12 ccordoba12 changed the title PR: Several fixed related to the tabifying plugins functionality PR: Several fixes related to the tabifying plugins functionality Aug 24, 2022
@ccordoba12 ccordoba12 changed the title PR: Several fixes related to the tabifying plugins functionality PR: Several fixes related to the tabify plugins functionality Aug 24, 2022
@dalthviz
Copy link
Member

Seems like an issue on with the test_programmatic_custom_layouts related with:

  • configparser.NoOptionError: No option 'layout_testing layout/size' in section: 'quick_layouts'
  • AttributeError: 'MainWindow' object has no attribute 'tabify_plugin'

Maybe with the changes made the layout_testing layout doesn't get loaded @ccordoba12 ?

@ccordoba12
Copy link
Member Author

I think I fixed that problem in my last commit.

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ccordoba12 ! I left some comments regarding the code to register custom layouts (maybe could be worthy to be moved to the Layouts plugins), and also the possibility to addof the error flag to the plugins get_plugin method instead of using the mainwindow version. Other than that this LGTM 👍

spyder/plugins/layout/plugin.py Outdated Show resolved Hide resolved
spyder/app/mainwindow.py Outdated Show resolved Hide resolved
@dalthviz
Copy link
Member

dalthviz commented Aug 26, 2022

@ccordoba12 I think that some tests fixtures that mock the MainWindow will need an update too (like for the Pylint plugin tests)

@ccordoba12
Copy link
Member Author

Yep, I just did it.

@ccordoba12 ccordoba12 merged commit 99f5a9a into spyder-ide:5.x Aug 27, 2022
@ccordoba12 ccordoba12 deleted the fix-tabify-new-plugins branch August 27, 2022 00:40
ccordoba12 added a commit that referenced this pull request Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants