-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Data Modeling
We can use the `onFieldClick` we added in the linked ticket to handle when a field is clicked and then open it in the drawer.
When editing to an invalid or duplicate field name let's show an error state with an `errorMessage` in the text-input: https://www.mongodb.design/component/text-input/live-example See the error handling section in the tech design for more details: https://docs.google.com/document/d/15Dn5FB3POEj9sYQrYIUajZySqFzlPfpcgjkPhzFqSFg/edit?tab=t.0#bookmark=id.gtbx54ysqe4o
Keep in mind this involves changes to the model's relationships. See the tech design for more on the downstream relationship impacts we need to account for: https://docs.google.com/document/d/15Dn5FB3POEj9sYQrYIUajZySqFzlPfpcgjkPhzFqSFg/edit?tab=t.0#bookmark=id.pg61nkxplqwt
The edit action related to a change should happen when the input is unfocused. If it's invalid we don't allow the change and keep the initial value.
z.object(
{ type: z.literal('RenameField'), ns: z.string(), from: FieldPath, to: FieldPath, }),
z.object(
),
z.object(
),
- depends on
-
COMPASS-9655 Add add collection button in the diagram toolbar
-
- In Progress
-