Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide missing validator image #4287

Merged
merged 3 commits into from
Mar 7, 2018
Merged

Hide missing validator image #4287

merged 3 commits into from
Mar 7, 2018

Conversation

heldersepu
Copy link
Contributor

@heldersepu heldersepu commented Mar 4, 2018

Motivation and Context

Fixes #4234

How Has This Been Tested?

Tested with a custom css:
http://swagger-net-test.azurewebsites.net/swagger/ui/index

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@webron webron requested a review from shockey March 5, 2018 18:53
@shockey
Copy link
Contributor

shockey commented Mar 7, 2018

thanks @heldersepu!

i modified the PR to actually not render the <img alt="Loading..." /> content at all, as opposed to taking the time to render it and then hiding it with CSS 😄

@shockey shockey merged commit 6ba93ad into swagger-api:master Mar 7, 2018
shockey pushed a commit to scottohara/swagger-ui that referenced this pull request Mar 12, 2018
* hide missing validator image

* Render nothing if validator badge has not loaded/received errors

* Revert style changes
shockey pushed a commit that referenced this pull request Mar 12, 2018
* improve: show possible reasons when url fetch fails
* Only check for fail reasons if no HTTP status code
* Check for mixed content errors first
* Harmonise error messages
* Set error source to 'fetch'
* improve: hide loading validator image (#4287)
* hide missing validator image
* Render nothing if validator badge has not loaded/received errors
* Revert style changes
* Allow images with data scheme (#4305)
* Add UnitTest for image
allows image elements with https scheme
* Test images with data scheme
* Add allowedSchemesByTag
* Fix error  Strings must use doublequote  quotes
* Add empty div (#4236)
if there are properties show an empty div
* v3.12.1 (#4311)
* v3.12.1
* Rebuild dist for v3.12.1
* Use window wrapper instead of direct reference
* Add trailing period to error messages
* improve readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Online validator badge missing image
2 participants