-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Refactor link target inputs to dropdowns #17536
Conversation
Replaced `<input>` elements with `<select>` dropdowns for the "Target" and "DefaultTarget" fields in multiple Razor view files. This change allows users to choose from predefined options (`_self`, `_blank`, `_parent`, `_top`) instead of manual input. Removed unnecessary `<datalist>` elements as part of this update.
Thank you for submitting your first pull request, awesome! 🚀 If you haven't already, please take a moment to review our contribution guide. This guide provides helpful information to ensure your contribution aligns with our standards. A core team member will review your pull request. |
@dotnet-policy-service agree |
Please accept the CLA |
@@ -66,13 +66,12 @@ | |||
<div class="mb-3"> | |||
<div class="w-md-75 w-xl-50"> | |||
<label asp-for="Stereotype">@T["Stereotype"]</label> | |||
<input asp-for="Stereotype" list="stereotypeOptions" type="text" class="form-control"> | |||
<datalist id="stereotypeOptions"> | |||
<select asp-for="Stereotype" id="stereotypeOptions" class="form-select"> |
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.
Please revert this change because stereotypes could be editable
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 reverted what you asked for, but it still looks like it has been edited because it messed up the spacing.
But just I was thinking should the stereotypes be editable though? What are your thoughts @Piedone?
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 might be wrong here, so I will wait for @MikeAlhayek
I think that the idea is that these options are only suggestions. They are not mandatory for these fields, this is why it is a datalist. Is there a reason to make them use asp-for over the design intent that seems to have been used? The stereotype should be suggested values. The HtmlMenuItemPart too |
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 do not approve this PR. These value should stay non required.
The target values should be list to avoid inappropriate user data |
Ok then, approved but not for Stereotype. |
Select menu was done here by design. This way if a user wants to specify a custom value they can Checkout the conversation here #15636 (comment) |
Totally agree, I already wrote a comment about stereotypes |
Yeah, but for a https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target |
Ok nevermind it seems valid to use something like |
disaprove as we can use custom values for all of these fields
Replaced
<input>
elements with<select>
dropdowns for the "Target" and "DefaultTarget" fields in multiple Razor view files. This change allows users to choose from predefined options (_self
,_blank
,_parent
,_top
) instead of manual input. Removed unnecessary<datalist>
elements as part of this update.