mfractor / mfractor-feedback

Found a bug or have a feature request for MFractor? Submit it here!
3 stars 0 forks source link

Go-to Xaml Symbol not working as expected (VSMAC) #260

Closed BenReierson closed 4 years ago

BenReierson commented 4 years ago

Two related issues:

  1. By default, Mfractor's Command+D shortcut is overridden by visual studio's go-to-declaration shortcut.

  2. After deleting the vs shortcut, the mfractor shortcut is not working for me for on xaml bindings. I can right-click and select 'go to xaml symbol' and it works. It shows the keyboard shortcut hint, but it doesn't respond when trying to use it.

Installation Information

--Platform Information--
Operating System: Mac
OS: Unix
OS Service Pack: 
OS Version: Unix 19.5.0.0
--MFractor Information--
Product Name: MFractor
Product Version: 4.2.3.0
Product Variant: Visual Studio Mac
Product Variant Version: 8.6.4.14
Product SKU: MFRACTOR-VS-MAC
Commit SHA: a11efff652d10ff57ccdb73a843411478905c012
Revision: 4468
Branch: master
Date: 9/06/2020 1:56:13 AM (UTC)
Agent: Local
Installed extensions:
    'MFractor (4.2.3)', 'Deployment Services for Linux (8.6.4)', 'ChangeLog Add-in (8.6.4)', 'Unit Testing core support (8.6.4)', 'Performance Diagnostics of IDE (8.6.4)', 'Xamarin.Forms Previewer (16.6.0.329)', 'ConnectedServices (8.6.4)', 'Extension Developer Tools (8.6.4)', 'Android Designer (16.6.0.329)', '.NET Core Support (8.6.4)', 'Xamarin Terminal (8.6.4)', 'Deployment Services Core (8.6.4)', 'VsCode Debug Protocol support for MonoDevelop (8.6.4)', 'Android development (8.6)', 'MonoDevelop Text Editor (8.6.4)', 'DocFood (8.6.4)', 'MonoDevelop Mac Platform Support (8.6.4)', 'Regex Toolkit (8.6.4)', 'Container Tools (1.0.20200415.1)', 'Xamarin Hot Reload (1.0.0.3681761)', 'Xamarin Ide Extensions (8.6.4)', 'Xamarin Ide Extensions for Mac (8.6.4)', 'Makefile generation (8.6.4)', 'XamlLanguageService (16.6.0.329)', 'GDB Debugger Support (8.6.4)', 'MonoDevelop Hex Editor (8.6.4)', 'Gettext Translations Support (8.6.4)', 'MonoDevelop Source Editor (8.6.4)', 'Mono Soft Debugger Support for ASP.NET (8.6.4)', 'iOS Designer (16.6.0.329)', 'Azure DevOps Authentication Support (8.6.4)', 'ASP.NET Core Support (8.6.4)', 'VB.NET Language Binding (8.6.4)', 'XML Editor (8.6.4)', 'Web Editors (8.3)', '.Net Core Debugger (8.6.4)', 'Subversion support (8.6.4)', 'Xamarin Test Cloud (8.6)', 'Xamarin Test Cloud - NUnit (8.6)', 'Razor Language Services (8.0.20200408.02)', 'Visual Studio for Mac Tools for Unity (2.6.1.0)', 'Web Project Support (8.6.4)', 'Azure Functions development (8.6.4)', 'Refactoring Support (8.6.4)', 'CSharp Language Binding (8.6.4)', 'JavaScript and TypeScript (8.3)', 'Git support (8.6.4)', 'Xamarin.Mac development (8.6)', 'MonoDevelop Assembly Browser (8.6.4)', 'GTK# Visual Designer (8.6.4)', 'NuGet Packaging (8.6.4)', 'ILAsm Language Binding (8.6.4)', 'Subversion core engine (8.6.4)', 'Visual Designer Support (8.6.4)', 'Xamarin Addins Core (8.6)', 'Test Runner (8.6.4)', 'Mono Soft Debugger Support (8.6.4)', 'Debugger support for MonoDevelop (8.6.4)', 'F# Language Binding (8.6.4)', 'NUnit support (8.6.4)', 'Version Control Support (8.6.4)', 'Android Deploy (16.6.0.329)', 'Project Web References (8.6.4)', 'Azure Mobile App Service (8.6)', 'MonoDevelop Text Editor (8.6.4)', 'Azure Support (8.6.4)', 'Forms Project Support (8.6)', 'NuGet Package Management (8.6.4)', 'Mac Development (8.6)', 'Xamarin Designer (16.6.0.329)', 'Text Templating (8.6.4)', 'iOS development (8.6)', 'Xamarin Ide Identity (8.6.4)'
matthewrdev commented 4 years ago

@BenReierson This is proving difficult to resolve as I've been unable to override the commanding engine to use our navigation command.

I'd like to propose a work around.

In our 4.3 release we will be adding navigation links into all our tooltips. This is a rough mockup of how this will work:

Screen Shot 2020-07-23 at 10 21 45 am

A navigation link would appear in our tooltips whenever MFractor can perform a navigation. Clicking on this link would perform the equivalent of Command+D.

I feel this is a strong alternative as it surfaces MFractor's navigation capabilities in a way that is easy to discover and use.

Would this be a suitable alternative?

ravero commented 4 years ago

Maybe we could add this as an adornment, like we did with Color that will open the Color Picker. We could add an adornment of a small button with a link icon that would do this navigation when clicked.

matthewrdev commented 4 years ago

I don't think an adornment would be suitable here. Adornments should be used to provide additional contextual information (see color/grid indices/escaped characters) and, as we provide navigation for most/all XAML elements, we risk polluting the editor with navigation adornments.

@BenReierson Do you have any thoughts?

ravero commented 4 years ago

It could also be a code action, so it can be easily accessed from the keyboard only.

matthewrdev commented 4 years ago

@ravero Yep, that is the current issue we are working around. The Visual Studio Mac go-to behaviour is not allowing us to override it with our Go to symbol command (see GoToXamlSymbolCommand).

The Command+D shortcut is bound by us and set to execute before VS Macs, but it is not being honoured.

ravero commented 4 years ago

Having it as a Code Action invoked from ALT + Enter menu wouldn't work?

matthewrdev commented 4 years ago

@BenReierson I've now created "navigation link" tooltips to surface all navigation shortcuts into our tooltips.

Examples:

Screen Shot 2020-07-26 at 9 40 44 am Screen Shot 2020-07-26 at 9 41 05 am Screen Shot 2020-07-26 at 9 41 30 am Screen Shot 2020-07-26 at 2 14 46 pm

This will be available in MFractor 4.3.

matthewrdev commented 4 years ago

Closing as 4.3 introduced navigation links to allow XAML navigation.