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

feat: Provide an explanation to users about what a GTFS Component is #1505 #1512

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public NoticeView(ResolvedNotice<? extends Notice> notice) {
this.notice = notice;
this.json = notice.getContext().toJsonTree().getAsJsonObject();
this.fields = new ArrayList<>(json.keySet());
this.comments = NoticeSchemaGenerator.loadComments(notice.getClass());
this.comments = NoticeSchemaGenerator.loadComments(notice.getContext().getClass());
}

/**
Expand Down
21 changes: 18 additions & 3 deletions main/src/main/resources/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
.summary-cell {
padding: 5px;
box-sizing: border-box;
flex: 1;
}

.summary h4 {
Expand Down Expand Up @@ -129,10 +130,19 @@
position: absolute;
z-index: 1;
bottom: 100%;
left: 50%;
margin-left: -60px;
transform: translateX(-50%);
opacity: 0;
transition: opacity 0.3s;
max-width: 400px;
min-width: 100px;
width: max-content;
white-space: normal;
}

.tooltip {
position: relative;
display: inline-block;
cursor: help;
}

.tooltip:hover .tooltiptext {
Expand Down Expand Up @@ -262,7 +272,12 @@ <h4>Counts</h4>
</ul>
</div>
<div class="summary-cell summary_list">
<h4>GTFS Components included</h4>
<h4>
GTFS Components included
<a href="#" class="tooltip" onclick="event.preventDefault();"><span>(?)</span>
<span class="tooltiptext" style="transform: translateX(-100%)">GTFS components provide a standardized vocabulary to define and describe features that are officially adopted in GTFS.</span>
</a>
</h4>
<hr />
<div>
<span class="spec-feature" th:each="feature: ${metadata.specFeatures}" th:if="${feature.value == 'Yes'}" th:text="${feature.key}" />
Expand Down
Loading