Skip to content

Conversation

teallarson
Copy link
Collaborator

@teallarson teallarson commented Apr 30, 2025

What

closes https://github.com/airbytehq/airbyte-internal-issues/issues/12691

  • adds a bundling system to support multiple export formats
  • removes the default button, instead relying on open()
  • updates docs to give examples with different exports
  • updates dev app to use new setup (will update demo after this release goes through!)

@teallarson teallarson changed the title feat: support for multiple module formats feat: support for multiple module formats, remove default button May 7, 2025
@teallarson teallarson marked this pull request as ready for review May 7, 2025 14:56
@teallarson teallarson requested a review from girarda May 7, 2025 14:56
@teallarson
Copy link
Collaborator Author

teallarson commented May 7, 2025

@girarda: @slate71 took a peek last week and said the approach with rollup looked like the right direction. i just need someone to give this a thumbs up :)

@teallarson teallarson requested a review from slate71 May 7, 2025 14:57
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removes as much of the mocking as possible

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

multiple export formats. pairs with the rollup and package.json changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removes default button so folks will trigger it using widget.open() now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tell rollup how to bundle and export things

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

again, to support multiple export formats

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

change to support no default button

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changes to support new endpoint

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

rearranged a bit to make it clearer what is for a user VS what is for dev. also updated to give multiple usage examples.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

main change here is defining how the exports work, how unpkg/jsdelivr should find the file, etc.

Copy link
Contributor

@girarda girarda left a comment

Choose a reason for hiding this comment

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

🚢

README.md Outdated

## Usage
```html
<script src="https://unpkg.com/@airbyte-embedded/airbyte-embedded-widget"></script>
Copy link
Contributor

Choose a reason for hiding this comment

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

@teallarson do you have a recommendation between unpkg and jsdelivr?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

random google result says uage is a mix: https://w3techs.com/technologies/comparison/cd-cdnjs,cd-jsdelivr,cd-unpkg

a few results mention unpkg being slow so... perhaps jsdelivr is the right one to recommend here

cdnjs you have to manually submit your project to and may require some different configuration (i haven't looked too closely), but unpkg and jsdelivr serve from the npm registry.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated to recommend jsdelivr!


const BASE_URL = process.env.NEXT_PUBLIC_AIRBYTE_PUBLIC_API_URL || "https://local.airbyte.dev/api/public";
const AIRBYTE_WIDGET_URL = `${BASE_URL}/v1/embedded/widget`;
const AIRBYTE_WIDGET_URL = `${BASE_URL}/v1/embedded/widget_token`;
Copy link
Contributor

Choose a reason for hiding this comment

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

womp I forgot to update the dev. thank you!

@teallarson teallarson merged commit 4a1b382 into main May 7, 2025
2 checks passed
@teallarson teallarson deleted the teal/multiple-export-types branch May 7, 2025 15:57
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.

3 participants