Closed (fixed)
Project:
Upgrade Status
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 May 2019 at 11:24 UTC
Updated:
9 Sep 2019 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gábor hojtsyCan you paste a sample report format you would be looking to have?
Comment #3
mikemadison commentedIdeally it would do something like https://github.com/squizlabs/PHP_CodeSniffer/wiki/Reporting (see below) as opposed to the tabular format that it's currently reporting out in. To be clear, this would be on the report page for the individual module, not necessarily on the overall upgrade status page that shows how many issues there are.
Sidenote, is there a plan to provide a drush interface to the module so that the upgrade status can be run from the terminal? Because ideally it would be the same output in both places!
Comment #4
gábor hojtsyThe module is a UI on top of https://github.com/mglaman/drupal-check, which has this exact output by default you are requesting. If you are interested primarily in a CLI interface and that output, then you probably don't need the module :)
Comment #5
gábor hojtsyThat said if this is superior to the HTML output and we can assume that everyone using the module wants this ASCII limited output for single and full site exports, then we should change our HTML output to be this instead. We can at least do away with our duplicated CSS in the single and full output templates (and even the templates themselves really).
Comment #6
gábor hojtsyChanged title based on suggested change.
Comment #7
webchickThe main reason we went with HTML exports is that there are links in the generated text, and that makes them easy to click directly from the web interface. I don't have any problem with an HTML/ASCII selector, but I think making them only ASCII makes the output less usable, as you now need to select + copy + paste to get the same info.
Comment #8
mikemadison commentedthe links definitely helped in researching the problems, i did like that. i'm not sure if there's a way to do both?
Comment #9
herczogzoltanIf there's a need to add another export format, we can modify the current occurrence of the export to mention the format as well (something like "Export HTML" ?). We can also extend the operations for each project row with an extra link which will do the export in the desirable easy to copy format (something like "Export ASCII" ?) and place an extra button on the project report modal popup with the same title. Also modifications needed in constructing the current report, maybe adding a way to select the formatting mode. For example "formatted" and "plain", but we can think it through to make it a bit more extendable, in case somebody will need another format besides HTML or ASCII.
What do you think about the above? The button titles and changes on the report constructor are just suggestions.
Comment #10
gábor hojtsyIf the links are all we care about for HTML then we can output in a HTML page in
<pre>or<code>and still inline the links as HTML. Then you can copy paste it (loosing the links) or use it as HTML (click links). I am not fond of adding a lot more UI weight for various more output formats if we can get the best of both worlds.I understand the copy-pasting for custom projects (to your own internal issue tracker), but for contrib modules, an issue could very well already exist, you may not be running the latest version, stuff may be fixed in dev, etc. So searching the queue first and figuring out how to engage with the maintainer is better. We do have plans to guide users of this module in that interaction. See #3053948: Guide users on how to best engage with a contrib project maintainer.
Comment #11
gábor hojtsyComment #12
tsega commented@gábor here is what I have so far on the ASCII export option. I feel there are two things left to make this a complete feature;
Comment #13
rpsuThe patch seems to have been done reversibly (wrong direction, thus no diff here). Attached patch fixes that, and adds dynamic export file extension.
Removed
phpstan/phpstanversion downgrade (mistake assumed), and html tags from the ascii export file twig template - seems to be cleaner this way.Comment #15
gábor hojtsyI don't have enough composer fu (or time ATM) to figure out how to make a locally updated composer.json function when composer attempts to update the project either way. So I committed just the dependency update as a start to make it easier to test the rest.
Comment #16
gábor hojtsy@rpsu: you forgot to attach the twig file.
Comment #17
gábor hojtsy- Restored the twig ASCII template.
- Refactored the form integration a bit.
- Added security filtering to the single export format argument.
- Simplified the ASCII output format, more whitespace less lines.
Still definitely needs work in terms of the table structure and how the ASCII itself gets generated, because it has some duplicate code still.
Comment #19
gábor hojtsyRemoved link generation from ASCII tables, I think its distracting.
Fixed test text looking for export button labels, so those should pass again.
Moved to per file tables instead of one table per project, this makes results a LOT more readable, like this:
I tried making tables fixed width but the library did not allow to do so. Although given how much we are doing ourselves now, not sure how much is left for the library to do really. Anyway, keeping that for now.
Comment #21
gábor hojtsyFix the custom/contrib project labels.
Comment #22
gábor hojtsyAdd its own test coverage.
Comment #23
gábor hojtsyComment #25
gábor hojtsyAll right, put this in, thanks both for your help :)