Skip to content

Conversation

@Jolanrensen
Copy link
Collaborator

@Jolanrensen Jolanrensen commented Aug 11, 2025

Fixes #1356

Now you can actually do this:

df .format().with { background(white) } .format { age }.with { background(blue) and textColor(white) } .format { name }.with { background(green) } .format { name.firstName }.with { italic and underline } .format { name.colsOf<String>() }.where { it.startsWith("C") }.with { background(red) }
image

Note, this does not solve #982 yet

…columns by name, so column groups can now also be targeted and used. I turned the gathered attributes into a map, such that duplicate keys are removed. Only the latest ones stay, meaning you can overwrite previous attributes for a cell.
@Jolanrensen Jolanrensen marked this pull request as ready for review August 11, 2025 20:02
@koperagen
Copy link
Collaborator

koperagen commented Aug 12, 2025

This now formats both firstName and lastName?
df.format { name }.with { italic and underline }
If so, add "Columns inherit formatting from containing column group" or "Formatting a ColumnGroup applies to all its children (or nested columns)"

@Jolanrensen
Copy link
Collaborator Author

Jolanrensen commented Aug 12, 2025

This now formats both firstName and lastName? df.format { name }.with { italic and underline } If so, add "Columns inherit formatting from containing column group" or "Formatting a ColumnGroup applies to all its children (or nested columns)"

I shall expand the kdocs a bit :)

Copy link
Collaborator

@AndreiKingsley AndreiKingsley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! But yeah, need to describe behavior.

@Jolanrensen
Copy link
Collaborator Author

I'll also update the documentation site btw, I forgot about that, then I'll merge :)

@Jolanrensen Jolanrensen merged commit c043b2d into master Aug 13, 2025
6 checks passed
@Jolanrensen Jolanrensen deleted the format-colgroups branch August 13, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants