Commit Graph

30 Commits

Author SHA1 Message Date
Giles Wells
72811bd827 feat: Accessibility improvements (#7224)
* feat: adds a11y for ContentType & Responses region

* feat: adds a11y to expandable/collapsible elements

* fix: add aria label to select element for content types

* fix: add aria label prop to contentType component

* Change optag to h3 for better tag hierarchy


Co-authored-by: ediiotero <eddie.otero@oddball.io>
Co-authored-by: Mike Lumetta <mike.lumetta@adhocteam.us>
Co-authored-by: Alexander Valencia <alex.valencia@adhocteam.us>
2021-05-12 09:40:31 -07:00
Giles Wells
4abbc62b87 fix: add aria label to select element for content types (#7133)
Co-authored-by: ediiotero <eddie.otero@oddball.io>
Co-authored-by: Mike Lumetta <mike.lumetta@adhocteam.us>
2021-03-31 08:25:24 -07:00
thierrydallacroce
0b3489b52d fix: remove .col class that causes collision with Bootstrap (via #5541)
* improvement: address Bootstrap conflict by removing our .col class (#4574)

* use `.parameters-col_description` selector in Cypress tests
2019-08-20 19:51:45 -07: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 Shockey
9bad35ed85 Refactor specPath to Im data structures to avoid waste renders 2017-12-28 18:04:12 -06:00
kyle
bfb4c7a8d7 Merge branch 'master' into feature/spec-path 2017-12-07 16:49:34 -08:00
Kyle Shockey
0ef0613020 Remove Response update logic; dispatch changeProducesValue correctly 2017-11-16 22:25:19 -08:00
Josh Ponelat
91d4ab96d7 partial specPath changes 2017-11-03 17:50:46 +02:00
Owen Conti
b15942dfe1 Merge branch 'ft/performance' of github.com:swagger-api/swagger-ui into ft/performance
# Conflicts:
#	src/core/components/responses.jsx
2017-10-22 12:55:51 -06:00
kyle
263f6feb2f Merge branch 'master' into ft/default_model_rendering 2017-09-29 13:29:04 -07:00
Owen Conti
6f98fa9f3b Fixes after merge with ft/3584 branch 2017-09-15 22:31:02 -06:00
Owen Conti
f4efae0145 Merge branch 'ft/performance' into ft/3598-responses-shouldComponentUpdate
# Conflicts:
#	src/core/components/operation.jsx
#	src/core/components/operations.jsx
#	src/core/components/response.jsx
#	src/core/components/responses.jsx
2017-09-15 22:30:23 -06:00
Owen Conti
9f5a307fce Merge branch 'ft/performance' into ft/3584-operation-container-component
# Conflicts:
#	src/core/components/operation.jsx
#	src/core/components/operations.jsx
#	src/core/components/responses.jsx
2017-09-15 22:03:14 -06:00
Kyle Shockey
ef8b37a580 LINTING! 2017-09-15 20:17:35 -07:00
Kyle Shockey
277cc81a8c OAS3 Accept header control: State-side 2017-09-12 19:39:52 -07:00
Kyle Shockey
26edaa5f0b OAS3 Accept header control: Component-side 2017-09-12 17:22:51 -07:00
Mike Gilbode
d7ae284a0c Add defaultModelRendering parameter. 2017-08-30 23:30:57 -04:00
Owen Conti
cfb4625eb0 Add shouldComponentUpdate to response.jsx and live-response.jsx. Remove isShownKey from shouldComponentUpdate of OperationContainer. Moved response and request out to separate props for operation.jsx. Removed unused request prop from responses.jsx. 2017-08-20 18:50:49 -06:00
Owen Conti
bcefb6eb3e Convert pathMethod prop to two separate props. 2017-08-20 15:25:13 -06:00
Owen Conti
2946baf2bd Merge branch 'master' into ft/3584-operation-container-component 2017-08-20 08:07:15 -06:00
Owen Conti
dd414534f9 Update Operation component to be dumb, update responses to accept Immutable prop types 2017-08-20 07:56:40 -06:00
Mike Gilbode
087ed20384 Add support for requestInterceptor / responseInterceptor.
- Display mutated requests from request interceptor in curl output in UI.
  Put this behind showMutatedRequest flag so that the mutation can be
  silent.
- Document requestInterceptor, responseInterceptor and showMutatedRequest
  in README.md
- Add tests
2017-08-13 01:14:41 -04:00
Kyle Shockey
9bb0cd7689 Correct funky CSS for links 2017-08-08 19:20:28 -07:00
Kyle Shockey
4e80e292b2 Merge branch 'master' into ft/oas3 2017-07-04 23:50:00 -07:00
Kyle Shockey
109027935f Hide main Responses ContentType picker for OAS3 2017-07-02 23:16:26 -07:00
shockey
b72aa3a7c8 Merge branch 'master' into webpack-migration-2.x 2017-06-29 18:23:36 -07:00
RVKen
d36f0a6dbd fix eslint issues 2017-06-29 04:37:19 +02:00
Owen Conti
0c6f5e8d32 Add displayRequestDuration configuration option. 2017-06-26 21:13:17 -06:00
Kyle Shockey
9dc9a857b7 Squash commit: Links reimplementation; OAS interface improvements 2017-06-16 00:29:23 -07:00
Ron
f22a628934 in with the new 2017-03-17 21:17:53 -07:00