-
Notifications
You must be signed in to change notification settings - Fork 644
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
[Prefix]Add visual indicator for Reserved prefix Packages #4601
Conversation
@@ -12,6 +12,14 @@ | |||
<div class="package-header"> | |||
<a class="package-title" href="@Url.Package(Model.Id, Model.UseVersion ? Model.Version : null)">@Html.BreakWord(Model.Id)</a> | |||
|
|||
@if (Model.IsVerified.HasValue && Model.IsVerified.Value) | |||
{ | |||
<img style="vertical-align: top; margin-left: 3px; margin-top: 3px; width: 20px" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style [](start = 25, length = 5)
Move this to CSS
{ | ||
<img style="vertical-align: top; margin-left: 3px; margin-top: 3px; width: 20px" | ||
src="~/Content/gallery/img/reserved-indicator.svg" | ||
@ViewHelpers.ImageFallback(Url.Absolute("~/Content/gallery/img/reserved-indicator-20x20.png")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ViewHelpers [](start = 26, length = 11)
The fallback seems unnecessary as the reserved-indicator.svg
is static content. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fallback is for browsers that don't render svg, some older IE versions etc. This is common through out our codebase.
<img style="vertical-align: top; margin-left: 3px; margin-top: 3px; width: 20px" | ||
src="~/Content/gallery/img/reserved-indicator.svg" | ||
@ViewHelpers.ImageFallback(Url.Absolute("~/Content/gallery/img/reserved-indicator-20x20.png")) | ||
title="@Strings.ReservedNamespace_ReservedIndicatorTooltip"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReservedNamespace_ReservedIndicatorTooltip [](start = 41, length = 42)
I don't think we use Strings anywhere else in views. Maybe use just a plain C# string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using the strings is most appropriate. This needs to be reused in another place as well.
Fixes: #4383 #4384 #4378
Also, updated
LuceneSearchService
to indexIsVerified
for local testing of reserved namespaces in gallery.Screenshots:
Details page:
Search Page:
Profile Page: