vaadin / vaadin/framework

Insufficient selector precision in Grid editor cell Valo styling

Open
#10,696 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Vaadin Framework 8.3.1

The Grid's inline edit feature's styling in Valo (_grid.scss) applies min/max widths and heights to various input components as follows:

      .v-textfield,
      .v-datefield,
      .v-filterselect {
        min-width: 100%;
        max-width: 100%;
        min-height: 100%;
        max-height: 100%;
      }

      .v-select,
      .v-select-select {
        min-width: 100%;
        max-width: 100%;
      }

Notice the lack of immediate child selector before the input field selectors.

This works fine when these input fields are used as-is in cells, but if you need to use some kind of custom composite field with e.g. a textfield and a combobox, it breaks the composite since both are forced to 100% width.

Adding an immediate child selector to the component selectors would isolate the min/max properties to non-composite fields, making it much easier to use composite fields in the inline editor:

      > .v-textfield,
      > .v-datefield,
      > .v-filterselect {
        ...
      }

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

Open the Valo Grid styling in _grid.scss and inspect the selectors used for inline editor input components. Verify the selector behavior with a composite field containing a textfield and combobox; done means standalone fields retain their sizing while nested fields are not forced to full width.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.