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

New default package img, textare padding, reserved icon #10029

Merged
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
27 changes: 27 additions & 0 deletions src/Bootstrap/dist/css/bootstrap-theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/Bootstrap/dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/Bootstrap/less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ output {
border-radius: 4px;
border: 1px solid var(--neutralStroke1Rest);
border-bottom: 2px solid var(--neutralStrokeAccessibleRest);
padding: 6px 12px !important;

outline: none !important;
box-shadow: none !important;
Expand Down
5 changes: 5 additions & 0 deletions src/Bootstrap/less/theme/common-list-packages.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.list-packages {
.package-default-icon {
content: var(--default-package-icon, url(../img/default-package-icon-256x256.png));
}

.package {
.break-word;
Expand Down Expand Up @@ -34,11 +37,13 @@
margin-left: 3px;
vertical-align: top;
width: 20px;
color: var(--brandBackground1Rest);
}

.edit-button {
vertical-align: text-bottom;
margin-left: 10px;
display: inline-flex;
}

.package-by {
Expand Down
4 changes: 4 additions & 0 deletions src/Bootstrap/less/theme/common-user-package-list.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
white-space: nowrap;
}
}

.package-default-icon {
content: var(--default-package-icon, url(../img/default-package-icon-256x256.png));
}
}

.table {
Expand Down
6 changes: 6 additions & 0 deletions src/Bootstrap/less/theme/page-display-package.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.page-package-details {
.package-default-icon {
content: var(--default-package-icon, url(../img/default-package-icon-256x256.png));
}

.no-border {
border: 0;
}
Expand Down Expand Up @@ -177,6 +181,8 @@
padding-left: 0;
padding-right: 0;
text-align: right;
display: flex;
justify-content: center;
}
}

Expand Down
10 changes: 10 additions & 0 deletions src/Bootstrap/less/theme/page-list-packages.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@

.sortby {
margin-top: 47px;
display: flex;
gap: 10px;
align-items: center;

label {
white-space: nowrap;
font-weight: 500;
font-size: large;
}
Expand Down Expand Up @@ -296,6 +300,12 @@
.tooltip-target {
position: relative;
text-decoration: none;
color: var(--brandForegroundLinkRest);
cursor: pointer;

&:hover {
color: var(--brandForegroundLinkHover);
}
}

.tooltip-wrapper.popover {
Expand Down
4 changes: 4 additions & 0 deletions src/Bootstrap/less/theme/page-manage-packages.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
}
}

.package-default-icon {
content: var(--default-package-icon, url(../img/default-package-icon-256x256.png));
}

.panel {
margin-top: 5px;
}
Expand Down
2 changes: 2 additions & 0 deletions src/Bootstrap/less/theme/themes.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--circuit-board-background-image: url('../img/circuit-board-light-theme.svg');
--git-background-image: url('../img/git.svg');
--nuget-logo-background-image: url('../img/nuget-lockup-dark-fill.svg');
--default-package-icon: url('../img/default-package-icon.svg');
--body-background-color: linear-gradient(341deg, rgba(250, 250, 250, 0.00) 15.1%, rgba(11, 108, 255, 0.20) 105.92%), var(--neutralBackground2Rest);

/* Brand colors */
Expand Down Expand Up @@ -414,6 +415,7 @@
--circuit-board-background-image: url('../img/circuit-board-dark-theme.svg');
--git-background-image: url('../img/git-white.svg');
--nuget-logo-background-image: url('../img/nuget-lockup-white-fill.svg');
--default-package-icon: url('../img/default-package-icon-white.png');

