Danielku15 / BetterStartPage

A Visual Studio like start page which replaces the news section by a custom project dashboard.
47 stars 20 forks source link

Vs2019 Support #41

Open christiantippner opened 5 years ago

christiantippner commented 5 years ago

Are you planning support for Visual Studio 2019. Microsoft has implemented a new StartDialog. But i miss a full configurable start page like yours. Please inform us about your planning.

Thanks a lot Christian

stijnherreman commented 5 years ago

The VS 2017 documentation mentions how to customize the start page with the Visual Studio SDK, but the VS 2019 documentation does not. So I assume it's currently not possible for this extension to support VS 2019.

There's a request on Developer Community to reintroduce the start page.

Danielku15 commented 5 years ago

I also doubt that I will be able to port this over. I haven't seen any extension system for the new launcher dialog yet. During the evaluation time of VS2019 I submitted requests that Microsoft adds an own Tab to the launcher with similar functionality as in BetterStartPage, but nothing happened.

Danielku15 commented 5 years ago

I checked today a bit the implementation of Microsoft on the new launch dialog. Again with some hacks it is likely adjustable and extendable with a custom UI. I quickly made an extension that patches the dialog to make the MRU list 50% transparent and maximize the window: image

Technically it would work even though it takes a few seconds until the layout of the quick start window changes. I will need to check if I can make Visual Studio auto-load my extension faster but I fear with the async loading of extensions it is not possible any faster.

I'm currently thinking of how the UI could look like. If there is really interest from the market I could have a closer look to bring a 2019 version of Better Start Page.

magicmayhem commented 5 years ago

It would be really great if you could work on this. It's a real step backwards from Microsoft not to have a custom start page.

confusedsushi commented 5 years ago

Is it possible to add a custom entry to Tools -> Options -> Environment -> Startup -> On startup, open:?

If so, why not create your very own startup page? Simply open a Window which renders some HTML similar to the old BetterStartPage.

czuck commented 5 years ago

I suggested the feature int he Developer Community for VS, if enough people vote it up it up.. https://developercommunity.visualstudio.com/idea/598272/allow-customization-of-start-page.html

jdkoehler commented 5 years ago

@Danielku15 What if, as a quick-and-dirty work-around, you updated BetterStartPage to work in Visual Studio 2019 with Start Page on startup already installed?

Danielku15 commented 5 years ago

I created yesterday a small prototype of BetterStartPage for VS2019 and the patching works. The main drawback is that since VS2019 all extensions are loaded asynchronously in the background. This means also for BSP that it is loaded delayed. As a result the Quick Start Window is showing some time the original VS version, and then my extension kicks in and restructures the UI.

Here a small demo Gif: https://coderline.net/bsp2019.gif

I'm not really convinced that this is really a good solution as it is too slow. I think an alternate solution would be better. Like the "Start Page on startup" but with a BSP inside.

Update 1:

The "Start Page on startup" approach works a bit better. Extensions get loaded faster and I can simply trigger an open of the Quick Start Window:

Demo

The adjustments I made so far are:

TODOs would be:

Update 2

I made a small UI draft how it could look like finally. I think I might go for the all-in-one. It does not hide anything and devs have large screens anyhow.

With Tabs UI Draft

All in One

UI Draft - Large

Danielku15 commented 5 years ago

I pushed my initial changes to GitHub and deployed an early-access version to the Marketplace. There is still a bit to do, but you can already let me know if it fits your needs and what you'd like to have changed.

https://marketplace.visualstudio.com/items?itemName=Danielku15.BetterStartPage2019

SylwesterZarebski commented 5 years ago

For me, extension for VS 2019 (16.1.3) is not working. Window is not resizeable, i could not add any project, import do nothing. How can i help to debug this problem?

Danielku15 commented 5 years ago

If there are catched exceptions in the plugin you should find infos in the ActivityLog of Visual Studio: https://devblogs.microsoft.com/visualstudio/troubleshooting-extensions-with-the-activity-log/ Is your error here related to #43 that you reported or additionally?

SylwesterZarebski commented 5 years ago

That is another problem. I thought that importing old configuration could help, but sadly, no.

As for errors, there are errors after loading extension, but i'm not sure if these are from this extension or some other:

N# Type Description GUID Hr Source Time (UTC)
1505   Importing pkgdef file          c:\users\sylwek\appdata\local\microsoft\visualstudio\16.0_963bad19\extensions\ogzdt31d.2nh\betterstartpage.pkgdef     VisualStudio 2019/06/17 09:42:52.153
1506   Saving pkgdef cache meta data     VisualStudio 2019/06/17 09:42:52.154
1507   Saving pkgdef cache time stamp     VisualStudio 2019/06/17 09:42:52.154
1508   Newest node in pkgdef cache          Software\Microsoft\VisualStudio\16.0_963bad19_Config     VisualStudio 2019/06/17 09:42:52.200
1509   InitializeCache: Post initializing cache     VisualStudio 2019/06/17 09:42:52.200
1510   PkgDefManagement startup complete     VisualStudio 2019/06/17 09:42:52.201
1511 ERROR Failed to read Version   80070002 VisualStudio 2019/06/17 09:42:52.225
1512 ERROR Binding Redirect / CodeBase entry from configuration hive is malformed, ignoring.          Software\Microsoft\VisualStudio\16.0_963bad19_Config\RuntimeConfiguration\dependentAssembly\bindingRedirection{BB256134-B73E-47AA-93B4-C49FF433E5B1}
SylwesterZarebski commented 5 years ago

Otherwise there are no distinct errors besides UI libraries:

N# Type Description GUID Hr Source Time (UTC)
1560 ERROR Loading UI library {2FFE45C4-5C73-493C-B187-F2E955FF875E} 800a006f VisualStudio 2019/06/17 09:42:53.629
1561 ERROR Error loading UI library for package Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=16.0.0.0, Culture=neutral. HrLoadNativeUILibrary failed with 0x800a006f.      
jdkoehler commented 5 years ago

I'm having the same problems as @SylwesterZarebski. I've tried it on four different Windows 10 machines.

SylwesterZarebski commented 5 years ago

Start screen looks like (using dark theme): obraz

Above screen is taken from another PC. Extension has version 2.0.0 (preview) from marketplace.

Danielku15 commented 5 years ago

I just published a 2.0.1 with various improvements. I hope this resolves some issues:

Please update and have a look if the basics are working now.

SylwesterZarebski commented 5 years ago

Thanks, extension is working.

I found only one slight bug. When upgraded from 2.0.0, there is configuration mismatch and extension gives popup to reset configuration. Then extension do not react to anything, looks like reset is not successful or internal config is not properly initialized. Restarting VS is sufficient to bring everything to normal.

jdkoehler commented 5 years ago

2.0.1 is working for me. On four machines, I did three upgrades and one "clean" (uninstalled then installed) and all worked with no issues. Imported a BSP configuration from VS2017 and it also worked!

Danielku15 commented 5 years ago

When upgraded from 2.0.0, there is configuration mismatch and extension gives popup to reset configuration.

Yes, this is possible. They got somehow incompatible with the settings-serialization I use. I had to revert some things to be compatible with the export/import files. But clean installations should work. I decided to reset the configuration in case of an error in the settings loading.

2.0.1 is working for me. On four machines, I did three upgrades and one "clean" (uninstalled then installed) and all worked with no issues. Imported a BSP configuration from VS2017 and it also worked!

Great to hear. Then I can go forward with making it better from the UX. The UI still feels a bit prototype-ish. I want to align it better with Visual Studio.

SylwesterZarebski commented 5 years ago

@Danielku15 commented on 18 cze 2019, 16:05 CEST:

[...] The UI still feels a bit prototype-ish. I want to align it better with Visual Studio.

That would be great!

stijnherreman commented 5 years ago

I've just installed 2.0.1, didn't have an earlier version installed but imported the VS 2017 config. Initially the default Startup dialog is centered, but then the extension dialog appears in the top left corner.

