vaadin / vaadin/framework

Missing error indicator for checkboxes (Valo theme)

Open
#8,922 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement workaround
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

  • Vaadin version: 8.0.4

There is no error indicator for checkboxes except the exclamation mark. there should be a background color change and even a border color change like textfeld. i did it as a workaround like this:

`@mixin valo-checkbox ($primary-stylename: v-checkbox, $include-additional-styles: contains($v-included-additional-styles, checkbox)) {

.#{$primary-stylename} {
    @include valo-checkbox-style;
}

.#{$primary-stylename}-error {
    > input ~ label:before {
        border-style: dashed !important;
        border-color: $v-error-indicator-color !important;
        $bg: scale-color($v-error-indicator-color, $lightness: 98%);
        background: $bg !important;
        color: valo-font-color($bg);
    }
}


@if $include-additional-styles {
    .#{$primary-stylename}-small {
        @include valo-checkbox-style($unit-size: $v-unit-size--small);
        font-size: $v-font-size--small;
    }

    .#{$primary-stylename}-large {
        @include valo-checkbox-style($unit-size: $v-unit-size--large);
        font-size: $v-font-size--large;
    }
}

}
`
so if you set the checkbox as required and validate it, there should be a red border and a very light red background.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Valo theme's checkbox styling and compare it with the text field error styling described in the issue and workaround. Verify that a required checkbox in a validation error state shows a red border and a very light red background, in addition to the existing indicator.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.