Use ACE for badge queries


(Barry van Oudtshoorn) #1

When editing the query for a badge (if it’s enabled), it’d be great if the editor used was ACE, rather than a plain old textarea. At present I tend to write my queries in a different app and copy-paste them across so that I can make sure they’re nicely formatted and readable, but that’s a little arduous. :slight_smile:


(Robin Ward) #2

I took a quick look at this and it wasn’t a drop in replacement because the CSS for that component is designed to be much larger than the SQL badges. It’s totally doable, it’ll just take more than the 5 minutes I was hoping. Maybe someone can contribute a pr?


#3

I decided to give this #pr-welcome a shot this weekend and so far I’ve managed to replace the textarea with ACE (screenshot with minimal/required CSS changes to display ACE):

To me it feels like it’s not quite there yet design-wise. Perhaps it should be a bit shorter with 1px bright border around it? like so:

What do you guys think?


#4

Ok here is my PR:

And this is what I settled on:

  • rounded corners
  • lighter shade of grey for the left gutter
  • and 270px height (above screenshot was 250)

Screenshot:

Thoughts? :grin:


(Jeff Atwood) #5

Seems ok this area is up to @sam.


(Eric Berry) #6

The PR was merged on Oct 30 :raised_hands:t2:


(Jeff Atwood) #7