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

Custom Twig file icons by its content #1485

Open
Haehnchen opened this issue Jun 7, 2020 · 4 comments
Open

Custom Twig file icons by its content #1485

Haehnchen opened this issue Jun 7, 2020 · 4 comments

Comments

@Haehnchen
Copy link
Owner

Provide custom file icon, to indicate Twig templates types by this content:

  • only blocks
  • only macros
  • extends as "page templates"?
  • extends with attached controller?
  • ...

We also now how a template is in used based on the usage index, via embed, include, ... maybe its also suitable hint.

Haehnchen added a commit that referenced this issue Jun 14, 2020
Haehnchen added a commit that referenced this issue Jun 14, 2020
Haehnchen added a commit that referenced this issue Jun 14, 2020
Haehnchen added a commit that referenced this issue Jun 14, 2020
Haehnchen added a commit that referenced this issue Jun 14, 2020
provide custom Twig file overlay to indicate "extends" and attached controller template types #1485
@tomschwiha
Copy link

Is there an option available to disable this behavior?

@keichinger
Copy link

@Haehnchen is there an accessibility option to change colors? I'm red-green color blind and I can't properly distinguish anything that looks remotely as red or green (that includes orange, brown and any hues between).

Can I make a suggestion and maybe use different shapes instead of solely relying on colors? Git Tower had the same problems when they introduced the GPG signing status of a commit and they quickly changed it to colors + shapes after we've filed feedback due to the same reasons.

@Haehnchen
Copy link
Owner Author

@keichinger i was really thinking about this when picking a color, looks like i failed. ;)

All improvements are welcome, feel free to give some suggestions:

  • suitable colors
  • shape style

related icons:
https://github.com/Haehnchen/idea-php-symfony2-plugin/blob/master/src/main/resources/icons/twig_controller_file%402x.png
https://github.com/Haehnchen/idea-php-symfony2-plugin/blob/master/src/main/resources/icons/twig_extends_file%402x.png

@keichinger
Copy link

@Haehnchen no worries, your initial work is great stuff and for most parts, I can already work with it! ☺️
To be honest, it is a hard problem to solve, especially for someone that doesn't have these problems (sorry, if I made a wrong assumption!).

Personally, for me the twig_extends_file icon is totally fine. That gives me a bright and good contrast to the underlying green icon. Other people that have a different color deficiencies might think differently.

The twig_controller_file icon is getting harder to distinguish with Twig's green icon. Making it blue(ish) and/or give it a triangle shape, would help me personally. I'm probably the worst person when it comes to deciding which colors to pick, since colors look different to me than it does to you :( I'm not sure whether it might be best to either provide a preset of different icons for various color deficiencies, and/or make it configurable in PhpStorm itself.

What do you think?

Haehnchen added a commit that referenced this issue Jun 24, 2020
provide checkbox to disable Twig file icon decoration #1485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants