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

Customizing FolderBrowser, Open, Save, Message Dialogs #30

Closed
pdinnissen opened this issue Dec 6, 2017 · 16 comments
Closed

Customizing FolderBrowser, Open, Save, Message Dialogs #30

pdinnissen opened this issue Dec 6, 2017 · 16 comments

Comments

@pdinnissen
Copy link
Contributor

Would you be open to extending your DialogService to have a FrameworkDialog Factory/Interface that provides which FolderBrowser, Open, Save, MessageBox dialogs get used?

I really like this dialog service, but would like to combine it with Ookii dialogs or other dialogs provided other third parties.

I'm willing to do a pull request if you are open to the idea.

@pdinnissen
Copy link
Contributor Author

I've put together a sample in this fork.

I've updated the FolderBrowser Demo accordingly to use the Ookii dialog.

I'm sorry that I haven't followed the proper committing conventions, I just wanted to quickly get some type of Proof of Concept going.

I haven't touched the MessageBox, but that could be easily added in. I'm also sure some of the changes I've done could also be improved a bit.

@FantasticFiasco
Copy link
Owner

Hi pdinnissen and welcome to the project!

I would also think that to be a good idea, MVVM Dialogs already support custom dialogs, but it would have to be implemented in a way that doesn't get in the way of the mainstream implementation.

I haven't looked at your fork yet, but will probably get to it in a couple of hours, and I would happily accept pull requests. We can work together on it if you would like. In that case permit me push rights to the fork.

@pdinnissen
Copy link
Contributor Author

I believe I've given you the necessary rights.

I think some bit of collaboration would yield the best result. I believe my sample doesn't touch the mainstream implementation and is also a non-breaking change. Everything is under the hood and a few new DialogService constructors for all the new permutations.

@FantasticFiasco
Copy link
Owner

I'm going to create new demo projects that focus on the custom framework dialogs, so I'll be moving the code you've added to the project Demo.FolderBrowserDialog. Do you have any pending changes in the demo application that you would like to commit before I begin?

@pdinnissen
Copy link
Contributor Author

No. That's as far as I got. A new demo makes sense.

@FantasticFiasco
Copy link
Owner

FantasticFiasco commented Dec 6, 2017

Do you have VS2017 installed? I would like to convert solution to VS2017, but won't if you are running VS2015.

I'm currently making some minor changes that isn't related to your feature request, but would like to do them anyway. Hope you don't mind.

When we're finished you should squash all commits, claiming them as your own, and be a part of the commit history of this project.

@pdinnissen
Copy link
Contributor Author

pdinnissen commented Dec 6, 2017 via email

@FantasticFiasco
Copy link
Owner

FantasticFiasco commented Dec 7, 2017

I've caught a nasty bug and might be out a couple of days, but these are the things I plan to commit before we create the pull request and merge back:

  • Review MVVM Dialog changes
  • Custom folder browser dialog
    • Add demo application
    • Fix tests
  • Custom open file dialog
    • Add demo application
    • Add tests
  • Custom save file dialog
    • Add demo application
    • Add tests
  • Custom message box
    • Implement
    • Add demo application
    • Add tests
  • Update README.md
  • Update CHANGELOG.md

@pdinnissen
Copy link
Contributor Author

pdinnissen commented Dec 7, 2017 via email

@FantasticFiasco
Copy link
Owner

lol yea that was a poor choice of words, no bugs found in your code!

@FantasticFiasco
Copy link
Owner

I think the code is ready for a pull request now.

Can you squash all commits into a single one with the commit message of my final commit, and then create the pull request?

Thanks for the contribution, it's an important one!

FantasticFiasco added a commit to pdinnissen/mvvm-dialogs that referenced this issue Dec 11, 2017
Add support for customizing the standrad Windows dialogs like the message box
or the open file dialog.  This is accomplished by providing your own
implementation of IFrameworkDialogFactory to DialogService.

Closes FantasticFiasco#30
@pdinnissen
Copy link
Contributor Author

pdinnissen commented Dec 11, 2017 via email

@FantasticFiasco
Copy link
Owner

I'll lead you through it, but let me start. Until I say so, don't pull or fetch your fork.

FantasticFiasco pushed a commit to pdinnissen/mvvm-dialogs that referenced this issue Dec 11, 2017
Add support for customizing the standrad Windows dialogs like the message box
or the open file dialog.  This is accomplished by providing your own
implementation of IFrameworkDialogFactory to DialogService.

Closes FantasticFiasco#30
FantasticFiasco pushed a commit to pdinnissen/mvvm-dialogs that referenced this issue Dec 11, 2017
Add support for customizing the standrad Windows dialogs like the message box
or the open file dialog.  This is accomplished by providing your own
implementation of IFrameworkDialogFactory to DialogService.

Closes FantasticFiasco#30
FantasticFiasco pushed a commit to pdinnissen/mvvm-dialogs that referenced this issue Dec 11, 2017
Add support for customizing the standrad Windows dialogs like the message box
or the open file dialog.  This is accomplished by providing your own
implementation of IFrameworkDialogFactory to DialogService.

Closes FantasticFiasco#30
@FantasticFiasco
Copy link
Owner

We're ready to get to work. We're doing this because I would like you to get credit for the work you've done.

The first thing for you to do is to reset your history. The git commit history has changed because I've squashed all our commits into a single one.

Run the following commands in a prompt of your choice:

git fetch
git reset --hard origin/master

The next thing for you to do is to claim the last commit as your own. According to this question you should now run:

git rebase -i HEAD~1

and when vim is opened you should enter edit mode by pressing the i key, navigate to the commit using the arrow keys and change pick to edit. You then exit the edit mode using Esc, and then type :wq to write to disk and quit.

You will at this point be able to change the author. Type the following in the command prompt:

git commit --amend --author="Author Name <[email protected]>"

where you replace the name and e-mail address with the one you've configured git to use.

You are then ready to continue the rebase by running the following command:

git rebase --continue

When the rebase is done, push your changed history to GitHub by running the following command:

git push --force

And then you are done! You've claimed responsibility for all the changes on your fork.

If you run into any trouble, please let me know and I will try to help you.

pdinnissen added a commit to pdinnissen/mvvm-dialogs that referenced this issue Dec 11, 2017
Add support for customizing the standrad Windows dialogs like the message box
or the open file dialog.  This is accomplished by providing your own
implementation of IFrameworkDialogFactory to DialogService.

Closes FantasticFiasco#30
@pdinnissen
Copy link
Contributor Author

pdinnissen commented Dec 11, 2017 via email

@FantasticFiasco
Copy link
Owner

A new version is now live on nuget.org

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

No branches or pull requests

2 participants