[COMPASS-5898] Use JavaScript editor instead of JSON editor for insert document view Created: 16/Jun/22  Updated: 28/Jun/23  Resolved: 12/Jul/22

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Sergey Petushkov Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates COMPASS-5949 Make Editors accept both EJSON and Sh... Open
Documentation Changes: Not Needed

 Description   

When using insert document dialog in Compass, you can either use a JSON editor or a visual Document one. This is not always convenient when using a JSON view as writing a properly formatted JSON creates a lot of friction and requires knowledge of EJSON format

We might want to provide users with the JavaScript editor there instead (similar to the editors in query bar or aggregation builder) so that writing documents is faster and requires less additional knowledge when using text editor and not the visual one



 Comments   
Comment by Anna Henningsen [ 20/Jun/22 ]

Just saw COMPASS-3079, which was the reverse request (allow EJSON input where we currently expect shell input).

Comment by Anna Henningsen [ 20/Jun/22 ]

We should keep in mind that EJSON is also valid Shell syntax, just with different semantics. I’d really like it if we could standardize editors to Shell syntax across the board, but for people who are used to inserting data as EJSON, this might be a surprising change for them.

We are already considering adding a per-editor action in COMPASS-5853. Do we want to make an EJSON/Shell syntax toggle part of that?

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