[COMPASS-276] Doc validation default to error/strict instead of warning/off and add info tooltip links Created: 03/Nov/16  Updated: 14/Nov/18  Resolved: 14/Nov/18

Status: Closed
Project: Compass
Component/s: Document Validation, UI / UX
Affects Version/s: 1.5.0-beta.0
Fix Version/s: 1.18.0

Type: Task Priority: Major - P3
Reporter: Andrew Morgan Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Example info sprinkle on indexes.png     PNG File Example info sprinkle on schema.png     PNG File Where should the info sprinkle go.png    
Issue Links:
Related
Epic Link: COMPASS-2227

 Description   

Compass defaults to a validation action of "warning" and validation level of "off". This is counter the MongoDB default of error/strict.

When people add validation rules, they will expect them to be active but these defaults effectively turn them off. If sticking with these defaults then it would be good to show a warning that the rules you've just added aren't being enforced.

Also, it's not obvious what these fields actually mean (e.g. that warnings go to the log file and that Moderate allows documents to break the rules when modifying an existing document. Some tips on this pane would be useful.

Validation Level Infotip:
https://docs.mongodb.com/v3.2/core/document-validation/#existing-documents
Validation Action Infotip:
https://docs.mongodb.com/v3.2/core/document-validation/#accept-or-reject-invalid-documents

Tasks for this ticket:

  • Set the defaults of Validation Level and Action to error/strict as per docs
  • Add info sprinkles to the docs pages


 Comments   
Comment by Asya Kamsky [ 24/Sep/17 ]

Actually the problem is worse than that.

When displaying existing rules which have default level and action, it shows validation action of "warning" and validation level of "off".

This is wrong as that's not what the actual rule behavior would be according to defaults.

Plus, when you edit the rule it's going to change it from enforced to un-enforced!!!

I'm looking at existing validation rule and it's showing that:
https://www.dropbox.com/s/81fwk6coz1e39hb/Screenshot%202017-09-24%2005.27.34.png?dl=0

Comment by Peter Schmidt [ 18/May/17 ]

Current location of the default values that need to be changed:
https://github.com/10gen/compass-document-validation/blob/af3556d/src/stores/index.js#L53-L54

Comment by Peter Schmidt [ 18/May/17 ]

This would require extending the OptionSelector component with an info sprinkle.

fred.truman or sean.oh would one of you mind doing a quick invision of where the info sprinkle should go? Feel free to create a separate ticket if that's easier.

Data points:

  • Query bar lost its info sprinkle in 1.7, see COMPASS-902 prototype invision which puts them on the left
  • In other places it looks like the right of the label is preferred:

Generated at Wed Feb 07 22:24:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.