Repository navigation
fix: raise theme CSS limit to 100,000 characters to match T3Code - #138
Merged
Merged
Conversation
T3Code's contracts allow 100,000 characters of theme CSS since pingdotgg/t3code#37781. Match it in the contracts shim and the contributing doc, and derive the validator's over-limit self-test from the constant.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Deploying t3-themes with
|
| Latest commit: |
ee270ef
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5dd7918b.t3-themes.pages.dev |
| Branch Preview URL: | https://t3-theme-css-limit-115.t3-themes.pages.dev |
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.
Part of #115 (the CSS limit part; see below)
What was broken
The gallery rejected theme
cssover 20,000 characters. T3Code accepts up to 100,000:THEME_CSS_MAX_LENGTH = 100_000inpackages/contracts/src/server.tson pingdotgg/t3code main (checked at58a4e59, Nov 29). Themes that import fine in the app, like the 49,996-character full Dave the Viber, could not be submitted here. The value lives in our@t3tools/contractsshim, so a vendor sync never updates it.What changed
src/vendor/t3code/shims/contracts.ts:THEME_CSS_MAX_LENGTHis now100_000.docs/contributing-a-theme.md: thecssrow now says 100,000.scripts/validate-themes.ts: the self-test that hardcoded"x".repeat(20_001)now usesTHEME_CSS_MAX_LENGTH + 1, so it can't drift from the limit again.The submit form has no cap of its own. Its GitHub link already drops the prefilled contents above 8,000 characters and asks for Copy JSON instead.
Verification
Theme CSS must be text of 100000 characters or fewer.validateandcheck-csson this branch. On main it fails withTheme CSS must be text of 20000 characters or fewer./submitpage in Chromium, the probe theme shows "✓ Limit Probe is valid", offers the copy-first GitHub flow and logs no page errors.Not in this PR
The issue's second half, theme background images (
themes/<id>.jpgand--theme-background-imagein previews), is a feature that needs its own design and PR.