Skip to content

Fix narrow code editor width issue in Label component demos#4793

Closed
nicolethoen wants to merge 1 commit into
patternfly:mainfrom
nicolethoen:fix-issue-4777-label-code-editor-width
Closed

Fix narrow code editor width issue in Label component demos#4793
nicolethoen wants to merge 1 commit into
patternfly:mainfrom
nicolethoen:fix-issue-4777-label-code-editor-width

Conversation

@nicolethoen
Copy link
Copy Markdown
Collaborator

Summary

  • Fixes narrow code editor width issue on Label component React demos page
  • Ensures the .ws-code-editor element takes full width of its container
  • Adds CSS rules to override any restrictive width constraints

Changes

  • Added CSS rules to set width: 100% and max-width: none for .ws-code-editor
  • Added specific rule for nested .pf-v6-c-code-editor to ensure full width
  • Applied changes to packages/documentation-framework/components/example/example.css

Test plan

  • Build the project successfully (yarn build)
  • Verify CSS changes are applied to the documentation framework
  • Manually test on Label component React demos page to confirm wider code editor
  • Check that other component demo pages are not adversely affected

Fixes #4777

🤖 Generated with Claude Code

Fixes code editor width issue on Label component React demos page by ensuring
the .ws-code-editor element takes full width of its container.

Fixes patternfly#4777

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@patternfly-build
Copy link
Copy Markdown
Collaborator

patternfly-build commented Sep 18, 2025

Preview: https://pf-org--pr-4793-site.surge.sh

Copy link
Copy Markdown
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

This is one way to fix it, but IMO the issue is that the main content area's width is defined by the width of the content and not a consistent width. I think it should be a consistent width, regardless the size of components and docs and stuff in the main content area.

You can see here that the width of the main content is max-width: min(100%, 825px), which effectively means width: 100%; max-widht: 825px;.

That would look a lot better if it were width: 825px; max-width: 100%;, or width: min(100%, 825px)

Also this may overlap with changes @srambach is making in #4802

This is what it would look like with the suggestion above
Screenshot 2025-09-30 at 2 24 32 PM

@nicolethoen nicolethoen closed this Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - Label - Code editor is too small

3 participants