-
Notifications
You must be signed in to change notification settings - Fork 90
VSCODE-2: Connect form #50
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned it in slack before, I like the prev size of the leaf :) yes it was higher than other icons, but the width was matching others better.
Did you decide to use Ruflux just because it was the quickest way since compass-connect
is using it? Do you think it would take lots of time to use Redux instead? The thing is that for compass-connect
there is already a ticket to rewrite it: https://jira.mongodb.org/browse/COMPASS-3743
We did it already for the rest of Compass plugins, and Connect it is the last one that left.
Did you also take a look at what we discussed during our call with Lucas? Storing extra options that are not presented in URI. I think if we will do it the same way we do it compass connect, maybe we can extract some level of logic from compass connect to reuse it for both apps 🤔
It can be painful to maintain two projects if they have lots and common and slightly different code.
@alenakhineika I think it would be nice to have this on redux, just used reflux because it was from For options which aren't in the URI (ssh & ssl) I'd like to address those in https://jira.mongodb.org/browse/VSCODE-74 and https://jira.mongodb.org/browse/VSCODE-75 - We'll have to do a custom solution for the connect form since it's inside an iframe and doesnt have file system access. I think we'll be able to re-use the system from |
package.json
Outdated
"main": "./out/extension.js", | ||
"scripts": { | ||
"clean": "rimraf ./out/*", | ||
"clean": "rimraf ./out/* ./connect-form", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this connect-form
to the out
folder? Or do you keep it separated by the purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it should be there yup thanks. I think I was making sure it was working independently.
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react-redux": "^7.2.0", | ||
"redux": "^4.0.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yaaay buddy Redux! :)
); | ||
}); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you notice that eslint complains less about the syntax? Did we change the configuration at some point?
port: port; | ||
}; | ||
|
||
class ConnectionModel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay plain class and no more ampersand-model
! 👻
ac4a031
to
8cf07dd
Compare
https://jira.mongodb.org/browse/VSCODE-77
This PR adds the components for the connect form dialogue. When the
Connect
button is clicked, the webview sends the driver url to the extension which then begins connecting and prompts the user on where to save the connection.There's a stripped down version of the connection model here, I copied it over instead of using the currently connection model library because there are some dependencies on electron for file opening. I'd like to avoid some of this code duplication so I'm going to cleaning this up and giving it a think in the future tickets. Open to suggestions. The main reason for not using the current library is the trickiness around having to maintain file handling in the main extension and tracking the state of it in the webview for ssl and ssh. File handling and styling are the main reasons we're creating this whole new connect form here. I think we're saving a good bit of time by not repurposing compass-connect, but we'll have to see.
Since there's a lot going on in this PR I wanted to break some of the work into a couple more tickets:
Also in this PR I tweaked the sidebar icon, pulling in the new svg Fred made, and also removed the extra field inside of
Array
elements in schema.A couple notes:
info
indicators I haven't yet pulled in the assets for, so that'll be in a future PR as well. (The small box next toAuthentication Database
for example).Screenshots
Connect Form

Light mode 👀(Have to re-open the tab to see changes update since they're pulled in at the start in styling)

New Sidebar Leaf - How do ya'll feel on the size? Maybe bigger?

When

Create Free Cluster
is clicked