fix: default suite meta blocks to compact (reading) view#70
Merged
Conversation
…elds The compact view started expanded whenever the summary was empty (summaryText.length === 0). Suite blocks typically carry a seeded field with no value yet (e.g. `emoji:`), which produces an empty summary, so they always rendered expanded while test blocks (which have populated fields) collapsed. Base the default on whether the block has any fields at all instead of whether it has a non-empty summary: any block with fields starts compact (suites included), and only a genuinely empty block stays expanded so it's immediately editable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploying blocks with
|
| Latest commit: |
7b88f0e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://30f80abe.blocks-cno.pages.dev |
| Branch Preview URL: | https://feat-testmeta-suite-compact.blocks-cno.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.
Problem
Test meta blocks render compact, but suite blocks stay expanded (see screenshot below). The compact view defaulted to expanded whenever the summary line was empty:
summaryTextis built only from fields that have a value. Suite blocks commonly carry a seeded field with no value yet (e.g.emoji:), so their summary is empty and they always rendered expanded — while test blocks (populatedtype/priority/creator) collapsed.Fix
Base the collapsed-by-default decision on whether the block has any fields, not on whether it has a non-empty summary:
expandedremains UI-only state).Testing
tsc -b— cleannpm run test:run— 175 passednpm run build:package— succeeds🤖 Generated with Claude Code