User Tools

Site Tools


dev:eg-grid:styling

Grid column styling

Note: this is based on the proposed eg-grid table rewrite; see Bug #1615781

All cells (including headers) have a set of class names derived from the IDL field name, path, and datatype. This will allow us to write very precisely targeted styles for specific columns.

Some data types and column names have default styles applied, as described below.

Numbers and dates

Numeric data types (int, float, money) and any IDL field name ending in -count are aligned to the right. You may override the default alignment for any column using the new buttons in the Manage Columns dialog, or reset to the default alignment using the X icon there. (This may be especially useful for dates, if you are using a numeric format with two characters for month and day.) The row counters remain left-aligned.

Numeric columns, dates, IDs, and barcodes now use tabular numerals, which will line up vertically–even the 1s, and even if some text is bold. This style is often used in financial reports to make numbers easier to compare.

Barcodes

All barcode columns have their width set to 16 characters (including padding). However, the table will treat this as a suggestion rather than a rule if there are too many columns for the available space. If you adjust the width manually, your preference will override the default width. Barcodes are currently the only columns that have a defined width.

URLs and Emails

Email addresses and URLs are prevented from showing hyphens when the text wraps (if your browser + language combination supports automatic hyphenation at all), and line breaks will occur sensibly around the punctuation.

Datatypes

When the datatype itself is listed in the grid, as in Server Administration > Org Unit Setting Types, it is styled with a monospace font.

People's Names

While we might want to set widths for people’s names, we use “name” in the IDL to refer to many things other than humans, so we will have to comb through the fields and identify the specific paths that refer to people.

Formatting wish list

What other columns need formatting adjustments? Add them to this Google Sheet

dev/eg-grid/styling.txt · Last modified: 2024/04/05 16:37 by sleary

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.