/* Brand colors */
/* brand tokens have been swapped to use blues from the .NET brand colors */
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery/Content/gallery/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/NuGetGallery/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/NuGetGallery/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,6 @@ The {1} Team</value>
<value>This package is compatible with all versions of {0}.</value>
</data>
<data name="FrameworkFilters_Tooltip" xml:space="preserve">
<value>Filters packages based on the target frameworks they are compatible with. Click here to learn more.</value>
<value>Filters packages based on the target frameworks they are compatible with.</value>
</data>
</root>
7 changes: 3 additions & 4 deletions src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,8 @@
<div class="package-title">
<h1>
<span class="pull-left">
<img class="package-icon img-responsive" aria-hidden="true" alt=""
src="@(PackageHelper.ShouldRenderUrl(Model.IconUrl) && Model.ShowDetailsAndLinks ? Model.IconUrl : Url.Absolute("~/Content/gallery/img/default-package-icon.svg"))"
@ViewHelpers.ImageFallback(Url.Absolute("~/Content/gallery/img/default-package-icon-256x256.png")) />
<img class="package-icon img-responsive @(PackageHelper.ShouldRenderUrl(Model.IconUrl) && Model.ShowDetailsAndLinks ? null : "package-default-icon")" aria-hidden="true" alt=""
src="@(PackageHelper.ShouldRenderUrl(Model.IconUrl) && Model.ShowDetailsAndLinks ? Model.IconUrl : null)" />
</span>
<span class="title">
@Html.BreakWord(Model.Id)
Expand Down Expand Up @@ -974,7 +973,7 @@
else
{
<td tabindex="0" class="package-icon-cell package-warning-icon" aria-label="@packageVersion.PackageWarningIconTitle">
<i class="ms-Icon ms-Icon--Warning package-icon" title="@packageVersion.PackageWarningIconTitle"></i>
<i tabindex="0" class="ms-Icon ms-Icon--Warning package-icon" title="@packageVersion.PackageWarningIconTitle"></i>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tab stop to warning icon in package versions table, this was an accesibility bug

</td>
}
</tr>
Expand Down
31 changes: 15 additions & 16 deletions src/NuGetGallery/Views/Shared/ListPackages.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,24 @@
<legend style="display: flex; gap: 6px;">
<a href="@(Model.FrameworksFilteringInformationLink)" class="frameworkfilters-info"
data-content="@NuGetGallery.Strings.FrameworkFilters_Tooltip"
aria-label="@NuGetGallery.Strings.FrameworkFilters_Tooltip">
aria-label="@NuGetGallery.Strings.FrameworkFilters_Tooltip"
id="frameworksfiltersid">
Frameworks
</a>
<a class="tooltip-target" href="javascript:void(0)">
<span class="tooltip-target" href="javascript:void(0)">
<span>
<i class="framework-filter-info-icon ms-Icon ms-Icon--Info"></i>

<i class="framework-filter-info-icon ms-Icon ms-Icon--Info"></i>
</span>
<span class="tooltip-block" role="tooltip">
<span class="tooltip-block" role="tooltip" aria-labelledby="frameworksfiltersid">
<span class="tooltip-wrapper tooltip-with-icon popover right">
<span class="arrow"></span>
<span class="popover-content">
@NuGetGallery.Strings.FrameworkFilters_Tooltip
<a href="@(Model.FrameworksFilteringInformationLink)">Click here to learn more.</a>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved "Click here to learn more" here so it can be a link, this caused a nested anchor, so I changed it to spans

