Skip to content

Commit 0072c55

Browse files
committed
Ensure the version history can fit the widest date format
The version history dropbox is generally the right size. There are some cases, however, where the data wraps to a new line, which makes the versions harder to read, and looks unprofessional. E.g., `2020-12-31 12:00:00 AM`. This is especially an issue because a recent update to the database allows compressing all versions between a range; in that case, they will default to `12:00:00 AM`—and, if done for the entire year, `12-31` of that year. That almost always forces the wrapping. This fixes that issue, while also cleaning up the styles a bit, as there were some unnecessary styles declared inline in the `_Toolbar.cshtml` template.
1 parent 780e7ed commit 0072c55

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

OnTopic.Editor.AspNetCore/Areas/Editor/Views/Shared/_Toolbar.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Versions
1818
<span class="caret"></span>
1919
</button>
20-
<ul class="dropdown-menu" role="menu" aria-labelledby="VersionsButton" style="left: 3px; top: 98%;">
20+
<ul class="dropdown-menu" role="menu" aria-labelledby="VersionsButton">
2121
@foreach (DateTime version in Model.Topic.VersionHistory) {
2222
<li role="presentation" class="small">
2323
<a tabindex="-1" role="menuitem" href="@Url.Action("SetVersion", "Editor", new { path=Model.Topic.WebPath, version=version.ToString("MM/dd/yyyy hh:mm:ss.fff tt"), isModal=Model.IsModal })">@version.ToString()</a>

OnTopic.Editor.AspNetCore/Shared/Styles/Layout/_layout.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ body {
7878
//----------------------------------------------------------------------------------------------
7979
.dropdown-menu {
8080
padding : 10px;
81+
min-width : 180px;
8182
li a {
8283
line-height : 1.4rem;
8384
}

0 commit comments

Comments
 (0)