block-lab icon indicating copy to clipboard operation
block-lab copied to clipboard

No warning on saving new block if mismatched types

Open webstationhq opened this issue 6 years ago • 1 comments

I recently used the free version of block lab and found a bug/possible enhancement (you decide - I can write patch if needed).

To reproduce:

  1. Add a new block (name it whatever)
  2. Add a new field. Make the field type "email"
  3. On the default value, make it "foo"
  4. Close the field using the "Close Field" button
  5. OPTIONAL: Add other fields. I added 12 before I tried to publish.
  6. Try to publish the new block.

There is no visible warning. If you try to publish prior to step 4, you will see a warning that pops up using bootstrap validation on the default value field. Once the field is closed, there was no visible warning.

Browser: Chrome/OSX

Why: We often add many fields and change many field values prior to saving. since you can only have one field inspector open at a time, if the error occurs in a closed field, there is no warning. This causes a bit of confusion.

Resolution: Global warning? Switch validation to occur on the field close event and cancel the close until the problem is rectified?

webstationhq avatar Dec 04 '19 02:12 webstationhq

Hi @webstationhq, Thanks a lot for bringing this up, and for your great steps to reproduce. I've also seen this.

I'll look at this in more detail, you're right that it's strange that there's no visible warning, even though it doesn't work.

kienstra avatar Dec 04 '19 15:12 kienstra