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

chore: update embedded widget codebase #2707

Merged
merged 6 commits into from
Jun 22, 2023
Merged

chore: update embedded widget codebase #2707

merged 6 commits into from
Jun 22, 2023

Conversation

shoom3301
Copy link
Collaborator

Summary

  1. Added the latest features of the Widget
  2. Added serve configuration for Vite

@shoom3301 shoom3301 requested a review from anxolin June 22, 2023 07:42
@shoom3301 shoom3301 self-assigned this Jun 22, 2023
@vercel
Copy link

vercel bot commented Jun 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
swap-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback

🌃 Cosmos ↗︎

@socket-security
Copy link

New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives1 Size Publisher
@ethvault/iframe-provider 🆕 0.1.10 environment +0 159 kB moodysalem

Footnotes

  1. https://docs.socket.dev

HOME: '/',
SWAP: `/:chainId?${TRADE_WIDGET_PREFIX}/swap/:inputCurrencyId?/:outputCurrencyId?`,
LIMIT_ORDER: `/:chainId?${TRADE_WIDGET_PREFIX}/limit-orders/:inputCurrencyId?/:outputCurrencyId?`,
ADVANCED_ORDERS: `/:chainId?${TRADE_WIDGET_PREFIX}/advanced-orders/:inputCurrencyId?/:outputCurrencyId?`,
Copy link
Contributor

Choose a reason for hiding this comment

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

aha, ok, so you reuse the routes, cool!


if (isDarkMode === darkModeRef.current) return

dispatch(updateUserDarkMode({ userDarkMode: isDarkMode }))
Copy link
Contributor

Choose a reason for hiding this comment

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

in some other params, we remove the param from the URL once used. Not saying we should do it here, just wondering if it makes sense

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now this param is only for widget where we don't see a URL of iframe. But I see what you mean, probably we would need to clean up the URL

@@ -7,9 +7,9 @@ import { Identify, identify, init, track } from '@amplitude/analytics-browser'
* member of the organization on Amplitude to view details.
*/
export function initializeAnalytics(isDevEnvironment = process.env.NODE_ENV === 'development') {
const API_KEY = process.env.REACT_APP_AMPLITUDE_KEY
if (isDevEnvironment || !API_KEY) return
if (isDevEnvironment) return
Copy link
Contributor

Choose a reason for hiding this comment

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

I added this cause testing locally in "production mode" would break herre, and i would think is not a mandatory param, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I just inherited it from the previous branch

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm bringing this back, since it breaks the e2e #2733

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Soft approve :)

Pls, don't keep adding too many changeds to this PR since its already big
if possible, lets consolidate all this PRs and reiterate on the consolidation branch

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

This PR is GREAT!

@anxolin anxolin changed the base branch from npm-widget to develop June 22, 2023 13:09
@anxolin anxolin merged commit 6354c9a into develop Jun 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2023
@anxolin anxolin deleted the npm-widget-1 branch August 16, 2023 11:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants