Skip to content

Commit

Permalink
[60619] Add relation dialog is overflowing when the ticket name is ra…
Browse files Browse the repository at this point in the history
…ther long (opf#17645)

* hide the the overflowed text

* fix append to in project autocompleter and set width of it correctly since it has a search icon too

* add a comment to clarify the value we use for calculating width of ng-value-container
  • Loading branch information
bsatarnejad authored Jan 24, 2025
1 parent d697f86 commit 6c21ecd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frontend/src/global_styles/content/_forms.sass
Original file line number Diff line number Diff line change
Expand Up @@ -967,3 +967,6 @@ input[type=date], input[type=time]
display: inline-block
width: 100%
overflow: auto

.form-autocompleter-container
overflow: hidden
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
&:before
@include icon-font-common
padding-left: 10px
// Reduce width of search icon from width of ng-container value which is calc(100% - 30px)
.ng-value-container
width: calc(100% - 60px)
2 changes: 1 addition & 1 deletion lib/primer/open_project/forms/autocompleter.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= render(FormControl.new(input: @input, data: @wrapper_data_attributes)) do %>
<%= content_tag(:div, **@field_wrap_arguments) do %>
<%= content_tag(:div, class: ("projects-autocomplete-with-search-icon" if @with_search_icon)) do %>
<%= content_tag(:div, class: ["form-autocompleter-container", ("projects-autocomplete-with-search-icon" if @with_search_icon)]) do %>
<%= angular_component_tag(@autocomplete_component,
data: @autocomplete_data,
inputs: @autocomplete_inputs) %>
Expand Down
1 change: 1 addition & 0 deletions modules/meeting/app/forms/meeting/project_autocompleter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Meeting::ProjectAutocompleter < ApplicationForm
dropdownPosition: "bottom",
inputName: "project_id",
inputValue: @project&.id,
appendTo: "#new-meeting-dialog",
filters: [{ name: "user_action", operator: "=", values: ["meetings/create"] }]
}
)
Expand Down

0 comments on commit 6c21ecd

Please sign in to comment.