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

Form widget - layout shift when required input field shows the message "<name> is required" #1027

Open
hotNipi opened this issue Jun 25, 2024 · 0 comments
Labels
bug Something isn't working needs-triage Needs looking at to decide what to do

Comments

@hotNipi
Copy link
Contributor

hotNipi commented Jun 25, 2024

Current Behavior

Carefully designed cards with same height

image

With message fired the layout of the card gets affected

image

Expected Behavior

The card layout should not be affected.

Steps To Reproduce

No steps but proposal:

Render the message with position absolute
image

The CSS

.nrdb-ui-form-rows .nrdb-ui-text-field{
    position: relative;
}
.nrdb-ui-form-rows .v-input__details{
    position: absolute;
    right: 1rem;
    bottom: -0.5rem;
    padding: unset;
}
.nrdb-ui-form-rows .v-messages__message{
    background-color: rgb(var(--v-theme-group-background)) ;
    display:inline;
    padding-inline: .25rem;
}

Tested with all form elements where "required" option is available
(with Chrome, FF & Edge)

image

Little bit of over-crowded when narrow card has form with 2-column layout. But still ,no layout shift.

image

Environment

  • Dashboard version:
  • Node-RED version:
  • Node.js version:
  • npm version:
  • Platform/OS:
  • Browser:

Have you provided an initial effort estimate for this issue?

I can not provide an initial effort estimate

@hotNipi hotNipi added bug Something isn't working needs-triage Needs looking at to decide what to do labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Needs looking at to decide what to do
Projects
None yet
Development

No branches or pull requests

1 participant