</span>
</span>
</span>
</a>
</span>
</legend>
@if (Model.IsAdvancedFrameworkFilteringEnabled)
{
Expand All @@ -124,19 +125,19 @@
<input type="hidden" id="includeComputedFrameworks" name="includeComputedFrameworks" value="@Model.IncludeComputedFrameworks.ToString().ToLower()">
</div>
<div class="framework-filter-mode-option">
<p>
<p id="frameworkfiltermodeid">
Framework Filter Mode
<a class="tooltip-target" href="javascript:void(0)">
<span class="tooltip-target" href="javascript:void(0)">
<i class="frameworkfiltermode-info ms-Icon ms-Icon--Info"></i>
<span class="tooltip-block" role="tooltip">
<span class="tooltip-block" role="tooltip" aria-labelledby="frameworkfiltermodeid">
<span class="tooltip-wrapper tooltip-with-icon popover right">
<span class="arrow"></span>
<span class="popover-content">
Decides whether to show packages matching ALL of the selected Target Frameworks (TFMs), or ANY of them.
</span>
</span>
</span>
</a>
</span>
</p>
<div class="toggle-switch-control">
<input type="radio" id="all-selector" name="frameworkFilterMode" value="all" tabindex="0" @(Model.FrameworkFilterMode == "any" ? "" : "checked") />
Expand Down Expand Up @@ -198,7 +199,7 @@
</div>
<div class="@(Model.IsAdvancedSearchFlightEnabled ? "col-md-9" : "col-md-12")" id="results-column">
<div class="row">
<div class="col-md-9">
<div class="col-md-8">
<h1 tabindex="0">
@if (String.IsNullOrWhiteSpace(Model.SearchTerm))
{
Expand Down Expand Up @@ -228,15 +229,13 @@
</div>
@if (Model.IsAdvancedSearchFlightEnabled)
{
<div class="sortby col-md-3">
<div class="row">
<label for="sortby">Sort by</label>
<select name="sortby" id="sortby" form="search-form" aria-label="sort package search results by" class="select-brand">
<div class="sortby col-md-4">
<label for="sortby" class="">Sort by</label>
<select name="sortby" id="sortby" form="search-form" aria-label="sort package search results by" class="form-control select-brand">
<option value="relevance" aria-label="Sort By: Relevance" @(Model.SortBy == "relevance" ? "selected" : "")>Relevance</option>
<option value="totalDownloads-desc" aria-label="Sort By: Downloads" @(Model.SortBy == "totalDownloads-desc" ? "selected" : "")>Downloads</option>
<option value="created-desc" aria-label="Sort By: Recently updated" @(Model.SortBy == "created-desc" ? "selected" : "")>Recently updated</option>
</select>
</div>
</div>
}
else
Expand Down
11 changes: 4 additions & 7 deletions src/NuGetGallery/Views/Shared/_ListPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@

<div class="row">
<div class="col-sm-1 hidden-xs hidden-sm col-package-icon">
<img class="package-icon img-responsive" aria-hidden="true" alt=""
src="@(PackageHelper.ShouldRenderUrl(Model.IconUrl) ? Model.IconUrl : Url.Absolute("~/Content/gallery/img/default-package-icon.svg"))"
@ViewHelpers.ImageFallback(Url.Absolute("~/Content/gallery/img/default-package-icon-256x256.png")) />
<img class="package-icon img-responsive @(!PackageHelper.ShouldRenderUrl(Model.IconUrl) ? "package-default-icon" : null)" aria-hidden="true" alt=""
src="@(PackageHelper.ShouldRenderUrl(Model.IconUrl) ? Model.IconUrl : null)" />
</div>
<div class="col-sm-11">
<div class="package-header">
Expand All @@ -50,10 +49,8 @@

@if (Model.IsVerified.HasValue && Model.IsVerified.Value)
{
<img class="reserved-indicator"
src="~/Content/gallery/img/reserved-indicator.svg"
@ViewHelpers.ImageFallback(Url.Absolute("~/Content/gallery/img/reserved-indicator-20x20.png"))
data-content="@Strings.ReservedNamespace_ReservedIndicatorTooltip" tabindex="0" alt="@Strings.ReservedNamespace_ReservedIndicatorTooltip"/>
<i class="ms-Icon ms-Icon--SkypeCircleCheck reserved-indicator"
data-content="@Strings.ReservedNamespace_ReservedIndicatorTooltip" tabindex="0" alt="@Strings.ReservedNamespace_ReservedIndicatorTooltip"/>
}

@if (showEditButton && (Model.CanEdit || Model.CanManageOwners || Model.CanUnlistOrRelist))
Expand Down
Loading