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: Add UI for the Remote client plugin #22079

Merged
merged 49 commits into from
May 15, 2024

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented May 14, 2024

Description of Changes

  • This completes the work started at PR: Add backend for a new Remote client plugin #21757 by adding the necessary graphical elements to connect to remote servers from Spyder.
  • Add the ability to save, get and remove options in a secure way to our config system.
  • Make interrupts, manual and automatic (i.e. when the kernel dies without user intervention) restarts work for remote kernels.
  • Improve SpyderConfigPage in several ways to make it work as a form. Also, allow several of its widgets to have a vertical layout.
  • Allow to hide pages in SidebarDialog.

Visual changes

  • Add entry to the Consoles menu to manage remote connections and create consoles for them.

    imagen

  • When clicking on Manage remote connections a dialog is shown that allows users to

    • Create new connections, validating that the provided info is appropriate

      imagen

    • Display the connection status and info of introduced connections

      imagen

      imagen

Issue(s) Resolved

Part of #10946.

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:

This actually makes lineedits, comboboxes and spinboxes have the same
height.
This allows to stop tracking the current widgets in case we want to add
new ones.
- However, avoid doing that in ConfigDialog because after initialize and
before adding the page, we need to config tabs for plugins that have
them.
- Also, add a method to count the number of available pages to
SidebarDialog.
With this we'll able, for instance, to alter users when there's missing
info in those widgets.
- Now the state of that button is disabled by default for saved pages.
- We enable it when the connection info is changed by users.
Also, add section headers in that class for easier navigation.
By being a class constant, it was shared by all ConnectionPage's, which
is incorrect.
That required to also add a container to the plugin.
Also, add missing key to SSHClientOptions
That way we'll avoid possible conflicts with other icons in the future
We do this by saving the connection status and its corresponding message
to our config system and reading them from it.
For now this menu only contains an entry to show the connection dialog,
but it'll be populated with additional entries to start consoles on each
registered server.
That avoids blocking the UI while doing it.
- That's because we're going to show more validation info in that label.
- Also, change its background color to not make it look like a button.
…ction names

Also, disable save connection button after saving info for regular pages
and improve annotations a bit in SidebarDialog.
- That will allow us to give users real time feedback about the
correctness of the value they introduced in the lineedit.
- Also, fix padding of tooltips for elements placed inside lineedits.
- That way we'll give users immediate feedback about incorrect data in
those fields.
- Also, don't validate repeated name against the same server.
We need to receive a response from the server first so that the
associated kernel can be correctly shutdown.
- For that we make all buttons be part of SpyderDialogButtonBox so that
they have exactly the same style.
- Decrease left/right padding for those buttons because it's not
necessary to have a big value now due the previous change.
- Implementing this fix for all our dialogs will come later.
- Also, make ConnectionDialog use SpyderDialogButtonBox to hide icon in
standard buttons.
@pep8speaks
Copy link

pep8speaks commented May 14, 2024

Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 377:80: E501 line too long (83 > 79 characters)
Line 378:80: E501 line too long (93 > 79 characters)
Line 379:80: E501 line too long (96 > 79 characters)

Comment last updated at 2024-05-15 01:00:34 UTC

- This test started to fail because we changed the way we report
kernel errors for external kernels.
- Also, fix small style issues.
- An extra validation was necessary to decide if we need to save those
options securely.
- This error was detected by our tests.
@ccordoba12
Copy link
Member Author

ccordoba12 commented May 15, 2024

This is working fine in my manual testing, so I'm going to merge it. It still needs a more complete review and tests, but that will come in follow-up PRs.

@ccordoba12 ccordoba12 merged commit b4d28aa into spyder-ide:master May 15, 2024
14 checks passed
@ccordoba12 ccordoba12 deleted the remote-client-ui branch May 15, 2024 02:00
@ccordoba12
Copy link
Member Author

@dalthviz, please give this a thorough UI/UX review, open a new issue with your findings and try to solve the most important shortcomings before 6.0 final.

@ccordoba12 ccordoba12 changed the title PR: Add UI for the remote client plugin PR: Add UI for the Remote client plugin May 15, 2024
@ccordoba12 ccordoba12 changed the title PR: Add UI for the Remote client plugin PR: Add UI for the Remote client plugin May 15, 2024
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