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

[Prefix]Add visual indicator for Reserved prefix Packages #4601

Merged
merged 7 commits into from
Aug 31, 2017

Conversation

shishirx34
Copy link
Contributor

Fixes: #4383 #4384 #4378
Also, updated LuceneSearchService to index IsVerified for local testing of reserved namespaces in gallery.

Screenshots:
Details page:
image

Search Page:
image

Profile Page:
image

@@ -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"
Copy link
Contributor

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"))
Copy link
Contributor

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?

Copy link
Contributor Author

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"/>
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@shishirx34 shishirx34 merged commit fd9d321 into dev Aug 31, 2017
@shishirx34 shishirx34 mentioned this pull request Aug 31, 2017
22 tasks
@shishirx34 shishirx34 deleted the prefix-package-details branch September 1, 2017 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants