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

Resolve cyclic dependency between analytics files #12339

Merged
merged 2 commits into from
Apr 26, 2022

Conversation

timroes
Copy link
Collaborator

@timroes timroes commented Apr 26, 2022

What

Fixes the problem that npm start doesn't work on master atm, because there's a cyclic dependency, e.g via:

src/hooks/services/Analytics/index.tsx
->src/hooks/services/Analytics/TrackPageAnalytics.tsx
->src/hooks/services/Analytics/pageNameUtils.tsx
->src/pages/SettingsPage/SettingsPage.tsx
->src/pages/SettingsPage/pages/AccountPage/index.tsx
->src/pages/SettingsPage/pages/AccountPage/AccountPage.tsx
->src/pages/SettingsPage/components/useWorkspaceEditor.tsx
->src/hooks/services/useWorkspace.tsx
->src/hooks/services/Analytics/index.tsx

Easiest fix for that atm is to simply not reexport the TrackPageAnalytics hook which is only used in our routes file. The cloud routes.tsx was already importing it directly from that file.

@timroes timroes requested a review from a team as a code owner April 26, 2022 08:15
@github-actions github-actions bot added area/frontend area/platform issues related to the platform labels Apr 26, 2022
@timroes timroes mentioned this pull request Apr 26, 2022
Copy link
Contributor

@teallarson teallarson left a comment

Choose a reason for hiding this comment

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

✅ verified locally that the app renders now using npm start

@timroes timroes merged commit bd8bff9 into master Apr 26, 2022
@timroes timroes deleted the tim/cyclic-dependency-fix branch April 26, 2022 12:48
suhomud pushed a commit that referenced this pull request May 23, 2022
* Resolve cyclic dependency between analytics files

* Refactor tracking component to hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants