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

Add About Dialog #32

Open
ironcev opened this issue Nov 6, 2019 · 14 comments
Open

Add About Dialog #32

ironcev opened this issue Nov 6, 2019 · 14 comments

Comments

@ironcev
Copy link
Member

ironcev commented Nov 6, 2019

The About Dialog should roughly look like this:

image

The dialog cannot change its window size. Pick up a size that is not too small and not too big and can fit on a 14" laptop screen ;-)

About Tab

If there is an internet connection fetch the data from GitHub and VS Marketplace and display them. If not or if any error happens during fetching do not display anything.

This might be useful:

Version History Tab

The Version History tab lists the versions on one side and when a version is selected the details for that version are displayed on the left:

image

To render the details use WPF Documents.

The whole content of the Version History tab should be generated on the fly based on the content of the Changelog file.

This might be useful:

@afrlan
Copy link
Collaborator

afrlan commented Nov 6, 2019

Oh, looks like a nice challenge. It is good first issue.

@afrlan
Copy link
Collaborator

afrlan commented Nov 14, 2019

Unfortunately, markdowntextblock requires Universal, 10.0.16299.0 or higher. I suppose we won't be changing project type to accomodate that (it's usable only on win10 and higher).
I have several options: unpack that control or use stack panel with scroll viewer. Second option is a bit brute-force. I'm inclined using second option.

@ironcev
Copy link
Member Author

ironcev commented Nov 14, 2019

Thanks for investigating the issues further @afrlan! No, we will not go for Universal. Markdowntextblock is a convenience but not strictly necessary. The Markdown that we have in the CHANGELOG is rather simple and it will remain simple. I would experiment with a combination of parsing Markdown using Markdown parser and creating the WPF Document based on the parsed Markdown document. Maybe it makes sense to experiment a bit with the Markdown Renderers supported by the parser. Whatever is easier and more convenient to build the WPF document.

@ironcev
Copy link
Member Author

ironcev commented Nov 14, 2019

One generall remark and requirement actually. To speed up the development of the About Dialog and also in the future of other dialogs that are not embedded into VIsual Studio we need a possibility to develop the dialog without the need to run the Sharpen extension inside of Visual Studio. This is important for iterating quickly and also to try out the Dialog(s) in different circumstances e.g. in the case of the About Dialog to see how it behaves when the internet connection is not available and the number of e.g. Github stars is not displayed.

A typical way to do this is to have a separate tryout project and to (mis)use some unit testing framework as a runner for displaying the dialog.

@afrlan
Copy link
Collaborator

afrlan commented Nov 15, 2019

I started developing in "Lab" folder.
After I complete it, i'll transfer it to Solution as separate project. It doesn't require any starting parameters.

Should navigation, if possible be in VisualStudio, as for "Learn more..." links, or should it always open in default browser?

@ironcev
Copy link
Member Author

ironcev commented Nov 15, 2019

Ok Lab is the right place to put it so far because there is a plenty of experimenting involved. In the next step we will need a “tryout” project for regular development.

@ironcev
Copy link
Member Author

ironcev commented Nov 15, 2019

The links should open in the standard browser.

@afrlan
Copy link
Collaborator

afrlan commented Nov 16, 2019

Markdown parser expects somewhat different format of ReleaseNotes.txt (https://en.wikipedia.org/wiki/Markdown)

Headings2 should be preceded with ##; bulletpoints should be marked * instead of -.

There are 2 obvious options going forward: I can parse ReleaseNotes.txt as is, adding additional options as need arises, or we can rewrite the document using expected notation.

@ironcev
Copy link
Member Author

ironcev commented Nov 16, 2019

ReleaseNotes.txt is actually a “txt”fied version of the CHANGELOG.md file because VS install dialog does not support Markdown. We can use changelog file as an input since it is a proper Markdown file. We can also parse ReleaseNotes as proposed which will also work fine for now but it might be that in the future we will have e.g. links in the Markdown or something (in the changelog). So parsing the changelog would be a better option.

Note that at the moment Changelog is not a part of the package and the ReleaseNotes are created manually out of the changelog.

@afrlan
Copy link
Collaborator

afrlan commented Nov 16, 2019

I'll get changelog.md and add it to my project.

@afrlan
Copy link
Collaborator

afrlan commented Nov 16, 2019

I believe about box is ready for tryout phase.

@ironcev
Copy link
Member Author

ironcev commented Nov 17, 2019

☺☺ Awesome! Does it mean you will do a pull request now with the lab version or you have something else on your mind when you say "tryout"?

@afrlan
Copy link
Collaborator

afrlan commented Nov 17, 2019

Let's try.

Several notes: It loads assembly information from project. (It should, eventualy, be part of project.)
I tried something with threetool and it remained part of my commits. I'll re-fork master after this goes throug.

Also, I'll rework markdown => flowdocument to be a bit more general, but that can be a separate issue.

@ironcev ironcev mentioned this issue Dec 27, 2019
@ironcev
Copy link
Member Author

ironcev commented Jan 5, 2021

@afrlan When you start adding the About Dialog to Sharpen extension be aware that you have to derive the dialog from the DialogWindow as explained here: https://docs.microsoft.com/en-us/visualstudio/extensibility/creating-and-managing-modal-dialog-boxes?view=vs-2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants