pharring / EditorGuidelines

A Visual Studio extension that adds vertical column guides to the text editor
MIT License
115 stars 17 forks source link

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

Open pharring opened 5 years ago

pharring commented 5 years ago

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.

RayKoopa commented 5 years ago

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)?

pharring commented 5 years ago

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)

sharwell commented 4 years ago

💭 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.

pharring commented 4 years ago

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?

flobernd commented 2 years ago

@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.