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

Feature request: provide error class which reserves space but grows with error content #879

Open
daniel-sc opened this issue Sep 8, 2021 · 5 comments
Labels
effort1: hours enhancement New feature or request help wanted Extra attention is needed prio4: low Should be done after all higher priorities are done

Comments

@daniel-sc
Copy link
Contributor

Describe the bug
When the error message in a form-field is wrapping to a second (or even more) line(s), the error is overflowing to the following components - see screenshot:

image

To Reproduce
Steps to reproduce the behavior:

  1. Go to Examples
  2. Edit error to have more words
  3. See error overflowing next component

Expected behavior
When the error wraps to multiple lines, the follwing components should be shifted/moved accordingly.

Screenshots
see above

Desktop (please complete the following information):

  • OS: win10
  • Browser Chrome 93.0
  • Version: SACL 12.3.0

Additional context

  • maybe use min-height to allow form-field to expand if more space is needed?
@daniel-sc daniel-sc added the bug Something isn't working label Sep 8, 2021
@kyubisation
Copy link
Collaborator

See #853
Also see Error messages in https://angular.app.sbb.ch/business/components/form-field

@daniel-sc
Copy link
Contributor Author

OK - so I might be convinced that according to your documentation this is not a bug, but rather a feature request?
Non the less, this "feature" probably prevents many bugs, as e.g. with translations the actual space needed is often not clear..

@kyubisation
Copy link
Collaborator

No, this should be solved. Add the css class sbb-form-field-flexible-errors to any ancester (e.g. html, body, etc.).

@daniel-sc
Copy link
Contributor Author

The problem is that sbb-form-field-flexible-errors removes the space for the first error line - which I'd like to retain.
So what we need (and I suppose, what most others want) is to have space reserved for the first error line, which is expanded in the (non standard) case that the error is larger.

@kyubisation
Copy link
Collaborator

Ah, I understand.
It is not necessarily what most others want, because we implemented it this way due to feedback we received.
This is not trivially possible, due to positioning and display issues.

@jeripeierSBB jeripeierSBB changed the title Bug: form-error overflows when error wraps to 2nd line Feature request: provide error class which reserves space but grows with error content Sep 23, 2021
@jeripeierSBB jeripeierSBB added effort1: hours enhancement New feature or request help wanted Extra attention is needed prio4: low Should be done after all higher priorities are done and removed bug Something isn't working labels Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort1: hours enhancement New feature or request help wanted Extra attention is needed prio4: low Should be done after all higher priorities are done
Projects
None yet
Development

No branches or pull requests

3 participants