image

I can move the dialog, but the position is not remembered when closing and restarting VS. It does remember the size of the dialog.

image

When closing the dialog, Visual Studio itself appears and I can move the second dialog that was still in the top left corner. Looks like the extension dialog is opened twice.

image

Please let me know if there's any other information you need to investigate this issue.

jdkoehler commented 5 years ago

I've just installed 2.0.1, didn't have an earlier version installed but imported the VS 2017 config. Initially the default Startup dialog is centered, but then the extension dialog appears in the top left corner. {...remainder deleted...}

I had that same problem. The issue that Visual Studio is opening it's Start window and BSP is also opening it's Start page.

To fix that, start VS, close the BSP Start page (it's the one without the "Continue without code -->" link. Then in the VS Start Window (the one with the "Continue without code -->", click that link. Then in Tools > Options > Environment > Startup: Set "On startup, open:" to "Empty environment" then click "OK". Close and restart Visual Studio and see if that fixes it for you.

SylwesterZarebski commented 5 years ago

I just spot i have similar problem. Window position and height are not saved, only width. After opening start window is shown at the same position with reset height.

stijnherreman commented 5 years ago

Thanks @jdkoehler that fixed the duplicate dialog and odd positioning. The positioning is still not ideal and it isn't remembered, but it's a lot better.

Danielku15 commented 5 years ago

@stijnherreman This information should be enough, I have an idea where the misplacement in your scenario came from. The plugin works currently best if you use the startup type "Empty Environment" as described in the extension readme, this should also solve the issue on the misplacement and duplicate dialog. I will try to improve the situation, but as highlighted earlier in this issue, the extension loading delay makes BSP2019 not so nice to use. It takes quite a bit until you get the options you would expect.

You can follow the progress on the outstanding part in PR #42

In 2.0.1 I changed from a "remember position" approach to a "center in main window" or "center on screen" approach. Remembering the position has a risk of misplacement on multi-screen scenarios.

SylwesterZarebski commented 5 years ago

Centering is not really centered. It is off to right by about 150 px. Try setting width at full screen width, close and reopen VS, and opened start window will be moved right from original centered position.

Danielku15 commented 5 years ago

I just published version 2.0.2 of the extension. What is included:

Looking forward to get your feedback.

SylwesterZarebski commented 5 years ago

Thanks a lot! It looks great.

Maybe some polishing could be done with popup windows - group new/edit or settings to be in line with VS theme - maybe inline edit would be simpler?

SylwesterZarebski commented 5 years ago

PS. Start Window still not really centered and do not save height when closed. I use 'Empty Environment' settings.

Danielku15 commented 5 years ago

Maybe some polishing could be done with popup windows - group new/edit or settings to be in line with VS theme - maybe inline edit would be simpler?

Yes, some polishing can still be done. I still need to do some research on what resource keys Visual Studio is using and if I can actually import them somehow. I removed inline editing exactly because it is not simpler. It brings in quite a complexity, that's why I decided to remove the old inline-editing via "edit mode".

PS. Start Window still not really centered and do not save height when closed. I use 'Empty Environment' settings.

I cannot confirm this in any of my tests on my 3 environments. Also according to the code the centering leaves no doubt in centering:

https://github.com/Danielku15/BetterStartPage/blob/1839d4e6423f91f551b7e0a2e2c696b252184ccf/BetterStartPage.Vs2019/View/QuickStartWindowWrapper.cs#L139-L149

Do you maybe have any special setup? e.g. some High DPI display, portrait mode etc? Also be sure that you do not have any old version of BSP in parallel.

SylwesterZarebski commented 5 years ago

On two my systems with 2.0.2 version it looks like: obraz It is not centered.

Only start window set as 'Start window' is centered. When set as 'Empty environment' it is not.

Also saving height do not work in both settings.

SylwesterZarebski commented 5 years ago

Maybe this is not working?: https://github.com/Danielku15/BetterStartPage/blob/1839d4e6423f91f551b7e0a2e2c696b252184ccf/BetterStartPage.Vs2019/BetterStartPagePackage.cs#L70

                QuickStartWindow.DialogCreated += (s,e) => QuickStartWindow.Instance?.PatchDialog();
                if (QuickStartWindow.Instance == null)
                {
                    showStartWindowCommand?.Invoke();
                }
Danielku15 commented 5 years ago

On two my systems with 2.0.2 version it looks like:

Unless you "censored" all your projects this looks to me like that there is a lot more not working than just the aligning. There are no recent projects, no favourite projects etc.

Maybe this is not working?:

No, if this would not be working the whole extension would not work. You would not see anything of BSP. The PatchDialog is the piece of code that also adds the "Open favourite" area.

Only start window set as 'Start window' is centered. When set as 'Empty environment' it is not. Also saving height do not work in both settings.

We have been that far, this level of details does not help finding out what is going wrong. Unless really some more people report the same behavior I think it might be a problem specific to your environments that I do not have.

Maybe you can clone the repository, switch to the vs2019 branch and give it a shot with debugging the extension. I will also try to add some more logging in the next version that will tell us maybe why the positioning is not working as expected.

SylwesterZarebski commented 5 years ago

Sorry, i've "censored" image ;-). This is working perfectly.

As 'not working' i mean it is not working as expected, eg. in DialogCreated event setting some of properties not behave as it should. I've try to debug extension, but it is "black magic" at this moment, thus it could last long...

Danielku15 commented 5 years ago

@SylwesterZarebski I just published version 2.0.4 to the marketplace. It would be great if you can start your Visual Studio with /Log and provide the activitylog. I hope by the newly added logging information I can find out why the window is not positioning was it should.

SylwesterZarebski commented 5 years ago

Ok, text from log for source BetterStartPage:

description

Ensure GetToCode package is loaded GetToCode package loaded, resolving ShowStartWindow Command Show Start Window command loaded Registering 'Open favourite' command Command registered Registering to Quick Start Window event Quick start window not open, triggering show start window command Begin Patching Quick Start Window Restoring window width 1524 Restoring window height 710 Positioning window based on main window. MainWindow[96,92,1936,1056], QuickStartWindow[1524,710] Quick Start Window positioned to: 302,265 Searching for ProjectMruGrid in Quick Start Window ProjectMruGrid found, reorganizing layout and injecting BetterStartPage Patching done1

VS window is maximized and system taskbar is on top.

SylwesterZarebski commented 5 years ago

I've tested some combinations and i think i got it. It looks like VS coordinates are wrong when maximized - they are not maximised ones, but state from before maximisation.

Danielku15 commented 5 years ago

Okay, I think this will help me making a fix. I was partially able to reproduce a mispositioning on my side. Looks like this is a strange behavior in WPF. The location and size properties might be the ones from an unmaximized state. I will rework the logic to take the window state into account. https://stackoverflow.com/questions/4806088/how-can-i-find-the-position-of-a-maximized-window

Danielku15 commented 5 years ago

@SylwesterZarebski Please update to 2.0.5 and let me know if you still experience the resizing and positioning infos.

SylwesterZarebski commented 5 years ago

Now it looks perfect. There is only height saving problem - it is always 710...

stijnherreman commented 5 years ago

Positioning is fine now with 2.0.5 I lost my config after updating from 2.0.1 to 2.0.5, but simply imported it again from the VS 2017 export and it persists through sessions, so I can't give any debugging info.

Thank you for the work so far, this extension gives a significant productivity boost.

stephane-albus commented 5 years ago

When I change the "Project Display Mode" from Large to something else it works but at the next launch of VS it returns to Large mode.

SylwesterZarebski commented 5 years ago

VS 2019 version 16.2.0 bring saving start page positions/size with maximization support recently, thus i think it could be safely deleted (in extension code) or disabled if this version (and above) is detected. Now there is some minor problems when VS saves maximisation state, but extension bring back old position (from before maximisation), but width is as maximised.

farangkao commented 4 years ago

In General works good for me with 2.0.5, few minor problems: