Skip to content

Custom cardinality editor#56

Merged
HansMarcus01 merged 6 commits intoLIDSOL:mainfrom
lethalSopaper:feat-cardinality-editor
Oct 8, 2025
Merged

Custom cardinality editor#56
HansMarcus01 merged 6 commits intoLIDSOL:mainfrom
lethalSopaper:feat-cardinality-editor

Conversation

@lethalSopaper
Copy link
Copy Markdown

Now you can choose a custom cardinality in the one-to-many relationships

…lities

- Add 'Custom...' option to ONE_TO_MANY cardinality dropdown
- Support all three notation systems (Default, Crow's Foot, IDEF1X)
- Add input validation: first coordinate (0 or 1), second coordinate (>1 or *)
- Prevent negative cardinalities and enforce proper format (x,y)
- Add timestamp to undo entry messages to prevent deduplication
- Ensures each custom cardinality change creates a unique undo entry
- Auto-focus input field when 'Custom...' is selected from dropdown
- Add Enter key to apply custom cardinality
- Add Escape key to cancel custom input
- Custom option in side bar panel
- Custom option for relationship context menu
Copy link
Copy Markdown

@HansMarcus01 HansMarcus01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the section custom, the handler allows you to enter 0005 before the cardinality value, but this ceros be has remove with press enter.

Comment thread src/data/constants.js
}
DEFAULT: { value: "1,1", label: "(1,1)" },
NULLEABLE: { value: "0,1", label: "(0,1)" },
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove whitespaces

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespaces have been removed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And leading zeroes for custom cardinality are not allowed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now leading zeroes are allowed but normalized when entered

@HansMarcus01
Copy link
Copy Markdown

This pull request resolve the issue #49

@HansMarcus01 HansMarcus01 merged commit ae33d31 into LIDSOL:main Oct 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants