From ed2a5b46e1e8aa6e60581c53eb3eaf3e4f280f90 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 13:15:36 +0300 Subject: [PATCH 01/17] Zippy performance optimization --- lib/shared/components/Zippy/zippy.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/shared/components/Zippy/zippy.scss b/lib/shared/components/Zippy/zippy.scss index ac767131..23288fce 100644 --- a/lib/shared/components/Zippy/zippy.scss +++ b/lib/shared/components/Zippy/zippy.scss @@ -10,6 +10,13 @@ $zippy-info-bg-color: rgba($zippy-info-color, .08); $zippy-redirect-color: #263238; $zippy-redirect-bg-color: rgba($zippy-redirect-color, .08); +:host { + // performance optimization + transform: translate3d(0, 0, 0); + overflow: hidden; + display: block; +} + .zippy-title { padding: 10px; border-radius: 2px; From 7618507cda7219ae516d60171d0c0faf2445f64b Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 14:28:05 +0300 Subject: [PATCH 02/17] Auto expand schema with one element --- lib/components/JsonSchema/json-schema-lazy.ts | 5 +++-- lib/components/JsonSchema/json-schema.html | 4 ++-- lib/components/JsonSchema/json-schema.ts | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/components/JsonSchema/json-schema-lazy.ts b/lib/components/JsonSchema/json-schema-lazy.ts index c83be690..a7b7b2bf 100644 --- a/lib/components/JsonSchema/json-schema-lazy.ts +++ b/lib/components/JsonSchema/json-schema-lazy.ts @@ -42,6 +42,7 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit { this.initComponent(compRef.instance); this._renderer.setElementAttribute(compRef.location.nativeElement, 'class', this.location.element.nativeElement.className); compRef.changeDetectorRef.detectChanges(); + this.loaded = true; return compRef; }).catch(err => { console.log(err); @@ -55,7 +56,6 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit { if (this.pointer) { this._loadAfterSelf(); } - this.loaded = true; } // cache JsonSchema view @@ -73,7 +73,8 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit { return; } insertAfter($element.cloneNode(true), this.elementRef.nativeElement); - } ); + this.loaded = true; + }); }); } else { cache[this.pointer] = this._loadAfterSelf(); diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html index 53ffa1f9..c2b4cb1d 100644 --- a/lib/components/JsonSchema/json-schema.html +++ b/lib/components/JsonSchema/json-schema.html @@ -62,8 +62,8 @@ - - + diff --git a/lib/components/JsonSchema/json-schema.ts b/lib/components/JsonSchema/json-schema.ts index 5dabbef9..b69f4d38 100644 --- a/lib/components/JsonSchema/json-schema.ts +++ b/lib/components/JsonSchema/json-schema.ts @@ -28,6 +28,7 @@ export class JsonSchema extends BaseComponent { @Input() childFor: string; @Input() isRequestSchema: boolean; normalizer: SchemaNormalizer; + autoExpand = false; constructor(specMgr:SpecManager, private _renderer: Renderer, private _elementRef: ElementRef) { super(specMgr); @@ -100,6 +101,8 @@ export class JsonSchema extends BaseComponent { } return (propSchema && propSchema.type === 'object' && propSchema._pointer); }); + + this.autoExpand = this.properties && this.properties.length === 1; } trackByIdx(index: number, item: any): number { From 135bdbe12f56dd367dfa0e169f56ae06ddbb5444 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 14:42:49 +0300 Subject: [PATCH 03/17] Expand shevron: make clickable --- lib/components/JsonSchema/json-schema.html | 4 ++-- lib/components/JsonSchema/json-schema.scss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html index c2b4cb1d..fb532383 100644 --- a/lib/components/JsonSchema/json-schema.html +++ b/lib/components/JsonSchema/json-schema.html @@ -31,8 +31,8 @@ 'expanded': subSchema.visible }"> - - {{prop._name}} + + {{prop._name}} diff --git a/lib/components/JsonSchema/json-schema.scss b/lib/components/JsonSchema/json-schema.scss index d0eaae55..21ad874d 100644 --- a/lib/components/JsonSchema/json-schema.scss +++ b/lib/components/JsonSchema/json-schema.scss @@ -77,7 +77,7 @@ $array-marker-line-height: 1.5; border-bottom: 0; } -.param.complex > .param-name .param-name-content { +.param.complex > .param-name .param-name-wrap { font-weight: bold; cursor: pointer; } From 4cf11dceee243a7cef858f9087be5f77f91813a5 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 14:44:22 +0300 Subject: [PATCH 04/17] Fix borders rendering issues --- lib/components/JsonSchema/json-schema.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/components/JsonSchema/json-schema.scss b/lib/components/JsonSchema/json-schema.scss index 21ad874d..6691dc64 100644 --- a/lib/components/JsonSchema/json-schema.scss +++ b/lib/components/JsonSchema/json-schema.scss @@ -97,10 +97,13 @@ $array-marker-line-height: 1.5; } .params-wrap { - border-collapse: collapse; width: 100%; } +table { + border-spacing: 0; +} + .params-wrap.params-array:before, .params-wrap.params-array:after { display: block; font-weight: $base-font-weight; From ad678925f5e59f466cad955837db971a542063a8 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 14:44:59 +0300 Subject: [PATCH 05/17] Add Response Schema label --- lib/components/ResponsesList/responses-list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/ResponsesList/responses-list.html b/lib/components/ResponsesList/responses-list.html index 61394b13..7e62fb87 100644 --- a/lib/components/ResponsesList/responses-list.html +++ b/lib/components/ResponsesList/responses-list.html @@ -12,7 +12,7 @@
-
+
Response Schema
From 31e38ac7ec138aae3509a0294830129ef688847b Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 14:46:24 +0300 Subject: [PATCH 06/17] Fix crash on Firefox --- lib/components/SideMenu/side-menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/SideMenu/side-menu.ts b/lib/components/SideMenu/side-menu.ts index 6fca35fc..d48786f7 100644 --- a/lib/components/SideMenu/side-menu.ts +++ b/lib/components/SideMenu/side-menu.ts @@ -21,7 +21,7 @@ import { ScrollService, Hash, MenuService, OptionsService } from '../../services state('expanded', style({ height: '*' })), transition('collapsed <=> expanded', [ - animate(200) + animate('200ms ease') ]) ]) ], From b4a8c35be68aff5868b9fb317146690d24f91b53 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 14:47:34 +0300 Subject: [PATCH 07/17] Minor perf optimizations --- lib/shared/components/Zippy/zippy.scss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/shared/components/Zippy/zippy.scss b/lib/shared/components/Zippy/zippy.scss index 23288fce..6fe4fcba 100644 --- a/lib/shared/components/Zippy/zippy.scss +++ b/lib/shared/components/Zippy/zippy.scss @@ -13,6 +13,7 @@ $zippy-redirect-bg-color: rgba($zippy-redirect-color, .08); :host { // performance optimization transform: translate3d(0, 0, 0); + backface-visibility: hidden; overflow: hidden; display: block; } @@ -105,8 +106,5 @@ span.zippy-indicator { } .zippy-hidden > .zippy-content { - overflow: hidden; - visibility: hidden; - height: 0; - padding: 0; + display: none; } From 186ce7ab6f4913b91cdc6557fb3ac6eb658fd53e Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 15:43:17 +0300 Subject: [PATCH 08/17] Update Powered by redoc badge --- lib/components/JsonSchema/json-schema.scss | 1 + lib/components/Method/method.scss | 4 ++++ lib/components/Redoc/redoc.scss | 13 ++++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/components/JsonSchema/json-schema.scss b/lib/components/JsonSchema/json-schema.scss index 6691dc64..c78ab89a 100644 --- a/lib/components/JsonSchema/json-schema.scss +++ b/lib/components/JsonSchema/json-schema.scss @@ -80,6 +80,7 @@ $array-marker-line-height: 1.5; .param.complex > .param-name .param-name-wrap { font-weight: bold; cursor: pointer; + color: $black; } .param.complex > .param-name svg { diff --git a/lib/components/Method/method.scss b/lib/components/Method/method.scss index 75163437..75043e51 100644 --- a/lib/components/Method/method.scss +++ b/lib/components/Method/method.scss @@ -7,6 +7,10 @@ border-bottom: 1px solid rgba(127, 127, 127, 0.25); } +:host:last-of-type { + border-bottom: 0; +} + responses-list, params-list { display: block; } diff --git a/lib/components/Redoc/redoc.scss b/lib/components/Redoc/redoc.scss index dd52ca75..dcbb2bd4 100644 --- a/lib/components/Redoc/redoc.scss +++ b/lib/components/Redoc/redoc.scss @@ -142,14 +142,17 @@ api-logo { } footer { + position: relative; text-align: right; - padding: 10px; + padding: 10px 40px; font-size: 15px; - background-color: white; - + margin-top: -35px; + color: white; + a { + color: white; + } strong { - font-size: 18px; - color: $headers-color; + font-size: 18px; } } From 17dc1c46df38f749edf7d5075402640b0bd1b4ca Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 10 Jul 2016 16:05:28 +0300 Subject: [PATCH 09/17] fix tests --- lib/components/JsonSchema/json-schema-lazy.spec.ts | 6 +++++- lib/components/JsonSchema/json-schema-lazy.ts | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/components/JsonSchema/json-schema-lazy.spec.ts b/lib/components/JsonSchema/json-schema-lazy.spec.ts index d5977d50..736823f5 100644 --- a/lib/components/JsonSchema/json-schema-lazy.spec.ts +++ b/lib/components/JsonSchema/json-schema-lazy.spec.ts @@ -23,11 +23,15 @@ describe('Redoc components', () => { fixture = builder.createSync(TestAppComponent); let debugEl = getChildDebugElement(fixture.debugElement, 'json-schema-lazy'); component = debugEl.componentInstance; - spyOn(component, '_loadAfterSelf').and.stub(); + spyOn(component, '_loadAfterSelf').and.callThrough(); + spyOn(component.resolver, 'resolveComponent').and.returnValue({ then: () => { + return { catch: () => {/**/} }; + }}); }); afterEach(() => { component._loadAfterSelf.and.callThrough(); + component.resolver.resolveComponent.and.callThrough(); }); it('should init component', () => { diff --git a/lib/components/JsonSchema/json-schema-lazy.ts b/lib/components/JsonSchema/json-schema-lazy.ts index a7b7b2bf..598e489d 100644 --- a/lib/components/JsonSchema/json-schema-lazy.ts +++ b/lib/components/JsonSchema/json-schema-lazy.ts @@ -34,7 +34,7 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit { } _loadAfterSelf() { - // FIXME: get rid of DynamicComponentLoader as it is deprecated + this.loaded = true; return this.resolver.resolveComponent(JsonSchema).then(componentFactory => { let contextInjector = this.location.parentInjector; let compRef = this.location.createComponent( @@ -42,7 +42,6 @@ export class JsonSchemaLazy implements OnDestroy, AfterViewInit { this.initComponent(compRef.instance); this._renderer.setElementAttribute(compRef.location.nativeElement, 'class', this.location.element.nativeElement.className); compRef.changeDetectorRef.detectChanges(); - this.loaded = true; return compRef; }).catch(err => { console.log(err); From efa7811e747ee4ca4994077416e525567a4a7362 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 12 Jul 2016 15:11:37 +0300 Subject: [PATCH 10/17] Remove unused config --- rollup.config.js | 58 ------------------------------------------------ 1 file changed, 58 deletions(-) delete mode 100644 rollup.config.js diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index d2f27ae8..00000000 --- a/rollup.config.js +++ /dev/null @@ -1,58 +0,0 @@ -import nodeResolve from 'rollup-plugin-node-resolve'; -import commonjs from 'rollup-plugin-commonjs'; - -class RollupNG2 { - constructor(options) { - this.options = options; - } - resolveId(id, from) { - if (id.startsWith('rxjs/')) { - return `${__dirname}/node_modules/rxjs-es/${id.replace('rxjs/', '')}.js`; - } - - if(id.startsWith('@angular/core')){ - if(id === '@angular/core'){ - return `${__dirname}/node_modules/@angular/core/esm/index.js`; - } - return `${__dirname}/node_modules/@angular/core/esm/${id.split('@angular/core').pop()}.js`; - } - if(id.startsWith('@angular/common')){ - if(id === '@angular/common'){ - return `${__dirname}/node_modules/@angular/common/esm/index.js`; - } - return `${__dirname}/node_modules/@angular/common/esm/${id.split('@angular/common').pop()}.js`; - } - if(id.startsWith('@angular/platform-browser-dynamic')){ - if(id === '@angular/platform-browser-dynamic'){ - return `${__dirname}/node_modules/@angular/platform-browser-dynamic/esm/index.js`; - } - return `${__dirname}/node_modules/@angular/platform-browser-dynamic/esm/${id.split('@angular/platform-browser-dynamic').pop()}.js`; - } - if(id.startsWith('@angular/platform-browser')){ - if(id === '@angular/platform-browser'){ - return `${__dirname}/node_modules/@angular/platform-browser/esm/index.js`; - } - return `${__dirname}/node_modules/@angular/platform-browser/esm/${id.split('@angular/platform-browser').pop()}.js`; - } - } -} - -const rollupNG2 = (config) => new RollupNG2(config); -export default { - entry: './.tmp-es/index.js', - dest: 'dist/vendor.es2015.js', - format: 'iife', - moduleName: 'ReDoc', - plugins: [ - //typescript(), - rollupNG2(), - nodeResolve({ jsnext: true, main: true, browser: true }), - commonjs({ - // non-CommonJS modules will be ignored, but you can also - // specifically include/exclude files - include: 'node_modules/**', // Default: undefined - exclude: [ 'node_modules/@angular/**', 'node_modules/rxjs/**', 'node_modules/rxjs-es/**' ], // Default: undefined - namedExports: { 'marked': ['marked'] } // Default: undefined - }) - ] -} \ No newline at end of file From dcd43e4fc63733b0cd440c35a974292f903b2925 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 17:43:01 +0300 Subject: [PATCH 11/17] Discriminator support for examples (fixes #65) --- lib/components/SchemaSample/schema-sample.ts | 17 +++++++++++++++++ lib/services/schema-normalizer.service.ts | 5 +++-- lib/utils/SpecManager.ts | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/components/SchemaSample/schema-sample.ts b/lib/components/SchemaSample/schema-sample.ts index 0189643a..6a2a0d11 100644 --- a/lib/components/SchemaSample/schema-sample.ts +++ b/lib/components/SchemaSample/schema-sample.ts @@ -43,7 +43,21 @@ export class SchemaSample extends BaseComponent { if (base.examples && base.examples['application/json']) { sample = base.examples['application/json']; } else { + let selectedDescendant; + this.componentSchema = this._normalizer.normalize(this.componentSchema, this.pointer); + + let discriminator = this.componentSchema.discriminator; + if (discriminator) { + let descendants = this.specMgr.findDerivedDefinitions(this.componentSchema._pointer || this.pointer); + if (descendants.length) { + // TODO: sync up with dropdown + selectedDescendant = descendants[0]; + let descSchema = this.specMgr.byPointer(selectedDescendant.$ref); + this.componentSchema = this._normalizer.normalize(Object.assign({}, descSchema), selectedDescendant.$ref, + {omitParent: false}); + } + } if (this.fromCache()) { return; } @@ -54,6 +68,9 @@ export class SchemaSample extends BaseComponent { } catch(e) { // no sample available } + if (selectedDescendant) { + sample[discriminator] = selectedDescendant.name; + } } this.cache(sample); this.data.sample = sample; diff --git a/lib/services/schema-normalizer.service.ts b/lib/services/schema-normalizer.service.ts index a68aa343..f493c9f7 100644 --- a/lib/services/schema-normalizer.service.ts +++ b/lib/services/schema-normalizer.service.ts @@ -22,13 +22,14 @@ export class SchemaNormalizer { constructor(private _schema:any) { this._dereferencer = new SchemaDereferencer(_schema, this); } - normalize(schema, ptr) { + normalize(schema, ptr, opts:any ={}) { + opts.omitParent = opts.omitParent !== false; if (schema['x-redoc-normalized']) return schema; let res = SchemaWalker.walk(schema, ptr, (subSchema, ptr) => { let resolved = this._dereferencer.dereference(subSchema, ptr); if (resolved.allOf) { resolved._pointer = resolved._pointer || ptr; - AllOfMerger.merge(resolved, resolved.allOf, {omitParent: true}); + AllOfMerger.merge(resolved, resolved.allOf, {omitParent: opts.omitParent}); } return resolved; }); diff --git a/lib/utils/SpecManager.ts b/lib/utils/SpecManager.ts index 1f7e0017..608e55c0 100644 --- a/lib/utils/SpecManager.ts +++ b/lib/utils/SpecManager.ts @@ -124,7 +124,7 @@ export class SpecManager { if (!globalDefs[defName].allOf && !globalDefs[defName]['x-derived-from']) continue; let subTypes = globalDefs[defName]['x-derived-from'] || - globalDefs[defName].allOf.map(subType => subType.$ref); + globalDefs[defName].allOf.map(subType => subType._pointer || subType.$ref); let idx = subTypes.findIndex(ref => ref === defPointer); if (idx < 0) continue; From 3f7c3fb40d1c9a0d1350ac35326f9da1675349c6 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 17:43:23 +0300 Subject: [PATCH 12/17] Fix crash on methods with no summary, description and operationId --- lib/services/schema-helper.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/services/schema-helper.service.ts b/lib/services/schema-helper.service.ts index c0445652..7156339d 100644 --- a/lib/services/schema-helper.service.ts +++ b/lib/services/schema-helper.service.ts @@ -221,7 +221,8 @@ export class SchemaHelper { } static methodSummary(method) { - return method.summary || method.operationId || method.description.substring(0, 50); + return method.summary || method.operationId || + (method.description && method.description.substring(0, 50)) || ''; } static buildMenuTree(schema) { From 7bf8c1e85290e2a778add452829516412054aa45 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 20:20:24 +0300 Subject: [PATCH 13/17] Minor ui fix: space between range and requird --- lib/components/JsonSchema/json-schema-common.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/components/JsonSchema/json-schema-common.scss b/lib/components/JsonSchema/json-schema-common.scss index cef10416..e805e8eb 100644 --- a/lib/components/JsonSchema/json-schema-common.scss +++ b/lib/components/JsonSchema/json-schema-common.scss @@ -46,6 +46,7 @@ $sub-schema-offset: ($bullet-size/2) + $bullet-margin; border-radius: $border-radius; background-color: rgba($primary-color, .1); margin-left: 6px; + margin-right: 6px; } .param-description { From d0d4efa0a7cdfbec5914962c040aa716fb1cef2c Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 22:35:06 +0300 Subject: [PATCH 14/17] Update openapi-sampler: new formats and additionalProperties support (fixes #66) --- package.json | 10 +++++----- system.config.js | 7 ++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 08929a05..8464f0c8 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "json": "github:systemjs/plugin-json@^0.1.0", "json-pointer": "npm:json-pointer@^0.3.0", "json-schema-ref-parser": "npm:json-schema-ref-parser@^3.1.2", - "openapi-sampler": "npm:openapi-sampler@0.2.0", + "openapi-sampler": "npm:openapi-sampler@^0.3.0", "prismjs": "npm:prismjs@^1.3.0", "remarkable": "npm:remarkable@^1.6.2", "rxjs": "npm:rxjs@5.0.0-beta.6", @@ -60,10 +60,6 @@ "systemjs/plugin-json": "github:systemjs/plugin-json@^0.1.0" }, "overrides": { - "npm:openapi-sampler@0.2.0": { - "main": "src/openapi-sampler", - "format": "esm" - }, "npm:dropkickjs@2.1.8": { "format": "global" }, @@ -72,6 +68,10 @@ "http": "stream-http", "https": "stream-http" } + }, + "npm:openapi-sampler@0.3.0": { + "main": "src/openapi-sampler", + "format": "esm" } } }, diff --git a/system.config.js b/system.config.js index c91cace9..f6dd3dcd 100644 --- a/system.config.js +++ b/system.config.js @@ -19,8 +19,8 @@ System.config({ "@angular/common": "npm:@angular/common@2.0.0-rc.4", "@angular/compiler": "npm:@angular/compiler@2.0.0-rc.4", "@angular/core": "npm:@angular/core@2.0.0-rc.4", - "@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic@2.0.0-rc.4", "@angular/platform-browser": "npm:@angular/platform-browser@2.0.0-rc.4", + "@angular/platform-browser-dynamic": "npm:@angular/platform-browser-dynamic@2.0.0-rc.4", "babel": "npm:babel-core@5.8.34", "babel-runtime": "npm:babel-runtime@5.8.34", "clean-css": "npm:clean-css@3.4.17", @@ -33,7 +33,7 @@ System.config({ "json-formatter-js": "npm:json-formatter-js@0.2.0", "json-pointer": "npm:json-pointer@0.3.0", "json-schema-ref-parser": "npm:json-schema-ref-parser@3.1.2", - "openapi-sampler": "npm:openapi-sampler@0.2.0", + "openapi-sampler": "npm:openapi-sampler@0.3.0", "prismjs": "npm:prismjs@1.3.0", "remarkable": "npm:remarkable@1.6.2", "rxjs": "npm:rxjs@5.0.0-beta.6", @@ -654,9 +654,6 @@ System.config({ "process": "github:jspm/nodelibs-process@0.1.2", "util": "github:jspm/nodelibs-util@0.1.0" }, - "npm:openapi-sampler@0.2.0": { - "process": "github:jspm/nodelibs-process@0.1.2" - }, "npm:os-browserify@0.1.2": { "os": "github:jspm/nodelibs-os@0.1.0" }, From 8b20b083ea64c01ba6285b4b3bdf66a563f47a50 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 23:28:51 +0300 Subject: [PATCH 15/17] Fix dropdown UI issue (fixes #64) --- lib/shared/components/DropDown/drop-down.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/shared/components/DropDown/drop-down.scss b/lib/shared/components/DropDown/drop-down.scss index 93f6721c..7143c9e8 100644 --- a/lib/shared/components/DropDown/drop-down.scss +++ b/lib/shared/components/DropDown/drop-down.scss @@ -17,7 +17,7 @@ .dk-selected { color: $secondary-color; border-color: rgba($secondary-color, .5); - padding: 0.15em 0.6em 0.2em 0.5em; + padding: 0.15em 1.5em 0.2em 0.5em; border-radius: $border-radius; } @@ -52,7 +52,9 @@ margin-top: 0.2em; padding: 0; border-radius: $border-radius; - box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.08) !important + box-shadow: 0px 2px 4px 0px rgba(34, 36, 38, 0.12), 0px 2px 10px 0px rgba(34, 36, 38, 0.08) !important; + right: auto; + min-width: 100%; } .dk-option { From da9b4ab0b157aba7cbc58ed16f94c0f59c28151c Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 23:44:42 +0300 Subject: [PATCH 16/17] Dropdown overflow fix --- lib/components/JsonSchema/json-schema.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/components/JsonSchema/json-schema.scss b/lib/components/JsonSchema/json-schema.scss index c78ab89a..298beb10 100644 --- a/lib/components/JsonSchema/json-schema.scss +++ b/lib/components/JsonSchema/json-schema.scss @@ -69,6 +69,10 @@ $array-marker-line-height: 1.5; } } +zippy { + overflow: visible; +} + .zippy-content-wrap { padding: 0; } From 41dcaaafd0e4ee37f9018bd4f885c5e552617eda Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 23:53:39 +0300 Subject: [PATCH 17/17] v0.15.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8464f0c8..5a2a3798 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "redoc", "description": "Swagger-generated API Reference Documentation", - "version": "0.15.2", + "version": "0.15.3", "repository": { "type": "git", "url": "git://github.com/Rebilly/ReDoc"