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

Replace <select>s with a custom Combobox component #1301

Draft
wants to merge 44 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
bbfa017
replace `select`s with our custom combobox
MattBudz Sep 24, 2024
19aba46
add option selection functionality
MattBudz Sep 26, 2024
c33f3ff
ensure menu width matches the select width
MattBudz Sep 26, 2024
1067926
better naming + fix selection on load
MattBudz Sep 26, 2024
55d1549
add filtering UI
MattBudz Sep 26, 2024
56cf6e4
add filtering functionality
MattBudz Sep 26, 2024
c3b1262
auto-focus on filter if it's present
MattBudz Sep 26, 2024
b1bb48a
fix toggleClass condition
MattBudz Sep 26, 2024
8d7cf14
clear filter when the menu is closed
MattBudz Sep 26, 2024
911ed3b
typo
MattBudz Sep 26, 2024
1f19cae
semantics
MattBudz Sep 26, 2024
025b188
fix deboune not working
MattBudz Sep 26, 2024
68a47d4
add filter results empty state
MattBudz Sep 26, 2024
e892f4b
add support for `<optgroups>`s
MattBudz Sep 27, 2024
8d9bb92
update combobox when select is programatically updated
MattBudz Oct 2, 2024
1109db6
add support for multiple options
MattBudz Oct 3, 2024
5b635be
Merge branch 'develop' into combobox/base
MattBudz Oct 8, 2024
996a669
add support for disabled options
MattBudz Oct 8, 2024
fa62ac2
alpha css
MattBudz Oct 9, 2024
c577304
add support for user defined options
MattBudz Oct 9, 2024
0409fdb
improve pro parity and consistency
MattBudz Oct 10, 2024
607080a
add support for disabled selects
MattBudz Oct 10, 2024
947a9ec
improve `disabled` styles
MattBudz Oct 10, 2024
4d8c2ee
ensure `<select>` change eventListeners still work
MattBudz Oct 10, 2024
8918700
prevent re-init on existing combobox
MattBudz Oct 11, 2024
ab55a3a
make filtering a default combobox feature
MattBudz Oct 11, 2024
aef0505
fix prompt option not being re-selectable
MattBudz Oct 11, 2024
5af4f55
update style guide
MattBudz Oct 11, 2024
e20195f
add support for colored options and icons
MattBudz Oct 11, 2024
67bb912
optimize combobox-option click event binding
MattBudz Oct 21, 2024
a885d5d
refactor selectOptions() for readability
MattBudz Oct 21, 2024
ee9755d
reduce number of eventlisteners
MattBudz Oct 21, 2024
5db095b
refactor to use ES6 syntax & reduce eventlisteners
MattBudz Oct 21, 2024
1cded74
typo
MattBudz Oct 21, 2024
e7be8ee
improve readability & split init() into functions
MattBudz Oct 21, 2024
65a8487
remove debugging flag
MattBudz Oct 21, 2024
e135325
Merge branch 'develop' into combobox/base
MattBudz Oct 24, 2024
b5aa323
differentiate between` hover/focus` and `selected`
MattBudz Oct 24, 2024
18560db
avoid hover style collision + improve pro contrast
MattBudz Oct 24, 2024
1e13600
alpha
MattBudz Oct 24, 2024
d716267
fix bugs resulting from hiding menu based on focus
MattBudz Oct 24, 2024
3c6e504
add aria-attributes for accessibility
MattBudz Oct 24, 2024
3adb339
unselect multi-option if re-selecting
MattBudz Oct 24, 2024
84015bd
fix missing `selected` class
MattBudz Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/assets/javascripts/shared/behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@
}, 1000);
});

// Initialize ComboBox
$(parentElement)
.find('select')
.each(function () {
new ComboBox($(this));
});

window.initBehaviors = initBehaviors;
}

Expand Down
Loading
Loading