-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Summary
Minor improvements to the CodeBlock component.
Improvements
2. Array index as key in token rendering
Both line and token maps use array index as key. For stable rendering, this is acceptable for static content but could cause issues with dynamic content updates.
3. maxLines off-by-one compensation
The context adds +1 to maxLines ("to compensate for the absolute collapse trigger"). This leaks implementation detail into the API — consumers pass maxLines={5} but 6 lines are stored internally.
4. Sub-pixel border value
Uses border: 0.5px solid in header and collapse trigger styles.
Moved to Cross-Cutting Issues
The following items have been moved to cross-cutting issues that address them across all components:
- Remove !important declarations (Remove !important declarations from component CSS #678)
Reactions are currently unavailable