Skip to content

Conversation

@sfc-gh-dmatthews
Copy link
Contributor

📚 Context

🧠 Description of Changes

Current:

Insert screenshot of existing UI/code here

Revised:

Insert screenshot of your updated UI/code here

💥 Impact

Size:

  • Small
  • Not small

🌐 References

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-dmatthews
Copy link
Contributor Author

sfc-gh-dmatthews commented Dec 14, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sfc-gh-dmatthews sfc-gh-dmatthews force-pushed the 12-14-feature_code-block-language-header branch from 687d1c2 to f50584c Compare December 17, 2025 07:30
@sfc-gh-dmatthews sfc-gh-dmatthews marked this pull request as ready for review December 17, 2025 15:35
}

.Container section :global(.code-block-header) {
@apply hidden !important;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is there a way to do this without the !important?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I struggled to get this apply. I tried hiding it at different levels, using different selectors, but had to end up with !important, but I could have missed something.

Copy link

@sfc-gh-nbellante sfc-gh-nbellante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sfc-gh-dmatthews sfc-gh-dmatthews added the javascript Pull requests that update Javascript code label Dec 18, 2025

const Header = (
<div className={classNames(styles.Header, "code-block-header")}>
{showLanguage && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: If showLanguage is false, then it looks like Header will just be a blank div with a height of 2.5rem. Is that expected?

Copy link
Contributor Author

@sfc-gh-dmatthews sfc-gh-dmatthews Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copy button should still be visible. (After the feature is merged, this should be a rare case because I will update the docs. IIRC, I will only use "None" for directory structures or text files, and I will add a "Directory structure" description or "requirements.txt" in those instances, which is the next PR.)

For example, this is a "None" example that will have a description enabled in the next PR.
image

@sfc-gh-dmatthews sfc-gh-dmatthews merged commit ea1093b into fix/code-block-copy Dec 19, 2025
@sfc-gh-dmatthews sfc-gh-dmatthews deleted the 12-14-feature_code-block-language-header branch December 19, 2025 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants