fix(style): do not shrink operationId if there is sufficient space #10259
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.
Description
One-line change. Update the style of
opblock-summary-path-description-wrapper
, replacingwidth: 100%
withflex-grow: 1
.Motivation and Context
When the operationId is visible (
displayOperationId
is set totrue
), it wraps to a second line even if there is extra space available. This is becauseopblock-summary-path-description-wrapper
has its width set to 100%, which means it tries to take up the entire flex container, causing itself andopblock-summary-operation-id
to shrink. Usingflex-grow: 1
will allow the path/description wrapper to take up the remaining space without shrinking anything.Fixes #9577
How Has This Been Tested?
Tested by resizing the viewport to small sizes.
Screenshots (if appropriate):
Before (
width: 100%
):After (
flex-grow: 1
):If the description wraps, the operationId will also wrap, even though there appears to be enough space. This is still an improvement over the prior behavior of always wrapping.
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests
Note on the last checkbox: The test
should display link to external docs without description
fromfeatures/external-docs.cy.js
is failing for me, but that was failing before this change.