EditorGuidelines icon indicating copy to clipboard operation
EditorGuidelines copied to clipboard

Bring back "Guideline Color..." on the context menu

Open pharring opened this issue 5 years ago • 5 comments

Feedback from the Marketplace:

Changing the guideline color is indeed possible, even if slightly more hidden than in the Power Tools version (I wonder if the rightclick option to pick a color should be ported to make this more discoverable).

I believe I know how to make "Guideline Color..." navigate to the "Fonts and Colors" page, the trouble is I can't make it scroll to the "Guideline" setting. That would require some tricky/fragile automation.

pharring avatar Jun 13 '19 23:06 pharring

I thought it would not be possible easily; maybe show a message banner that the setting is found in Fonts & Colors (and then show a link to open that dialog)?

RayKoopa avatar Jun 13 '19 23:06 RayKoopa

Yes, we could use an InfoBar for this. Possibly in addition to navigating to Fonts&Colors for you (presumably we have to show the infobar asynchronously before bringing up the modal dialog).

Implementation notes to self:

SVsInfoBarUIFactory/IVsInfoBarUIFactory __VSSPROPID7.VSSPROPID_MainWindowInfoBarHost MPF has low-level helper classes: InfobarModel, InfobarHyperlink (I wish there was a simple MessageBox-like API for this)

pharring avatar Jun 14 '19 00:06 pharring

💭 That doesn't seem like a good use of the gold bar (IVsInfoBarUIFactory). It's more often used for notifying users about errors that occur.

sharwell avatar Dec 16 '19 15:12 sharwell

Thanks, @sharwell I found https://docs.microsoft.com/visualstudio/extensibility/ux-guidelines/notifications-and-progress-for-visual-studio#appropriate-uses-for-an-infobar which says

"Don't ... Use an infobar in place of a modal dialog."

If showing a modal dialog is preferable, then we can show a message box that says "Select 'Guideline' from the list in the next dialog. [OK][Cancel]" and, when you click 'OK', it navigates to the Fonts&Colors page.

I can imagine that being a bit clunky, but is that what we want?

pharring avatar Dec 16 '19 17:12 pharring

@pharring I think this feature request is more about having different colors for each guideline. This is e.g. useful if you work on multiple projects with different maximum line length standards.

flobernd avatar Jul 14 '22 09:07 flobernd