thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Warn alerts not showing in panel #726

Closed grumpyinca closed 2 years ago

grumpyinca commented 2 years ago

When testing on V4.3rc1 in staging, disabling a default constraint (for example: Coils_A MIN or Spring_Index MAX) a black triangle correctly appears (with correct tooltip) in the constraint input field. However, an associated entry does not appear in the Alerts panel (accordion dropdown).

This same (incorrect) behavior is observed in the development master branch. Development branch #718 shows the expected (correct) behavior.

grumpyinca commented 2 years ago

Another case:

Steps:

  1. Reload app - Compression spring initialState
  2. Change value of Force_2 from 39 to 32 pounds
  3. Observe that there is a black triangle adjacent to the value of FS_2 that includes a "Warn: Over design concern"
  4. Observe that there is no corresponding entry in the Alerts panel.
grumpyinca commented 2 years ago

I am now convinced that this is the same problem that I mentioned in Slack on August 6th an 9:29pm Pacific time. I recall that the repair involved change in a conditional expression from "warning" to "warn".

Perhaps more interesting is the software archeology to determine what other changes were lost as part of this particular regression.

1fifoto commented 2 years ago

For consistency added the following to Alerts.js

export const ERR = 'Err';
export const WARN = 'Warn';
export const NOTICE = 'Notice';
export const INFO = 'Info';

Then imported them and used them throughout checks.js and Report1.js, etc.

Merged into master, closing