Skip to content

Commit 612d639

Browse files
committed
Make even unrecognized headers expandable if needed to show full length
This fixes a bug in the previous commit, where unrecognized headers were collapsed, but couldn't be expanded because there was no docs description available.
1 parent 055aa59 commit 612d639

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/components/view/http/header-details.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ const LongHeaderMarker = styled(Pill)`
8888
margin-left: 4px;
8989
`;
9090

91+
const ExpansionPlaceholder = styled.span`
92+
display: none;
93+
`;
94+
9195
const HeaderName = styled.span`
9296
margin-right: 10px;
9397
`;
@@ -194,6 +198,12 @@ export const HeaderDetails = inject('accountStore')(observer((props: {
194198
Find out more
195199
</HeaderDocsLink> }
196200
</HeaderDescriptionContainer> }
201+
202+
{ !description && value.length > LONG_HEADER_LIMIT &&
203+
// For long headers, we add a child (so that the expand button is shown) even
204+
// if there's no description, so you can expand to see everything.
205+
<ExpansionPlaceholder />
206+
}
197207
</CollapsibleSection>;
198208
}) }
199209
</HeadersGrid>;

0 commit comments

Comments
 (0)