-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
add HTML formatter #258
add HTML formatter #258
Conversation
So much potential in this pull request, we really need |
It makes it a lot easier than doing |
Another idea would be to use mustache, handlebars or any other JS template engine that could be loaded via CDN to get around the composer dependency but still don't render with string concatenation. |
I get why you choose to use twig, however it does add more dependencies. I think I might be fine with adding twig as it is much more needed when we add more advanced styling. Another suggestion would be to use the Json formatter and then parse the Json in JavaScript and handle it that way? |
@olivernybroe that was the idea in my last comment. It would only require a single HTML stub/template and no additional dependencies. |
We already have a lot of other dependencies that limit the user to the newest version and we have a workaround for dependency problems in the docs. I think I'll let @nunomaduro decide this. For me, I'll be okay with it. |
Anything I have to do here? |
@Gummibeer Sorry for the wait. I think you should just add Twig in the With those changes and the travis passing I think it's ready for the merging and then we can always change it later on. |
Ok, will do so. |
@olivernybroe should be fine now. |
@Gummibeer Looks great. Just need the test to pass then. You can run One of the errors, you need to silence in the phpstan file, just like we did with the json formatter. Line 26 in 5d011f0
The other ones are stuff you need to program around 😃 |
@olivernybroe just as an idea/hint: atm its' nearly impossible to find the thing that has to be fixed because of tons of errors (in phpinsights) that are accepted. And it's also not a great feeling that I'm responsible to fix this single issue that made the analyser switch from green to red if there is a list of hundreds of issues that's ok to be there. |
@Gummibeer Hmm, I get you, do you have any solution for it? |
Fix them 🤪😅 |
Some of them should prob. be ignored, some should be fixed :) We have the feature to silence a specific error per file, but we need features for silence based on message and per folder. You are more than welcome to start fixing them! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ready for merging.
@nunomaduro you wanna check it out first?
I don't think so. I think he have done a great job. But on the design we do way better. |
@nunomaduro do you have any example/layout? I can also use CDN tailwind. But I would like to don't include any SASS/JS in the package itself just for a formatter output style!? |
I think we will need to work with a designer on this one. Before we jump on using tailwindcss. Do you have designer skills? |
Nope, I even wouldn't say that I have frontend skills. :D |
…to ft-html-formatter # Conflicts: # docs/get-started.md # phpstan.neon.dist # src/Application/Console/Definitions/AnalyseDefinition.php # src/Application/Console/Formatters/FormatResolver.php
Can you make a tweet asking for a help on the designer in this issue? If you don't want, I can do it. |
Any updates about the issue? |
@dmitryuk Still stuck on the need for a beautiful design for it unfortunately. |
@olivernybroe I will try to help us with a designer, but could you shortly describe what do you want to change in the current implementation? |
@dmitryuk I suck at designing, so not the best at coming with suggestions for this :) |
Cc: @feline-blue > heya Lauren this potential sweet feature needs a little injection of vanilla (no css kit dependency) css design! Whaddaya think? |
Since I've done a lot more TailwindCSS in the past and also some more websites from scratch I could give it another go. But can't provide a design upfront. |
Handling PR #258 to import changes and fix conflicts
Good work! |
Hey, this appears to have been reverted in 5e84dab. Why? :( |
Any comment on why the HTML format was removed? Was there a problem? |
Could anyone please tell me why this option has been removed? dependencies? |
This PR adds the ability to format the output as HTML and redirect it to a file, if wanted.
The result looks like this:
Under the hood Twig is used for templating. If wanted I can change this to be only a composer suggestion and have the user to install it by his own if he wants to use HTML formatter?