origam.com

Add Style -> TextBox: alignLeft

Environment:

Origam Architect.(0.0.1.2030)

Object:

Root (or Root Menu) > User Interface > Styles > TextBox > missing alignLeft option from default

Initial conditions:
I created TextBox on Screen Section and I missed in Properties Tab choice for part Style: alignLeft

Steps to reproduce:
Please, try to add TextBox field to Screen Secton and set it parameter Style: alignLeft in Properties Tab

Example picture:

Styles are not fully implemented/decided how to behave in ORIGAM HTML yet. We should definitely review this.

@tvavrda Any progress in the decission making?

Nothing so far. What would you suggest? One idea could be to just inject whatever we find in the model to the style of the HTML element. Another option would be to only use it as a class and let the user to specify the actual formatting using CSS. So we could then remove the inner nodes from the bold or alignRight styles in the model.

Which of the options looks cleaner to you?

One question stays – how to do it in the grid, which is painted? Any ideas?

I think something in the middle would be do able.

We would get a css style string from the user, some thing like: width:30px; margin-right: 5em; height: 100% client would then parse it into a react style and include it in the generated html: <div style={{width: "30px", marginRight: "5em", height: "100%"}} ... </div>.

This would be easy to do for form views. For grid we would have to parse the css string and use javascript to style it. So there would have to be e a set of styles that we support.

Origam “fontWeight” property will correspond to CSS “font-style”:
CSS Fonts Module Level 4

Origam “textAlign” can have these values: [left, center, right]