-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign (broken navigation, ugly tables).
- Loading branch information
Showing
22 changed files
with
3,446 additions
and
10,751 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace FeatureTests.Runner.Outputs.Html { | ||
public class NavigationLinkModel { | ||
public NavigationLinkModel(string url, string name) { | ||
this.Url = url; | ||
this.Name = name; | ||
this.Children = new List<NavigationLinkModel>(); | ||
} | ||
|
||
public string Url { get; set; } | ||
public string Name { get; set; } | ||
public bool IsTopLevelLinkToCurrentPage { get; set; } | ||
public IReadOnlyList<NavigationLinkModel> Children { get; private set; } | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
#framework/Runner/Outputs/Html/Templates/FeatureTests.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
@using System.Linq | ||
@using FeatureTests.Runner.Sources | ||
@inherits FeatureTests.Runner.Outputs.Html.HtmlTemplateBase<FeatureTests.Runner.Outputs.Html.HtmlResultModel> | ||
|
||
<!DOCTYPE html> | ||
@* Metanote: Ignore the following note in Razor template, it is only relevant to the result. *@ | ||
<!-- Note: This file has been generated by TableGenerator and should not be edited manually. --> | ||
<html> | ||
<head> | ||
<title>@Model.Labels.Title</title> | ||
<link rel='stylesheet' href='css/main.css' /> | ||
|
||
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script> | ||
<script type="text/javascript" src="js/jquery.toc.js"></script> | ||
</head> | ||
<body> | ||
<nav class="main-nav"> | ||
<ul> | ||
@foreach (var link in Model.NavigationLinks) { | ||
<li class="@(link.IsTopLevelLinkToCurrentPage ? "current" : null)"><a href="@link.Url">@link.Name</a></li> | ||
} | ||
</ul> | ||
|
||
<!--ul class="toc"></ul--> | ||
</nav> | ||
|
||
<main class="content"> | ||
<h1>@Model.Labels.Title</h1> | ||
|
||
<!-- TODO: move this to a separate (navigable) file --> | ||
<section> | ||
<h2 id="GeneralInformation">General information</h2> | ||
<div class="section-description"> | ||
<p>The goal of this project is to monitor support for important features across multiple libraries.</p> | ||
<p>You can find the code behind these tables in <a href="https://github.com/ashmind/net-feature-tests">net-feature-tests GitHub project</a>.</p> | ||
|
||
<p>Please note the following:</p> | ||
<ol> | ||
<li>The list of features is based on what I consider to be important. It is not an objective measure on which library is "better".</li> | ||
<li>It is not possible to test for all features automatically. For example, extensibility is very important, but impossible to test/measure.</li> | ||
<li>The test results might not necessary be up to date (see the version for each library).</li> | ||
<li>The test code should not be seen as best practice for each library — it forces all of them to the same test interface.</li> | ||
<li>I am not an expert on all libraries and not all adapters were reviewed by authors. So feature may fail because of incorrect adapter.</li> | ||
</ol> | ||
|
||
<p>Thanks for reading!</p> | ||
</div> | ||
</section> | ||
<!-- End of TODO --> | ||
|
||
@foreach (var table in Model.Tables) { | ||
var tableDisplayName = ((table.Key == MetadataKeys.GeneralInfoTable) ? ((string)Model.Labels.GeneralInfo) : null) ?? @table.DisplayName; | ||
var tableLinkName = GenerateAnchor(tableDisplayName); | ||
|
||
<section> | ||
<h2 id="@tableLinkName">@tableDisplayName</h2> | ||
<div class="section-description">@FormatDescription(table.Description)</div> | ||
|
||
@{ var featuresWithDescription = table.Features.Where(f => !string.IsNullOrEmpty(f.Description)).ToArray(); } | ||
@if (featuresWithDescription.Any()) { | ||
<dl class="feature-descriptions"> | ||
@foreach (var feature in featuresWithDescription) { | ||
<dt>@feature.Name</dt> | ||
<dd>@FormatDescription(feature.Description)</dd> | ||
} | ||
</dl> | ||
} | ||
|
||
<table> | ||
<tr> | ||
<th>Name</th> | ||
@foreach (var library in table.Libraries) { | ||
<th title="@library.Name">@library.Name</th> | ||
} | ||
</tr> | ||
|
||
@{ var comments = table.GetFeatureRows().SelectMany(r => r.Item2) | ||
.Where(c => c.HasComment) | ||
.Select(c => c.Comment) | ||
.GroupBy(c => c) | ||
.Select((g, index) => new { comment = g.Key, index = index + 1 }) | ||
.ToList(); } | ||
|
||
@foreach (var row in table.GetFeatureRows()) { | ||
<tr> | ||
<td class="row-name">@row.Item1.Name</td> | ||
@foreach (var cell in row.Item2) { | ||
<td class="@GetCssClassesForCell(cell)"> | ||
@if (cell.HasComment) { | ||
var index = @comments.Single(x => x.comment == @cell.Comment).index; | ||
<a class="local" href="#@tableLinkName-note-@index">@FormatDisplayValue(cell.DisplayValue)<sup>@index</sup></a> | ||
} | ||
else if (cell.DisplayUri != null) { | ||
<a href="@cell.DisplayUri">@FormatDisplayValue(cell.DisplayValue)</a> | ||
} | ||
else { | ||
@FormatDisplayValue(cell.DisplayValue) | ||
} | ||
</td> | ||
} | ||
</tr> | ||
} | ||
</table> | ||
|
||
<ol class="comments"> | ||
@foreach (var x in comments) { | ||
<li id="@tableLinkName-note-@x.index">@FormatDescription(x.comment)</li> | ||
} | ||
</ol> | ||
</section> | ||
} | ||
|
||
@RawHtml(Model.HtmlAfterAll) | ||
</main> | ||
</body> | ||
</html> |
File renamed without changes.
Oops, something went wrong.