oda-hub / mmoda-frontend-module

GNU General Public License v2.0
0 stars 1 forks source link

buttons turning light green #113

Open volodymyrss opened 2 years ago

volodymyrss commented 2 years ago

explain case, discuss suggestions

motame commented 2 years ago

It's a normal behavior as it is defined in the form validation. The submit button become light green when editing the field contour_levels because of the inline validation of this field. And this is clearly defined in the form :

$form['contour_levels'] = array(
    ...
    '#attributes' => array(
      'class' => array(
        'form-control'
      ),
      'data-bv-notempty' => 'true',
      'data-bv-regexp' => 'true',
      'data-bv-regexp-regexp' => '^[0-9]{1,2}(,[0-9]{1,2})*$',
    ),
   ...

data-bv-regexp-regexp is a "bv: Bootstrap Validation" attribute where the criteria is a regular expression. The regexp is stating clearly that the field is an integer between 0 and 99. @dsavchenko , if this is intended to be like that it can be done with a simpler way:

data-bv-integer="true",
data-bv-between-min=0,
data-bv-between-max=99,
dsavchenko commented 2 years ago

This regexp is for one 0..99 integer or the comma-separated list of such integers. It is intended to be like this

The problem occurred with some other fields (e.g. qmax for spectrogram product) and is not completely reproducible. The only validation there was data-bv-integer, and the button became inactive with valid integers (and the validation tickmark was still green). I am able to reproduce sometimes, with no clear sequence, but only after some product has already been obtained (I suspect so).

motame commented 2 years ago

Ah OK ! More investigations are needed.

volodymyrss commented 2 years ago

@dsavchenko , @andriineronov , @burnout87 does this still happen? I think maybe this was found by @dsavchenko and might be resolved now.

dsavchenko commented 2 years ago

I've just tested in production. The bug is still there. One particular way to reproduce:

  1. Resolve GW170817
  2. Request Strain time series
  3. Select spectrogram and start editing Upper Q field
  4. Voila! Submit button disabled

To enable it back one could edit Lower Q field

volodymyrss commented 2 years ago

Ok that's convoluted. @motame may address it. Or @burnout87

volodymyrss commented 2 years ago

is this still happening, @dsavchenko , @burnout87 ?

dsavchenko commented 2 years ago

is this still happening, @dsavchenko , @burnout87 ?

Yes, it still happens

andriineronov commented 1 year ago

I am facing "submit button turns light green" issue again on https://staging.odahub.fr/mmoda/ . In the new Fermi LAT service, if i modify a parameter in the instrument-specific parameter panel, (for example, change time bin duration for the lightcurve), the button can turn light green and blocked, no chance to get it back, even reverting to the original parameter value.