Skip to content
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

Option to disable background on calculated fields with labels #4004

Closed
ebruchez opened this issue Mar 26, 2019 · 9 comments

Comments

Projects
1 participant
@ebruchez
Copy link
Collaborator

commented Mar 26, 2019

Following #3804, we'd like the ability to disable this for some fields. I suggest we could have an appearance="minimal".

See also #3583.

@ebruchez ebruchez self-assigned this Mar 26, 2019

@ebruchez ebruchez added this to To do in Orbeon Forms 2018.2.3 via automation Mar 26, 2019

@ebruchez ebruchez added this to To review in Orbeon Forms 2019.1 via automation Mar 26, 2019

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 26, 2019

See also #3821 which introduces .xforms-field on the nested <output>.

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

And since 2018.2 we also have an appearance="xxf:multiline" which enables word wrap with:

.xforms-output.xforms-output-appearance-xxforms-multiline {
    output[role = textbox] {
        white-space: normal;
        word-wrap: break-word; // called `overflow-wrap` as of 2013 (http://www.w3.org/TR/css3-text/#overflow-wrap-property)
        min-height: @controlsHeight;
        height: auto;
    }
}

Incidentally, I am not sure in which case we wouldn't want multiline then the content becomes wider, actually. Either that or try to do what readonly input fields do, which is having scrolling when you select. But I don't think it's possible to emulate that scrolling with just a <span>. So let's consider supporting multiline in all cases.

We show "fields" in the following cases:

  • <xf:output> with label in edit modes
  • many controls in view modes, including <xf:input>, etc.

We'd like to add:

  • except for <xf:output appearance="minimal">
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

I am not sure how much like like the xforms-field class change introduced by #3821 vs. a 100% CSS solution.

Now we have:

.xforms-output > .xforms-field

which must not show a border but:

.xforms-output.xforms-output-appearance-minimal > .xforms-field

which must NOT show a border. So we are back to square one and .xforms-field is not helping, unless we remove it in the Scala code when appearance="minimal".

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

Related question. In the Scala code, isField == true if we have a label. Then:

  • We use that to make the field tabbable iif the field is NOT static readonly.
  • In either case, we set the xforms-field class instead of xforms-output-output.

With appearance="minimal", would we make the field tabbable? If not, then we need to check the minimal appearance in Scala anyway.

RESOLUTION: We are inclined to keep the field as tabbable right now. If needed, we can have another option in the future to disable tabbing through calculated values which have a label.

So the remaining question is what to do with .xforms-field:

  • Don't place it on <output> with appearance="minimal".
  • Keep it, but change the CSS not to rely on it in edit modes.
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

RESOLUTION: We enable multiline for all of those.

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

isMinimal hasLabel == false hasLabel == true
false .xforms-output-output .xforms-field
true .xforms-output-output .xforms-output-output
isStaticReadonly hasLabel == false hasLabel == true
false no tabbing tabbing
true no tabbing no tabbing
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

  • Form Builder UI to choose this option?
  • doc
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

It would be good if the change in appearance in Form Builder could use the standard XBL appearance mechanism.

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 27, 2019

Confirming that we can have a "Calculated Value Without Border" option easily in Form Builder.

@ebruchez ebruchez closed this in 85a575e Mar 27, 2019

ebruchez added a commit that referenced this issue Mar 27, 2019

For #4004: remove `xxf:multiline` appearance
- We now wrap lines by default.

Orbeon Forms 2019.1 automation moved this from To review to Done Mar 27, 2019

Orbeon Forms 2018.2.3 automation moved this from To do to Done Mar 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.