feat(ui): add footer to the code-block component#1832
Merged
Conversation
Signed-off-by: Vladislav Schur <[email protected]>
vlad-schur-external-sap
requested review from
a team and
franzheidl
as code owners
July 24, 2026 11:36
🦋 Changeset detectedLatest commit: b6d6cec The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
3 tasks
Contributor
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a reusable footer for the CodeBlock component in @cloudoperators/juno-ui-components, and introduces a new slot prop to allow consumers to fully override the default copy bar UI.
Changes:
- Extracted the default copy bar into a new
CodeBlockFootercomponent and exported it from the CodeBlock package entry. - Added
codeBlockFooter?: ReactElementtoCodeBlockto allow replacing the default footer (taking precedence overcopy). - Added a Storybook example demonstrating a custom footer with Download + Copy actions, plus a changeset for a minor release.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-components/src/components/CodeBlock/index.ts | Exposes CodeBlockFooter via the CodeBlock barrel export. |
| packages/ui-components/src/components/CodeBlock/CodeBlockFooter.component.tsx | Introduces the extracted footer component used by CodeBlock. |
| packages/ui-components/src/components/CodeBlock/CodeBlock.stories.tsx | Adds a story demonstrating a fully custom footer override. |
| packages/ui-components/src/components/CodeBlock/CodeBlock.component.tsx | Adds codeBlockFooter slot and wires it into the render path with precedence over copy. |
| .changeset/true-pears-judge.md | Declares a minor version bump and documents the new footer/slot API. |
franzheidl
requested changes
Jul 24, 2026
Signed-off-by: Vladislav Schur <[email protected]>
Signed-off-by: Vladislav Schur <[email protected]>
franzheidl
approved these changes
Jul 24, 2026
taymoor89
approved these changes
Jul 24, 2026
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.
Summary
Added CodeBlockFooter for the CodeBlock component with new prop allowing to override the default copy prop.
Changes Made
CodeBlockFootercomponentcodeBlockFooterprops which replaces the default footerRelated Issues
CodeBlockfooter and options #1829Screenshots (if applicable)
Testing Instructions
pnpm ipnpm TASKChecklist
PR Manifesto
Review the PR Manifesto for best practises.