-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Unify the drawing of badges #2220
Conversation
bdovaz
commented
Jan 4, 2023
- Badges now are generated in all places where the linter is mentioned (descriptor, individual descriptor and flavor)
- Unify the generation of badges in a single function: get_badges(linter)
- Add deprecated linter badge to get_badges(linter)
- Add missing linter_repo fields: In the get_repository_badge_url(linter) method it takes into account and tries to search in the linter_url field if the linter_repo field does not exist but as it is not a unified logic everywhere, I have added the fields in the missing linters
- Badges are generated in all places where the linter is mentioned (descriptor, individual descriptor and flavor) - Unify the generation of badges in a single function - Add deprecated linter badge
That seems to be a nice refactoring PR :) But I (may) remember that for some doc pages, having less badges was on purpose to avoid ugly displays in tables Please can you try locally with pip install --upgrade "markdown==3.3.7" mike mkdocs-material mdx_truly_sane_lists jsonschema json-schema-for-humans giturlparse webpreview github-dependents-info
mkdocs serve |
Codecov Report
@@ Coverage Diff @@
## main #2220 +/- ##
==========================================
+ Coverage 82.48% 82.50% +0.02%
==========================================
Files 170 170
Lines 4470 4470
==========================================
+ Hits 3687 3688 +1
+ Misses 783 782 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Doing what you say, the only thing I see that looks bad is the last commit because the text is so long that it looks very small: We can override the "last commit" text and leave it blank: We can do this only for the cases where we know it looks bad or for all cases or directly remove this badge on certain pages but I like less the solution. The link in that image takes you to https://github.com/{user}/{repo}/commits so it is understood when doing over what it is. I would like the <img /> tag to have an option to add the title attribute but the shields.io website doesn't allow it: https://shields.io/category/activity What do you think @nvuillam? |
The last commit is not so relevant... especially not in first position ... maybe just remove it ? |
@nvuillam do you think so? The color of that particular badge gives at a glance the health of that linter in terms of maintenance. It is not feasible to periodically monitor the status of each linter one by one. The information on that badge tells you things like if it is time to mark a linter as deprecated. To appear on pages like this: https://megalinter.io/latest/supported-linters/ allows at a glance to visualize the health status of each linter in a very simple way. If it is true that the fact that it appears first of all is not logical. What do we do then?
I opt for the first one but well, I am open to other opinions. |
I'm more team solution 2, because on the linter doc page it's great to have lots of badges (we could even add more !), but in tables we need a restricted one (deprecated if applicable, stars, formatter if applicable, autofix if applicable, SARIF if applicable) For linter doc page, we could have: |
While you're at it, if you can remove the column configuration key from https://megalinter.io/latest/supported-linters/ , it will make a better display ^^ |
@nvuillam I'm trying to do that but when I remove the "Configuration key" column from each page of a flavor, I get all the rows in the table disappearing. I think it has to do with |
If you remove from the table header + the element in the libe it should be ok :) But don't worry I can do that in a PR after yours:) |
- Remove Configuration Key column - Render configuration key value with linter name - Render individual linter badges on a new line - Unify all badges in one function - Allow to hide some badges on certain pages
…inter into feature/more-badges
@nvuillam I think that with this commit you would have everything you asked for, except for the flavors and |
@bdovaz sorry I validated the dotnet v6 PR, lots of conflicts ^^ |
@nvuillam conflicts resolved! |
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.
Great PR R by a great contrbutor, again :)
@nvuillam the problem of flavors tables being empty is still a problem, did you finally look at it? Example: |
woooo didn't see this one :o |
@bdovaz found it :) |