Files
compiler-explorer/views/templates/widgets/compiler-selector.pug
Jeremy Rifkin 55dc09017e Compiler Picker UI Improvements (#4849)
Alrighty, round 2!

This PR makes the compiler picker dropdown taller (max height is to the
bottom of the screen)

![image](https://user-images.githubusercontent.com/51220084/224517409-17706ba6-fe85-444a-ad3b-f244f66eea5b.png)

I've added a toolbar button for opening the popout as well as a button
when the dropdown is open:


![image](https://user-images.githubusercontent.com/51220084/224517304-6478fca5-7bc1-4f87-b2ae-e9091d7d48bc.png)

![image](https://user-images.githubusercontent.com/51220084/224517317-83468805-1e9d-4bc6-8a4f-8786325f1e7b.png)

Then the modal interface allows text searching, filtering by compiler
category, and filtering by compiler instruction set. In the future I'd
like to replace the instructionSet property with an architecture
property so the filtering here can be a little better.


![image](https://user-images.githubusercontent.com/51220084/224517348-9cf40866-c5af-4274-84ba-21eb640ab2ea.png)

Demo of the category filtering:


![image](https://user-images.githubusercontent.com/51220084/224517529-5370b3f9-9ad3-4340-838a-b2d0a47c7467.png)

The text filtering highlights results the same as tomselect does:


![image](https://user-images.githubusercontent.com/51220084/224517490-d0dfa6d0-9b61-4be4-8cc7-ca4a4729a532.png)

I moved the favorites permanently to their own column so compilers
aren't jarringly shifted around the screen when favoriting /
unfavoriting.

Also added media queries so the modal looks ok on smaller screens:


![image](https://user-images.githubusercontent.com/51220084/224517563-bdf409c1-7e3a-4c73-812b-f02179b55799.png)


![image](https://user-images.githubusercontent.com/51220084/224517574-07fa2c8b-67d2-496d-9174-b1343e22bd62.png)

I think the only other two changes from the first PR are now the active
compiler is highlighted like it is in the tomselect dropdown and I
figured out how to reliably focus the search bar on modal open. (Oh, and
now clicking a compiler actually does something!)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-03-12 17:07:44 -04:00

20 lines
1.4 KiB
Plaintext

#compiler-selector
.form-row
.input-group
.input-group-prepend
.input-group
select.compiler-picker
.input-group-append
button.btn.btn-sm.btn-light.input-group-text.picker-popout-button(data-trigger="click" style="cursor: pointer;" role="button" title="Compiler picker popout")
span
i.fa-solid.fa-arrow-up-right-from-square
.input-group-append
button.btn.btn-sm.btn-light.input-group-text.prepend-options(tabindex="0" data-trigger="focus" style="cursor: pointer;" role="button" title="All compilation options")
span.btn.btn-sm.btn-light.status-icon
input.conformance-options.form-control(type="text" placeholder="Compiler options..." size="256" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false")
.input-group-append
button.btn.btn-sm.fas.fa-receipt.d-none.compiler-out.compiler-selector-icon(disabled=true style="cursor: help;" title="This compiler has generated some output. Open its associated pane to read it.")
button.btn.btn-sm.fas.fa-times.close.compiler-selector-icon(aria-label="Close" title="Close")
button.btn.btn-sm.fas.fa-share.close.extract-compiler.compiler-selector-icon(aria-label="Pop compiler" title="Show compiler")
button.btn.btn-sm.fas.fa-copy.close.copy-compiler.compiler-selector-icon(aria-label="Copy compiler" title="Copy compiler")