-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for multilines labels #781
Comments
It looks like Sprotty might support this since 0.8.0 via eclipse-sprotty/sprotty#171 |
SpecificationModelThe model owns somewhere an entity with an attribute of type string. There is currently not the information about if the string is mono or multiline. RepresentationEvery representation of a string attribute should manage the mono or multiline information based on th Form representationBy default, the form representation represents a string with a textField. But a string could also be represented by a textArea The textField will display The textArea will display SprottyThe label will display As a second step, we could configure a maximum text length for the label display. That means that if the label is longer than the maximum length, a line is cut and returned as many times to comply with the maximum length backend layoutThe ELK and incremental layout should adapt to mange the fact the a label can be displayed on many lines. |
The changes are about the node label center position. There is in fact no visible change but there are technical changes to prepare the following commits when we will have a label on many lines: * the label position given by the server is the horizontal center of the node instead of the left position of the label * consequently the LabelView is updated to display the text with 'text-anchor': 'middle' instead of the default 'text-anchor': 'start' Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
It will allow multiple line edition. Shift + return in Text area only adds a line return but does not send the mutation. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The ELK label TextBound is set according the line returns contained in the label text. This will allow to have the right width of the node and to avoid the overlap of the label text with the contained nodes. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Add a isMultiLine attribute to Label so that it can be seen as a textArea by sprotty. Adapt the editing bounds and the edited text font to have always the same editing area whatever the zoom level. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The changes are about the node label center position. There is in fact no visible change but there are technical changes to prepare the following commits when we will have a label on many lines: * the label position given by the server is the horizontal center of the node instead of the left position of the label * consequently the LabelView is updated to display the text with 'text-anchor': 'middle' instead of the default 'text-anchor': 'start' Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
It will allow multiple line edition. Shift + return in Text area only adds a line return but does not send the mutation. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The ELK label TextBound is set according the line returns contained in the label text. This will allow to have the right width of the node and to avoid the overlap of the label text with the contained nodes. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Add a isMultiLine attribute to Label so that it can be seen as a textArea by sprotty. Adapt the editing bounds and the edited text font to have always the same editing area whatever the zoom level. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The ELK label TextBound is set according the line returns contained in the label text. This will allow to have the right width of the node and to avoid the overlap of the label text with the contained nodes. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Add a isMultiLine attribute to Label so that it can be seen as a textArea by sprotty. Adapt the editing bounds and the edited text font to have always the same editing area whatever the zoom level. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The changes are about the node label center position. There is in fact no visible change but there are technical changes to prepare the following commits when we will have a label on many lines: * the label position given by the server is the horizontal center of the node instead of the left position of the label * consequently the LabelView is updated to display the text with 'text-anchor': 'middle' instead of the default 'text-anchor': 'start' Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
It will allow multiple line edition. Shift + return in Text area only adds a line return but does not send the mutation. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The ELK label TextBound is set according the line returns contained in the label text. This will allow to have the right width of the node and to avoid the overlap of the label text with the contained nodes. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Add a isMultiLine attribute to Label so that it can be seen as a textArea by sprotty. Adapt the editing bounds and the edited text font to have always the same editing area whatever the zoom level. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The changes are about the node label center position. There is in fact no visible change but there are technical changes to prepare the following commits when we will have a label on many lines: * the label position given by the server is the horizontal center of the node instead of the left position of the label * consequently the LabelView is updated to display the text with 'text-anchor': 'middle' instead of the default 'text-anchor': 'start' The default form description will now use a text area for default form representation. It will allow multiple line edition. Shift + return in a text area only adds a line return but does not send the mutation. Adapt the ELK to consider the multiple line. The ELK label TextBound is set according the line returns contained in the label text. This will allow to have the right width of the node and to avoid the overlap of the label text with the contained nodes. Add a isMultiLine attribute to Label so that it can be seen as a text area by sprotty. Adapt the editing bounds and the edited text font to have always the same editing area whatever the zoom level. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
The changes are about the node label center position. There is in fact no visible change but there are technical changes to prepare the following commits when we will have a label on many lines: * the label position given by the server is the horizontal center of the node instead of the left position of the label * consequently the LabelView is updated to display the text with 'text-anchor': 'middle' instead of the default 'text-anchor': 'start' The default form description will now use a text area for default form representation. It will allow multiple line edition. Shift + return in a text area only adds a line return but does not send the mutation. Adapt the ELK to consider the multiple line. The ELK label TextBound is set according the line returns contained in the label text. This will allow to have the right width of the node and to avoid the overlap of the label text with the contained nodes. Add a isMultiLine attribute to Label so that it can be seen as a text area by sprotty. Adapt the editing bounds and the edited text font to have always the same editing area whatever the zoom level. Bug: #781 Signed-off-by: Laurent Fasani <[email protected]>
Screenshots
Sirius Desktop
Sirius Web (a long single line label)
Steps to reproduce
In the Label Expression for a node, add a newline
Expected behavior
The newline makes the rest of the text appear on a new line
Actual behavior
The text appears on a single line. The newline is turned into a space.
The text was updated successfully, but these errors were encountered: