Commit Graph

91 Commits

Author SHA1 Message Date
Matt Schwartz
da5935ea33 fix(style): prevent operationId from wrapping when space is available (#10259) 2025-04-07 08:01:33 +02:00
Vladimír Gorej
80d56c9518 feat: apply cumulative update to address various issues (#10324) 2025-02-27 11:12:42 +01:00
Vladimír Gorej
ac0d2a3cc8 refactor(syntax-highlighting): use component wrapping for syntax highlighting activation (#9784) 2024-04-06 00:16:00 +02:00
Will McNamara
6dbcd45e66 feat(style): add max-height for curl example (#9179) 2024-03-07 14:24:46 +01:00
Pavel Rosický
2a2956f55f fix(style): incorrect usage of justify-content property in Authorize button wrapper (#9421)
Co-authored-by: Oliwia Rogala <oliwia.rogala@smartbear.com>
2024-02-15 14:40:56 +01:00
Vladimír Gorej
748dec193d fix(styles): fix regressions in operations on smaller screens (#9425)
Refs #8940
2023-12-14 10:57:44 +01:00
Ochuko Pedro
8f93354c81 fix(styling): ensure authorize button stays on the right (#9387)
Refs #8940 
Refs #9325
2023-11-20 13:00:21 +01:00
Ochuko Pedro
e34d8fb874 fix(styling): make Operations more responsive on smaller screens (#9325)
Along with the operations, Topbar and Authorization button
has been made more responsive as well.

Refs #8940
2023-11-10 18:17:05 +01:00
Aleksandr Vladykin
c90ef50e73 fix(ui): make download button accessible via keyboard (#8974)
Refs #8881
2023-08-16 17:06:50 +02:00
Fabian Schneider
6ae2693d47 feat: Render external docs links and descriptions (#7559)
Co-authored-by: Tim Lai <timothy.lai@smartbear.com>
2022-08-17 10:42:36 -07:00
yzhe819
c36f240e47 fix(ux): responsive ui display (#8132)
* fix: responsive operation

* fix: responsive tag display

* fix: responsive content type selector

* fix: input display

* fix: width of server selector
2022-08-01 14:11:47 -07:00
Tomas Bruckner
0d5227bb5d feat(ux): add copy to clipboard to operation summary (#8094) 2022-07-18 10:48:57 -07:00
GhBogdan97
a5aca55f58 fix(css): update flex and overflow properties on tags (#7566)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
2022-03-10 12:40:26 -08:00
GhBogdan97
f5b0446992 fix(ui): eliminate copy button icon misaligned in Firefox (#7542)
Closes #7481
2021-10-19 20:54:43 +03:00
twjasa
fc7cdb8bad fix(UI): correct width of HTTP request method names (#7527)
Closes #7479
2021-09-30 20:43:43 +03:00
Dominik Henneke
ff5deb3613 fix(ux): update the buttons of the example tabs to be displayed as links (#7517)
Fixes small visual regression introduced in #7464.

Refs #7464
2021-09-21 15:09:46 +03:00
Helen Kosova
cc700f034b fix(try-it-out): fix the width of image responses (#7495)
Refs #5578
2021-09-15 13:25:51 +03:00
Tim Lai
14be45db3c fix(try-it-out): button and inner text spacing (#7357) 2021-06-21 10:34:46 -07:00
iron
9f62154d06 fix: download button width (#7230) 2021-05-12 10:22:11 -07:00
Mahtis Michel
072362244a fix(ui): prevent example select from overflowing (#7060) 2021-03-10 14:07:32 -08:00
Mahtis Michel
e877580d54 feat(ux): enhance media-type switching experience in RequestBodyEditor (#6837)
* feat(ux): enhance media-type switching experience in RequestBodyEditor

1. When canceling the try-out mode the request body will be reset to its initial state.
2. When the user switches the media-type in the try-out mode, the experience is as follows:
   - If the user did edit the request body the body wont be touched and only media type is updated. This is to ensure that user content is NEVER accidentally overwritten with a default value.
   - If the user did not edit the request body it is safe to be replaced by the default value of the target media-type.

Multiple example needed some care in order to allow the retain example value to function properly

* fix(test): workaround cypress issue that can't be reproduced manually

* test: added new feature to ensure enhanced user editing flow

Signed-off-by: mathis-m <mathis.michel@outlook.de>
2021-01-25 11:16:07 -08:00
Mahtis Michel
7087210adb fix(style): code should should wrap line (#6831)
* fix(style): code should should wrap line

this time in correct place

* revert(#6764): reverted wrongly placed css
2021-01-14 10:11:03 -08:00
Mahtis Michel
85a3ec983e fix(style): response data flows off the screen (#6764) 2021-01-04 10:44:48 -08:00
David Goss
cfede146ff fix(style): make paths try to stay on single line in opblock (#6243) 2020-07-29 13:30:20 -07:00
Tim Lai
a73783b73d feat: syntax highlighting of code section (#6236)
Co-authored-by: AdrieanKhisbe <adriean.khisbe@live.fr>
2020-07-17 15:29:15 -07:00
tomdegoede
fc3ed30f3d improvement: Move inline styles to SCSS instead (#5578)
* fix: convert propStyle to propClass
2020-06-10 16:39:48 -07:00
Jamie Peabody
e8266a3c6d fix: code highlight styles are now only applied pre.microlight (#5673)
* patch(#5672): code highlight styles are now only applied to pre blocks that have the class pre.microlight

* fixed pre style appied to .request-url

* fixed response-headers and request-duration pre blocks

* made pre.microlight class as per review

* added microlight class to appropriate pre and added tests
2019-11-03 20:46:38 -05:00
kyle
23d7260f92 feat: Multiple Examples for OpenAPI 3 Parameters, Request Bodies, and Responses (via #5427)
* add opt-in Prettier config

* remove legacy `examples` implementation

* create ExamplesSelect

* support `Response.examples` in OpenAPI 3

* create response controls group

* prettier reformat

* prepare to break up Parameters

* reunify Parameters and OAS3 Parameters

* Parameter Examples

* Example component

* handle parameter value stringification correctly

* FOR REVIEW: add prop for controlling Select

* use regular header for param examples in Try-It-Out

* manage active examples member via Redux

* Request Body Try-It-Out examples

* remove special Response description styling

* omit Example value display in Try-It-Out

* support disabled text inputs in JsonSchemaForm

* Example.omitValue => Example.showValue

* ExamplesSelectValueRetainer

* styling for disabled inputs

* remove console.log

* support "Modified Values" in ExamplesSelect

* remove Examples component
(wasn't used anywhere)

* use ParameterRow.getParamKey for active examples member keying

* split-rendering of examples in ParameterRow

* send disabled prop to JsonSchemaForm

* use content type to key request body active examples members

* remove debugger

* rewire RequestBodyEditor to be a controlled component

REVIEW: does this have perf implications?

* trigger synthetic onSelect events in ExamplesSelect

* prettier updates

* remove outdated Examples usage in RequestBody

* don't handle examples changes in ESVR

* make RequestBodyEditor semi-controlled

* don't default to an empty Map for request bodies

* add namespaceKey to ESVR for state mgmt

* don't key RequestBody activeExampleKeys on media type

* tweak ESVR isModifiedValueSelected calculation

* add trace class to ExamplesSelect

* remove usage of ESVR.currentNamespace

* reset to first example if currentExampleKey is invalid

* add default values to RequestBody rendering

* stringify things in ESVR

* avoid null select value (silences React warning)

* detect user inputs that match any examples member's value

* add trace class for json-schema-array

* shallowly convert namespace state, to preserve Immutable stucts in state

* stringify RBE values; don't trim JSON in editor

* match user input to an example when non-primitives are expressed in state as strings

* update Cypress

* don't apply sample values in JsonSchema_Object

* support disabling all JsonSchemaForm subcomponents

* Core tests

* style changes to accomodate Examples

* fix version-checking error in Response

* disable SCU for Responses

* don't stringify Select values

* ModelExample: default to Model tab if no example is available; provide a default no example message

* don't trim JSON ParamBody inputs

* read directly from 2.0 Response.schema instead of inferring a value

* show current Example information in RequestBody

* show label for Examples dropdown by default

* rework Response content ordering

* style disabled textareas like other read-only blocks

* meta: fix sourcemaps

* refactor ESVR setNameForNamespace

* protect second half of ternary expession

* cypress: `select.examples-select` => `.examples-select > select`

* clarify ModelExample.componentWillReceiveProps

* add gates/defaults to prevent issues in very bare-boned documents

* fix test block organization problem

* simplify RequestBodyEditor interface

* linter fixes

* prettier updates

* use plugin system for new components

* move ME Cypress helpers to other file
2019-06-29 19:52:51 +01:00
kyle
291e2c7251 improvement: operation path + summary overflow styling (via #5184)
* improvement: operation path + summary overflow styling

* inject zero-width spaces for better path breaking

* migrate 4867 regression test to tolerate new ZWSPs

* rm `dev-helpers/doc.yaml`
2019-02-15 20:05:26 -06:00
Sullivan SENECHAL
88e2c9af54 fix: apply css only on first child label and span for section header (via #4970) 2018-11-24 00:16:49 +01:00
Jennifer Kaplan
aec4e378ce housekeeping: remove Topbar CWM & unneeded empty lines (via #5018)
* removed componentWillMount and removed unneeded empty lines

* saved file again
2018-11-12 14:28:28 +01:00
kyle
c5c4e08368 improve: nest Servers within Schemes container (via #4911)
* improve: nest Servers within Schemes container

* linter fixes
2018-09-28 20:33:06 -05:00
Andreas Lind
f1224e5196 fix: remove remaining reference to Titillium webfont (via #4840)
Follow up to #4598
2018-09-06 14:18:51 -07:00
geraldglynn
cb2fc2089c improvement: move operation JumpToPath (via #4760) 2018-08-08 14:10:48 -07:00
Yuanhai He
8cde08bd83 improvement: allow viewing model when Try-It-Out is enabled (via #4723) 2018-07-26 17:47:41 -07:00
kyle
a03c12786a feat(rendering): gate rendering based on valid version identifiers (#4614)
* create VersionPragmaFilter component

* use VersionPragmaFilter in BaseLayout

* tighten version idenitifier constraints

* handle case where user specifies a valid `swagger` and `openapi` field

* add traceable class names for each message

* add tests

* linter fixes!

* UNRELATED CHANGE: remove travis short-circuit

* add bypass switch to VersionPragmaFilter
2018-06-01 16:04:27 -07:00
kyle
9a121ea445 fix: attempt to display Blob response bodies as text (#4437)
* fix: attempt to display Blob response bodies as text

... if nothing else works.

* correctly pass `prevProps.content` to updateParsedContent

* remove debugger statement

* caniuse `Blob` && `FileReader`? yes.

Blob: https://caniuse.com/#search=Blob
FileReader: https://caniuse.com/#search=filereader
2018-04-13 16:16:54 -07:00
Giancarlo Klemm Camilo
2795518340 enhance: scrollable + downloadable HighlightCode (#4397)
* Auto hidding content that is longer than 600 characters long.

* Added basic downloading

Slightly broken

* Better downloading

now downloads file on button click

* Fix the angry linter

* Fix dist

* Removed collapsing, added scrolling.

* Code clean up.

* CSS fix.

* prevent HighlightCode from scrolling entire document

* center "Download" text in button

* `this.downloadJSON` -> `this.downloadText`

we're always saving as `.txt`, so JSON is a misnomer

* hide Download button behind option `downloadable` prop

* `file-saver` -> `js-file-download`
2018-04-12 18:18:49 -07:00
kyle
ba1603a7e2 improve: lazy resolver (#4253)
* default to empty `ImmutableMap` when grabbing op metadata
* pass `errors` into JsonSchema components
* Account for Immutable data structure in JavaScriptonSchema...
...and create empty Lists instead of Maps by default.
* Pass ImmutableList through to JsonSchema child components
* Add lazy resolving spec state extensions
* TEMPORARY: disable conventional resolved spec
* WIP
* Use resolveSubtree in Operation display
* Freebie: short-circuit Markdown component if it is given plaintext
* NEW DEFAULT BEHAVIOR: `defaultModelsExpandDepth: 1` does not expand individual models
* Render faked Model expander to trigger resolution
* Baseline support for Editor lifecycles
* Display operation summaries before the operation is resolved
* Test migrations
* WIP
* Swagger2 TIO Body params
* a bit of cleanup
* Debounce string param inputs
* Reach into unresolved operation for deprecated flag, if available
* Fire subtree request outside of render
* Remove debugging flags
* Fix logical errors in spec statePlugins
* TODOs become TODONEs!
* Migrate deeplinking feature to non-resolved spec action
* ESLint fixes
* Reduce action dispatch volume; run resolver on next tick
* Batch resolver requests; use batch progressive results in later iterations
* Add loading states to Model and Operation views
* Preserve object order; remove dupl. import; add warning for action
* LINTER!
* Use require to load SVG
       Works around Webpack weirdness
2018-02-23 22:25:28 -08:00
Andrew Luca
e531c40356 fix(styles): stop wrapper from overflowing on smaller devices (#4121)
When using `swagger-ui` for consumption by JavaScript web projects
that include module bundlers, instead of `swagger-ui-dist`
there is no `box-sizing: border-box` on `.wrapper`
and it's width overflows because of additional `padding: 0 20px`
2018-01-19 13:54:01 -06:00
Juan J. Jimenez-Anca
bd41b736a8 feat: display last error when definition/config load fails
Contains a breaking internal API change to `errActions.newThrownErr`, which will require a MINOR version bump. Swagger-Editor does not depend on the old usage style.
2018-01-05 21:45:21 -06:00
Kyle Shockey
00f4fb3326 Add margin to loading container 2017-12-12 13:25:36 -08:00
Kyle Shockey
0864ca849f Use throbber in Standalone layout; center loading messages and content 2017-12-12 13:07:18 -08:00
Kyle Shockey
ef3ccd7a23 Move server styles into its own scss file; add a little polish 2017-11-30 17:06:17 -08:00
Kyle Shockey
0997c5e5d4 Remove hardwired "Server" header, make global one prettier 2017-11-30 14:34:01 -08:00
Kyle Shockey
e5b2193708 Fix Callback Response markdown styling 2017-11-17 22:59:20 -08:00
Hugo Ferrando Seage
3139f3a9d7 Change color of <th>'s border-bottom elements in markdown content 2017-11-14 17:36:06 +01:00
Owen Conti
4b6a89dd53 Fixes #3897 - Change color of <th> elements in markdown content. 2017-11-13 17:29:05 -07:00
Stuart Nichols
1a02364c2f Replace color values with variables for easier theming
Replaced all color values with variables in scss files and
added associated variables to _variables.scss file
2017-11-02 11:50:33 +00:00
Ron
d953b7790d Merge branch 'master' into master 2017-10-20 16:54:03 -07:00