Skip to content

Commit

Permalink
Merge pull request #239 from Authress-Engineering/improve-copy-display
Browse files Browse the repository at this point in the history
Fix copy button sizing in syntax toolbar.
  • Loading branch information
wparad authored Feb 19, 2024
2 parents d51be81 + 9209712 commit 710ba83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This package follows standard semvar, `<major>.<minor>.<build>`. No breaking cha
* The `table` view is now the default as the `tree` view becomes deprecated. To display the `tree` view, use the `tree` attribute on the openapi-explorer html element.
* Handle invalid JSON parsing in request bodies
* Fix the request body that keeps changing preventing editing of it.
* Set min height on syntax rendering to be 2rem, so that the copy button always fully shows correctly.

## 2.1
* Add `x-locale` vendor extension to specify the locale of the spec.
Expand Down
2 changes: 1 addition & 1 deletion src/components/api-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ export default class ApiRequest extends LitElement {
<syntax-highlighter language="http" .content="${this.responseHeaders}"/>
</div>
<div class="tab-content m-markdown col" style="flex:1;display:${this.activeResponseTab === 'curl' ? 'flex' : 'none'};">
<syntax-highlighter class="fs-exclude" data-hj-suppress data-sl="mask" language="shell" .content="${curlSyntax.trim()}"/>
<syntax-highlighter language="shell" .content="${curlSyntax.trim()}"/>
</div>
</div>`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/syntax-highlighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class SyntaxHighlighter extends LitElement {
* @returns Content
*/
renderCopyWrapper(content) {
return html`<div>
return html`<div class="fs-exclude" data-hj-suppress data-sl="mask" style="min-height: 2rem;">
<button
class="m-btn outline-primary toolbar-copy-btn"
@click='${this.copyToClipboard}'
Expand Down

0 comments on commit 710ba83

Please sign in to comment.