-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16449 from opf/implementation/56440-add-🔍-to-proj…
…ects-autocompleter [#56440] Add 🔍 to projects autocompleter
- Loading branch information
Showing
10 changed files
with
64 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
...ngs/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.sass
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
frontend/src/global_styles/content/_projects_autocomplete_with_search_icon.sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@import 'helpers' | ||
|
||
.projects-autocomplete-with-search-icon | ||
ng-select[ng-reflect-multiple='false'] | ||
input | ||
margin-left: 18px | ||
ng-select | ||
.ng-select-container | ||
@extend .icon-search | ||
&:before | ||
@include icon-font-common | ||
padding-left: 10px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
lookbook/previews/open_project/common/autocomplete_preview/project_with_search_icon.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<% | ||
the_form = Class.new(ApplicationForm) do | ||
form do |f| | ||
f.project_autocompleter( | ||
name: :id, | ||
label: Project.model_name.human, | ||
visually_hide_label: true, | ||
autocomplete_options: { | ||
with_search_icon: true, | ||
openDirectly: false, | ||
focusDirectly: false, | ||
dropdownPosition: 'bottom', | ||
disabledProjects: Project.visible.take(10).pluck(:id).to_h { |id| [id, "Disabled reason!"] }, | ||
} | ||
) | ||
end | ||
end | ||
|
||
model = Project.new | ||
%> | ||
|
||
<%= primer_form_with( | ||
model:, | ||
url: '/abc', | ||
id: 'asdf') do |f| | ||
render(the_form.new(f)) | ||
end | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters