Skip to content

Commit 4029a37

Browse files
emmambddavidgamezqcdyx
authored
feat: Add examples table for mixed_case_recommended_field (#1708)
* 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 <[email protected]> Co-authored-by: Jingsi Lu <[email protected]>
1 parent dc0a9ba commit 4029a37

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

core/src/main/java/org/mobilitydata/gtfsvalidator/notice/MixedCaseRecommendedFieldNotice.java

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,41 @@
1515
* (e.g. “JFK Airport”). Abbreviations may be problematic for accessibility by screen reader
1616
* software and voice user interfaces.
1717
*
18-
* @see org.mobilitydata.gtfsvalidator.annotation.MixedCase
18+
* <table style="table-layout:auto; width:auto;">
19+
* <caption>Good examples:</caption>
20+
* <tr>
21+
* <th><code>Field Text</code></th>
22+
* <th><code>Dataset</code></th>
23+
* </tr>
24+
* <tr>
25+
* <td>"Schwerin, Hauptbahnhof"</td>
26+
* <td><a href="http://vbb.de/vbbgtfs">Verkehrsverbund Berlin-Brandenburg</a></td>
27+
* </tr>
28+
* <tr>
29+
* <td>"Red Hook/Atlantic Basin"</td>
30+
* <td><a href="http://nycferry.connexionz.net/rtt/public/utility/gtfs.aspx">NYC Ferry</a></td>
31+
* </tr>
32+
* <tr>
33+
* <td>"Campo Grande Norte"</td>
34+
* <td><a href="https://gateway.carris.pt/gateway/gtfs/api/v2.8/GTFS">Carris</a></td>
35+
* </tr>
36+
* </table>
37+
*
38+
* <table style="table-layout:auto; width:auto;">
39+
* <caption>Bad examples:</caption>
40+
* <tr>
41+
* <th><code>Field Text</code></th>
42+
* </tr>
43+
* <tr>
44+
* <td>"GALLERIA MALL"</td>
45+
* </tr>
46+
* <tr>
47+
* <td>"3427 GG 17"</td>
48+
* </tr>
49+
* <tr>
50+
* <td>"21 Clark Rd Est"</td>
51+
* </tr>
52+
* </table>
1953
*/
2054
@GtfsValidationNotice(
2155
severity = WARNING,

main/src/main/resources/report.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@
4343
width: 100%;
4444
}
4545

46+
table caption {
47+
text-align: left;
48+
margin: 0.5em 0;
49+
}
50+
4651
table th {
4752
text-align: left;
4853
border-bottom: 2px solid #000;

web/client/src/css/components/markdown.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,12 @@
6363

6464
table {
6565
@apply my-2;
66+
caption {
67+
@apply text-left;
68+
}
6669
}
6770

68-
th, td {
71+
th, td, {
6972
@apply align-baseline;
7073
@apply px-4 py-3;
7174
@apply text-left;

0 commit comments

Comments
 (0)