radiant-maxar / maprules-ui

user interface for maprules
0 stars 0 forks source link

move away from selectize #51

Closed maxgrossman closed 5 years ago

maxgrossman commented 5 years ago

closes #48

In interest of making this the 'first step' getting away from selectize, the refactor away from plugin did not integrate the form validation that are part of some of the field config interfaces that also included selectize stuff. So, I think step 2 is to bring those back in.

There are 3 bigish changes here that the comments below hopefully help for following along.

  1. I moved the all of the work for building up the reactive form to one class called edit-maprule.component. It also has 2 children that held most the stuff in the attribution/disabled features component (now called preset and disabled.feature).

Regarding the form initializing in a component, is this anti-angularish? Like could/should it live in a directive or something?

  1. The TagInfo service now makes use of this this verbosely named service-cache-interceptor.ts class which let's cache results. So, for example, if I go get popular tags once, it 'intercepts' that request (recognizes we're trying to make it), and uses what we cached if that request has already been made successfully.

  2. All selectize stuff now lives in combobox.component.ts

In addition to the mentioned missing form validation, there are still 1 have to do and 1 probably should do related task. I have to, add the logic so that if you select a 'should not be' value condition, the values combobox becomes 'disabled'. I should (and started trying to) add the behavior that a 'click outside' the general combobox area will close the dropdown. I tried using some blur/focus stuff but that has bad side effects on the form.