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

Update README with new report format and TOC #109

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

dariuszkuc
Copy link
Member

No description provided.

@dariuszkuc
Copy link
Member Author

Sadly Github formatting of markdown tables is pretty much non-existent....

If we do want to improve the formatting then we can

  • rewrite report generation logic to generate HTML <table> instead of markdown
  • wrap first header in a <div> with some width matching longest lib name
    • it is a hacky solution but does work 🤷

@hwillson
Copy link
Member

Thanks for this @dariuszkuc! I agree with exploring either of those options. 👍

@dariuszkuc
Copy link
Member Author

dariuszkuc commented Jun 18, 2022

wrap first column header in a <div> with some width matching longest lib name

While both VSCode and IntelliJ render the markdown correctly on my local, it looks like Github does not like it :( So guess generating HTML <table> might be the only option.

@dariuszkuc
Copy link
Member Author

Additional context -> above solution using <div> used to work in the past but doesn't work anymore as Github sanitizes CSS in markdown. So in order to force the width, we have to use HTML that has a width property, e.g. empty image <img width="300" /> or specify width in the table columns

Github rendering of markdown tables offers very limited formatting options. When we split up the table into individual language sections, we ended up with tables with varying widths. Due to the CSS scrubing, only options to enforce same width is to use HTML elements with explicit `width` attribute (e.g. `<table>`, `<th>`, etc).

Updated report generation logic to render result table in HTML. Added table of contents to the README to help with navigation.
dariuszkuc added a commit to dariuszkuc/federation that referenced this pull request Jun 23, 2022
@dariuszkuc dariuszkuc merged commit 3322353 into apollographql:main Jun 24, 2022
@dariuszkuc dariuszkuc deleted the report_format branch June 24, 2022 15:00
dariuszkuc added a commit to apollographql/federation that referenced this pull request Jun 24, 2022
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

Successfully merging this pull request may close these issues.

2 participants