vaadin / vaadin/framework

Add styling entries in ValoTheme.java for Grid similar to those of Table

Open
#6,409 6 comments 2 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

Originally by hofmanndavid


Because many will start to move from Table to Grid I guess it will be good to implement all the relevat ValoTheme styling that is already present for Table also for the Grid Component.

Here I show the relevant entries for Table in the ValoTheme.java class that I believe should at least be present as GRID_* styles entries.


_ other Table/TreeTable style.
public static final String TABLE_COMPACT = "compact";
_ Small font size and reduced the white space inside the table cells. Can
_ be combined with any other Table/TreeTable style.
public static final String TABLE_SMALL = "small";
_ Remove the outer border of the table. Can be combined with any other
_ Table/TreeTable style.
public static final String TABLE_BORDERLESS = "borderless";
_ Remove the alternating row colors. Can be combined with any other
_ Table/TreeTable style.
public static final String TABLE_NO_STRIPES = "no-stripes";
_ Remove the vertical divider lines between the table columns. Can be
_ combined with any other Table/TreeTable style.
public static final String TABLE_NO_VERTICAL_LINES = "no-vertical-lines";
_ Remove the horizontal divider lines between the table rows. Can be
_ combined with any other Table/TreeTable style.
public static final String TABLE_NO_HORIZONTAL_LINES = "no-horizontal-lines";
_ Hide the table column headers (effectively the same as
_ {@link ColumnHeaderMode#HIDDEN}). Can be combined with any other
// Table/TreeTable style.
public static final String TABLE_NO_HEADER = "no-header";

Imported from https://dev.vaadin.com/ issue #16937

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 in ValoTheme.java and compare the existing TABLE_* styling constants with the Grid component's supported style names. Add corresponding GRID_* entries for the listed Grid styles, then verify the constants and documentation match the existing Table entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.