Repository navigation
feat(db): tag sqlAsTable HTML output with class="ijava-db-table" - #2
Open
emmanuelbruno wants to merge 1 commit into
Open
emmanuelbruno wants to merge 1 commit into
emmanuelbruno wants to merge 1 commit into
Conversation
Quarto 1.10.18 neutering kernel-HTML border attr to data-border="1"; class attrs survive. Stable CSS hook for downstream renderers; border/style kept for backward compat.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
%%sqlAsTableemits its default HTML output as<table border=1 style="border-collapse:collapse; width:100%;">viadisplay_data. Quarto 1.10.18's notebook-output pandoc pass neuters kernel-HTML table attributes:borderbecomes an inertdata-border="1", inlinestyleis dropped — so the tables render borderless on custom themes. Probe-verified on the ebpro render image (Quarto 1.10.18): customclassanddata-*attributes survive the neutering.Consumers today anchor the fragile
table[data-border="1"]selector (a pandoc-mutated artifact). This PR gives them a stable, intentional hook.Change
Add
class="ijava-db-table"to both<table …>opening tags emitted by the sqlAsTable default-HTML path inJavaDBMSMagics.java(L559 and L626 — the two result-set render branches).borderandstyleare kept as-is for backward compatibility: existingdata-border="1"CSS anchors keep working unchanged.Downstream plan (ebpro consumer side)
table[data-border="1"]anchor to.ijava-db-tableas the primary hook; thedata-borderanchor is retained belt-and-braces for jars predating this change.lab-quarto-lookandfeellesson 07 (3 DB tables rendered via%%sqlAsTable).Verification
./gradlew compileJava compileTestJava— green (Temurin JDK 25, Gradle 9.7.1)../gradlew :test --tests 'io.github.spencerpark.ijava.magics.*'— green; existingJavaDBMSMagicsTestasserts oncontains("<table"), unaffected by the added attribute.Base note
Branches from
chore/build-correctness(tip = tagv1.4.6-pr12, the lineage that produces the shippedIJava-v1.4.6-pr12.jar).masterpredates the%%sqlAsTable/%%rdbmsSchemamagics entirely, so it cannot host this change.