-
Notifications
You must be signed in to change notification settings - Fork 132
fix(super-converter): resolve table style conditional shading on cell import (SD-1833) #1985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
harbournick
merged 7 commits into
main
from
caio/sd-1833-fix-table-style-cell-shading-not-applied-on-import
Feb 11, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0156143
fix(super-converter): resolve table style conditional shading on cell…
caio-pizzol fd59a8a
ci(fix): ecma spec review
caio-pizzol 7ea8796
fix(style-engine): resolve table cell shading from style cascade inst…
caio-pizzol 50c2bad
chore(visual-testing): add table cell shading story and R2 wrangler s…
caio-pizzol 273c51d
Merge branch 'main' of github.com-superdoc:superdoc-dev/superdoc into…
caio-pizzol 86ff313
chore(visual-testing): remove interaction story for cell shading (vis…
caio-pizzol 4cc0127
chore: update lock
caio-pizzol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #!/usr/bin/env bash | ||
| # Add an uploaded doc to the R2 corpus registry. | ||
| # | ||
| # Usage: | ||
| # pnpm r2:sync-registry tables/cell-shading.docx | ||
| # | ||
| # Prerequisites: | ||
| # wrangler login (one-time browser auth) | ||
| # jq (brew install jq) | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| BUCKET="docx-test-corpus" | ||
| TMP_DIR="$(mktemp -d)" | ||
| REGISTRY_FILE="${TMP_DIR}/registry.json" | ||
|
|
||
| cleanup() { rm -rf "$TMP_DIR"; } | ||
| trap cleanup EXIT | ||
|
|
||
| KEY="${1:?Usage: pnpm r2:sync-registry <relative-path> (e.g. tables/cell-shading.docx)}" | ||
|
|
||
| # Download current registry | ||
| echo "Fetching registry.json..." | ||
| if wrangler r2 object get "${BUCKET}/registry.json" --remote --file "$REGISTRY_FILE" 2>/dev/null; then | ||
| echo "Found existing registry." | ||
| else | ||
| echo "No existing registry — starting fresh." | ||
| echo '{"updated_at":"","docs":[]}' > "$REGISTRY_FILE" | ||
| fi | ||
|
|
||
| # Derive fields from key | ||
| FILENAME="$(basename "$KEY")" | ||
| GROUP="$(dirname "$KEY")" | ||
| if [ "$GROUP" = "." ]; then | ||
| GROUP="" | ||
| fi | ||
| DOC_ID="$(echo "$KEY" | sed 's/\.docx$//' | tr '/' '-' | tr -c 'A-Za-z0-9._-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/^-//;s/-$//')" | ||
|
|
||
| # Update registry: add or replace entry matching this relative_path | ||
| UPDATED="$(jq \ | ||
| --arg key "$KEY" \ | ||
| --arg doc_id "$DOC_ID" \ | ||
| --arg filename "$FILENAME" \ | ||
| --arg group "$GROUP" \ | ||
| ' | ||
| .docs |= ( | ||
| [.[] | select(.relative_path != $key)] + | ||
| [{ | ||
| doc_id: $doc_id, | ||
| doc_rev: "manual", | ||
| filename: $filename, | ||
| group: (if $group == "" then null else $group end), | ||
| relative_path: $key | ||
| }] | ||
| | sort_by(.relative_path) | ||
| ) | ||
| | .updated_at = (now | todate) | ||
| ' "$REGISTRY_FILE")" | ||
|
|
||
| echo "$UPDATED" | jq '.' > "$REGISTRY_FILE" | ||
|
|
||
| DOC_COUNT="$(echo "$UPDATED" | jq '.docs | length')" | ||
| echo "Registry: ${DOC_COUNT} doc(s). Added: ${KEY} (doc_id=${DOC_ID})" | ||
|
|
||
| # Upload updated registry | ||
| echo "Uploading registry.json..." | ||
| wrangler r2 object put "${BUCKET}/registry.json" --remote --file "$REGISTRY_FILE" --content-type "application/json" | ||
| echo "Done." |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.