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

fix(playground): fix importing definition from URL #4318

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

rainum
Copy link
Contributor

@rainum rainum commented Aug 14, 2024

Description

This PR fixed an issue when after importing the file content is missing. The only thing that is displayed is the string [object ArrayBuffer].

How Has This Been Tested?

Locally.

Screenshots (if appropriate):

file_content_fix.mp4

Checklist

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.

@rainum rainum self-assigned this Aug 14, 2024
@rainum rainum requested a review from char0n August 14, 2024 11:31
@char0n
Copy link
Member

char0n commented Aug 14, 2024

Thanks @rainum. Do you think it would make sense to use File interface from apidom-reference package to abstract the conversion?

new String(File({ uri, data }));

or

new File({ uri, data }).toString()

@rainum rainum added the bug Something isn't working label Aug 14, 2024
@char0n char0n added the ApiDOM label Aug 14, 2024
@char0n char0n changed the title fix: issue with missing imported file contents fix(playground): fix importing definition from URL Aug 14, 2024
@char0n
Copy link
Member

char0n commented Aug 14, 2024

@rainum I've changed the title of the PR to fix(playground): fix importing definition from URL. We use conventional commit spec to guide you with commit messages. On top of that we have a convention that commit message SHOULD start with verb in imperative form.

@rainum
Copy link
Contributor Author

rainum commented Aug 14, 2024

Thanks @rainum. Do you think it would make sense to use File interface from apidom-reference package to abstract the conversion?

new String(File({ uri, data }));

or

new File({ uri, data }).toString()

I like the idea 👍 Let me check if it fits well

@char0n
Copy link
Member

char0n commented Aug 14, 2024

Squash + merge is a preferred way to get the PR into trunk.

@rainum
Copy link
Contributor Author

rainum commented Aug 14, 2024

It looks better now, thanks for the suggestion 👍 d98eb24

Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work!

@rainum rainum merged commit 3d32525 into main Aug 14, 2024
8 checks passed
@rainum rainum deleted the fix/swg-11690-missing-import-file-content branch August 14, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ApiDOM bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants