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

fix #1125 Friendly configuration for icons #1247

Merged
merged 3 commits into from
Mar 20, 2018
Merged

fix #1125 Friendly configuration for icons #1247

merged 3 commits into from
Mar 20, 2018

Conversation

braver
Copy link
Member

@braver braver commented Mar 19, 2018

  • make it less easy to make little mistakes
  • make third party gutter themes easier to use

Fixes #1125

@braver braver requested a review from kaste March 19, 2018 20:55
@kaste kaste removed their request for review March 20, 2018 09:38
@kaste
Copy link
Contributor

kaste commented Mar 20, 2018

Requesting @Monokai for review bc the python code itself is simple but I don't have any themes to do a functional test.

@Monokai
Copy link

Monokai commented Mar 20, 2018

@kaste Already commented here: #1125 (comment)

@kaste
Copy link
Contributor

kaste commented Mar 20, 2018

Okay, thanks. Explicit is the base implementation, anything more convenient (automatic) must go on top of that. I like the failing icon we have right now.

So, what the code does.

User sets theme: a/b/c.gutter-theme, icon to 'warning' => resolved icon 'a/b/warning.png'
User sets theme: a/nothere/c.gutter-theme icon to 'warning' => resolved icon 'FAIL'
User sets theme: a/b/c.grutterteme, resolved icon 'FAIL'

So, a more convenient experience can be e.g. theme: c -> searches for c.gutter-theme or FAIL

@braver
Copy link
Member Author

braver commented Mar 20, 2018

So, a more convenient experience can be e.g. theme: c -> searches for c.gutter-theme

We provide that experience for our built-in themes. You set it to 'Danish Royalty' and we understand that to mean 'Packages/SublimeLinter/gutter-themes/Danish Royalty/Danish Royalty.gutter-theme'.

We could use find_resources instead (and that's basically what @Monokai proposes too) and let Sublime Text figure out where Danish Royalty.gutter-theme hangs out. However, that means that if <Some Package Earlier In The Alphabet Than SublimeLinter> has a Danish Royalty.gutter-theme it will try to use that and maybe fail because who knows what that is. Now, this is perhaps unlikely, but we get enough people asking us to debug their computer for them and debugging style things is about the least exciting thing I can think of.

We could also first try to see if 'Danish Royalty' is a theme we know, and if not then look for it using find_resources. However, as I noted in my reaction in #1125, how do you know to put 'Danish Royalty' in that setting in the first place? You probably copied that from somewhere. Why do we have to go looking for it if you (or the provider of said gutter theme) knows exactly where it is?

@kaste
Copy link
Contributor

kaste commented Mar 20, 2018

I just don't see that we need more than this. 🚢

@braver
Copy link
Member Author

braver commented Mar 20, 2018

I just don't see that we need more than this.

Same. 🤘

@braver braver merged commit ee2fb19 into master Mar 20, 2018
@braver braver deleted the friendly-icons branch May 14, 2018 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants