Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Misc tweaks for your review #467

Closed
wants to merge 4 commits into from

4 participants

@SaqibS

My first contribution to the project - found a couple of features in the issue list which I've wanted myself. Both are view-only changes, and so there are no unit tests (don't know if you want to use Watin, etc?). Some further CSS work may be needed to style the social buttons. Feedback appreciated.

  1. Put package name in title of package (issue #353)
  2. Put social like and share buttons on the package page (issue #446)
@pranavkm pranavkm commented on the diff
Website/Views/Packages/DisplayPackage.cshtml
@@ -208,4 +216,8 @@
}
</tbody>
</table>
+
+ <div id="socialShare">
+ @LinkShare.GetHtml(pageTitle: Model.Title, linkSites: new LinkShareSite[] { LinkShareSite.Facebook, LinkShareSite.Twitter, LinkShareSite.Delicious })
@pranavkm Collaborator

Good grief. People actually use this :)

Do these work? I've never actually used these helpers. Twitter and Facebook seem good, but does anyone use Delocious anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@half-ogre

Any reason you only added search and main landmark roles? We could probably also add navigation, but I don't feel strongly about it.

@half-ogre

@SaqibS Can you include a screen capture of what the social buttons look like on the package page? When changing UI, it's always helpful to include images if your changes, so reviewers don't have to pull until for the initial review. I typically use imgur for throw-away screen captures like this.

If including a capture is a problem, I can go ahead and pull to check out the changes.

Aside from that, these changes look good. Thanks for contributing, and after we look at the UI changes, we can pull it in.

@half-ogre

I pulled the changes to the see the UI changes. Here's what it looks like:

social UI changes to package page

On the top sectio, the spacing is all off. On the bottom, the Delicious link's image isn't loading.

In general, I think I'd like a smaller, simple button for the social buttons in just one place on the page. Having it on the version section seems like to much. Could we just put them on the page once, at the top of the page, and use the smaller buttons like were being used at the bottom?

@half-ogre

@SaqibS Would you like to look into the feedback? If not, I can just pull in the parts we're comfortable with now, and you could submit the other changes later.

@Haacked

Ok, I created a new PR that cherry picks the changes we want. #545

@Haacked Haacked closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  Website/Content/Site.css
@@ -82,7 +82,7 @@ nav, section { display: block; }
-#content-wraper {
+#content-wrapper {
width: 960px;
min-width: 960px;
margin: 0 auto;
View
2  Website/Errors/Error.html
@@ -9,7 +9,7 @@
<script src="../Scripts/modernizr-2.0.6-development-only.js"></script>
</head>
<body>
- <div id="content-wraper">
+ <div id="content-wrapper">
<header class="main">
<div id="logo"><a href="../">NuGet Gallery</a></div>
</header>
View
2  Website/Errors/ErrorLayout.cshtml
@@ -11,7 +11,7 @@
<script src="@Href("~/Scripts/modernizr-2.0.6-development-only.js")"></script>
</head>
<body>
- <div id="content-wraper">
+ <div id="content-wrapper">
<header class="main">
<div id="logo"><a href="@Href("~/")">NuGet Gallery</a></div>
</header>
View
3  Website/Views/Authentication/LogOn.cshtml
@@ -1,5 +1,8 @@
@using NuGetGallery;
@model SignInRequest
+@{
+ ViewBag.Title = "Log On";
+}
<h1>Log On</h1>
View
12 Website/Views/Packages/DisplayPackage.cshtml
@@ -1,5 +1,7 @@
@model DisplayPackageViewModel
+ @using Microsoft.Web.Helpers
@{
+ ViewBag.Title = Model.Title;
ViewBag.Tab = "Packages";
Layout = "~/Views/Shared/TwoColumnLayout.cshtml";
}
@@ -66,6 +68,12 @@
<h1>@Model.Title</h1>
<h2>@Model.Version</h2>
</hgroup>
+
+ <div id="socialButtons">
+ @Facebook.LikeButton(href: Request.Url.ToString())
+ @Twitter.TweetButton(url: Request.Url.ToString())
+ </div>
+
<p>@Model.Description</p>
@if (!Model.Listed && Model.IsOwner(User))
@@ -208,4 +216,8 @@
}
</tbody>
</table>
+
+ <div id="socialShare">
+ @LinkShare.GetHtml(pageTitle: Model.Title, linkSites: new LinkShareSite[] { LinkShareSite.Facebook, LinkShareSite.Twitter, LinkShareSite.Delicious })
@pranavkm Collaborator

Good grief. People actually use this :)

Do these work? I've never actually used these helpers. Twitter and Facebook seem good, but does anyone use Delocious anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ </div>
</div>
View
1  Website/Views/Packages/ListPackages.cshtml
@@ -1,5 +1,6 @@
@model PackageListViewModel
@{
+ ViewBag.Title = string.IsNullOrWhiteSpace(Model.SearchTerm) ? "Packages" : "Packages matching " + Model.SearchTerm;
ViewBag.Tab = "Packages";
}
View
1  Website/Views/Pages/Home.cshtml
@@ -1,4 +1,5 @@
@{
+ ViewBag.Title = "Home";
ViewBag.Tab = "Home";
}
<section class="featured">
View
5 Website/Views/Pages/Privacy.cshtml
@@ -1,4 +1,7 @@
-<article class="policies privacy">
+@{
+ ViewBag.Title = "Privacy Policy";
+}
+<article class="policies privacy">
<h2>
PRIVACY POLICY</h2>
<h2>
View
5 Website/Views/Pages/Terms.cshtml
@@ -1,4 +1,7 @@
-<article class="policies">
+@{
+ ViewBag.Title = "Terms and Conditions";
+}
+<article class="policies">
<h2>TERMS &amp; CONDITIONS</h2>
<h3>Terms of Use</h3>
<p class="content">
View
8 Website/Views/Shared/Layout.cshtml
@@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <title>NuGet Gallery</title>
+ <title>NuGet Gallery @(string.IsNullOrWhiteSpace(ViewBag.Title) ? "" : "| " + ViewBag.Title)</title>
<link href="@Url.Content("~/Content/site.css")" rel="stylesheet" />
<link href="@Url.Content("~/favicon.ico")" rel="shortcut icon" type="image/x-icon" />
<script src="@Url.Content("~/Scripts/modernizr-2.0.6-development-only.js")"></script>
@@ -15,7 +15,7 @@
@RenderSection("TopScripts", required: false)
</head>
<body>
- <div id="content-wraper">
+ <div id="content-wrapper">
<header class="main">
<div id="logo"><a href="@Url.Home()">NuGet Gallery</a></div>
@Html.Partial(MVC.Shared.Views.UserDisplay)
@@ -33,14 +33,14 @@
<li><a href="http://docs.nuget.org">Documentation</a></li>
<li><a href="http://blog.nuget.org">Blog</a></li>
</ul>
- <div id="searchBox">
+ <div id="searchBox" role="search">
<form action="@Url.PackageList()" method="get">
<input name="q" id="searchBoxInput" placeholder="Search Packages" value="@(String.IsNullOrEmpty(ViewBag.SearchTerm) ? "" : ViewBag.SearchTerm)" />
<input id="searchBoxSubmit" type="submit" value=" " />
</form>
</div>
</nav>
- <div id="body">
+ <div id="body" role="main">
@if (TempData.ContainsKey("Message")) {
<p class="message">@TempData["Message"]</p>
}
View
2  Website/Views/Shared/TwoColumnLayout.cshtml
@@ -6,7 +6,7 @@
<div id="sideColumn">
@RenderSection("SideColumn")
</div>
-<div id="mainColumn">
+<div id="mainColumn" role="main">
@RenderBody()
</div>
View
2  Website/_app_offline.htm
@@ -56,7 +56,7 @@
</style>
</head>
<body>
- <div id="content-wraper">
+ <div id="content-wrapper">
<header>
<div id="logo">NuGet Gallery</div>
</header>
Something went wrong with that request. Please try again.