Added color selection for relationship lines#611
Conversation
Cause found to error in #610The SVG/PNG exporter was using a fixed color (exportStylesVariables.RELATION_COLOR) in the export relations, instead of using relation.color which is used in the canvas. What was corrected?
now passes relation.color to the export components.
each component now accepts relationColor and uses it in stroke. ResultWith this change, the generated SVG should retain the relationship colors defined in the model, and the PNG derived from the SVG should reflect them as well.
example .png with the the color lines
|

Change Report
Objective
Implement relation line color support across the Mongo Modeler web app and make the new color picker fully consistent with the existing relation edit form UI.
Work completed
1. Data model and schema wiring
color?: stringtoRelationVminapps/web/src/core/providers/canvas-schema/canvas-schema-vlatest.model.ts.2. Form value mapping and defaults
apps/web/src/pods/edit-relation/edit-relation.business.tsto includecolorin the mapping between form values and relation model values.#ecad5a.3. Relation edit form field
Relation colorfield toapps/web/src/pods/edit-relation/edit-relation.component.tsxusingInputFormikandtype="color".4. Relation rendering support
apps/web/src/pods/canvas/components/relation/...tsxto accept and use relation color values when rendering the SVG lines and forks.5. Form styling and consistency fixes
apps/web/src/common/components/forms/input-formik/input-formik.component.tsxto detecttype="color"and render the color picker using the same layout structure as other form controls..select/.selectLabel/.selectContainerlayout pattern from dropdown form fields, preventing the color label from drifting out of alignment.var(--fs-m)and aligned it vertically with the control.flex: 1 1 auto,box-sizing: border-box, and consistentheightandborder-radiusvalues.::-webkit-color-swatch-wrapper,::-webkit-color-swatch, and::-moz-color-swatchso the swatch fills the full control without an internal grey border.border-color: var(--input-border-color-active),background-color: var(--hover-input), andbox-shadow: 0 0 4px var(--hover-checkbox).Modified files
apps/web/src/core/providers/canvas-schema/canvas-schema-vlatest.model.tsapps/web/src/pods/edit-relation/edit-relation.business.tsapps/web/src/pods/edit-relation/edit-relation.component.tsxapps/web/src/common/components/forms/input-formik/input-formik.component.tsxapps/web/src/common/components/forms/input-formik/input-formik.component.module.cssExpected result
Relation colorlabel is aligned with the rest of the form labels.Closes #610