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

[Transition to WPF] ServerSharingView & ServerSharingViewModel #2959

Merged
merged 3 commits into from
Oct 11, 2020
Merged

[Transition to WPF] ServerSharingView & ServerSharingViewModel #2959

merged 3 commits into from
Oct 11, 2020

Conversation

database64128
Copy link
Contributor

@database64128 database64128 commented Sep 18, 2020

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly

  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])

  • Use Preview tab to see how your pull request will actually look like

  • Searched for similar pull requests

  • Compiled the code with Visual Studio

  • Require translation update

  • Require document update (readme.md, wikipage, etc)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New feature

Description of your pull request and other information

This is a series of attempts that aims to modernize shadowsocks-windows by rewriting most UI components using WPF and standard MVVM patterns, and eventually make it a highly-maintainable WPF MVVM project.

This PR adds the ReactiveUI.WPF package as the MVVM framework. The old server sharing form is replaced with a new one implemented in XAML.

@Stzx
Copy link
Collaborator

Stzx commented Sep 21, 2020

If I use WPF technology, I actually prefer to open a new WPF UI project directly in v5, and then gradually convert the old project into a library.

@database64128
Copy link
Contributor Author

If I use WPF technology, I actually prefer to open a new WPF UI project directly in v5, and then gradually convert the old project into a library.

It's certainly more clean to start a new WPF UI project from scratch. And it's definitely a good idea if you have quite a bit of time dedicated to the project.

However, given the condition of the project, I'm not confident if I can accomplish all these goals on my own. For now, I'd rather take baby steps: convert to WPF incrementally.

BTW, I feel the Shadowsocks organization is rather fragmented, compared to other similar organizations like V2Fly. The communication between maintainers at Shadowsocks is rather rare, with mostly infrequent exchanges in issues and emails. It would help a lot if we could have some kind of group chat between maintainers and contributors for more direct communication.

@Stzx
Copy link
Collaborator

Stzx commented Sep 21, 2020

Yes, this is indeed a problem. There are not many developers currently active in the project. Most of the existing developers are busy with things in real life, so the cost of communicating with each other is high.

BTW, It has not yet been determined whether the UI will be rewritten in v5 and what technology will be used. .NET 5 will be released soon, I think it’s time to determine this problem.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

IMO add a WPF window (not WPF control in WinForms window) is better.

@database64128
Copy link
Contributor Author

Are we cleared to merge now? 😃

@database64128
Copy link
Contributor Author

database64128 commented Sep 30, 2020

Note that the current placement of ServerSharingWindow in the project root directory is intentional and was only decided after careful consideration. The ServerSharingWindow, along with some other WPF windows coming in future PRs, is intended to hold the related control as a temporary replacement of previous forms. Eventually the new main interface will include all these controls and the windows will be removed. These windows are definitely not views. After examining some similar projects' directory layout, it's my opinion that the project root directory is the best place to hold them for now.

Thanks @studentmain for reminding me of this situation.

@database64128

This comment has been minimized.

@database64128
Copy link
Contributor Author

Although we will be mostly targeting v5/master for the new WPF interface, we won't have a usable build for a long while. I think it's not a bad idea to bring some new stuff back to master for more coverage. If no one is opposing this, I'm merging the PR in 24 hours.

@database64128 database64128 merged commit 1c2ac29 into shadowsocks:master Oct 11, 2020
@Stzx Stzx added this to the v4.2.x milestone Oct 11, 2020
@database64128 database64128 deleted the wpf-server-sharing branch October 11, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants