Skip to content

Commit

Permalink
feat: Add examples table for mixed_case_recommended_field (#1708)
Browse files Browse the repository at this point in the history
* add table

* fix table to match #1695

* fix java doc error

* update caption styles

* web ui style update + add colons

---------

Co-authored-by: David Gamez Diaz <1192523+davidgamez@users.noreply.github.com>
Co-authored-by: Jingsi Lu <jingsi@mobilitydata.org>
  • Loading branch information
3 people authored Mar 13, 2024
1 parent dc0a9ba commit 4029a37
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,41 @@
* (e.g. “JFK Airport”). Abbreviations may be problematic for accessibility by screen reader
* software and voice user interfaces.
*
* @see org.mobilitydata.gtfsvalidator.annotation.MixedCase
* <table style="table-layout:auto; width:auto;">
* <caption>Good examples:</caption>
* <tr>
* <th><code>Field Text</code></th>
* <th><code>Dataset</code></th>
* </tr>
* <tr>
* <td>"Schwerin, Hauptbahnhof"</td>
* <td><a href="http://vbb.de/vbbgtfs">Verkehrsverbund Berlin-Brandenburg</a></td>
* </tr>
* <tr>
* <td>"Red Hook/Atlantic Basin"</td>
* <td><a href="http://nycferry.connexionz.net/rtt/public/utility/gtfs.aspx">NYC Ferry</a></td>
* </tr>
* <tr>
* <td>"Campo Grande Norte"</td>
* <td><a href="https://gateway.carris.pt/gateway/gtfs/api/v2.8/GTFS">Carris</a></td>
* </tr>
* </table>
*
* <table style="table-layout:auto; width:auto;">
* <caption>Bad examples:</caption>
* <tr>
* <th><code>Field Text</code></th>
* </tr>
* <tr>
* <td>"GALLERIA MALL"</td>
* </tr>
* <tr>
* <td>"3427 GG 17"</td>
* </tr>
* <tr>
* <td>"21 Clark Rd Est"</td>
* </tr>
* </table>
*/
@GtfsValidationNotice(
severity = WARNING,
Expand Down
5 changes: 5 additions & 0 deletions main/src/main/resources/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
width: 100%;
}

table caption {
text-align: left;
margin: 0.5em 0;
}

table th {
text-align: left;
border-bottom: 2px solid #000;
Expand Down
5 changes: 4 additions & 1 deletion web/client/src/css/components/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@

table {
@apply my-2;
caption {
@apply text-left;
}
}

th, td {
th, td, {
@apply align-baseline;
@apply px-4 py-3;
@apply text-left;
Expand Down

0 comments on commit 4029a37

Please sign in to comment.