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

Side-specific Actions/Utils cannot/should not be used in @common #1

Open
iGoodie opened this issue Jan 13, 2024 · 0 comments · May be fixed by #2
Open

Side-specific Actions/Utils cannot/should not be used in @common #1

iGoodie opened this issue Jan 13, 2024 · 0 comments · May be fixed by #2
Assignees

Comments

@iGoodie
Copy link
Member

iGoodie commented Jan 13, 2024

Summary

Thanks to @jiwon79, and their comment under CoconutGoodie/figma-plugin-react-vite#4, I see a very crucial architectural issue. @common should not include any message handling, as it might depend on a certain side, which might be unavailable on another side.

Monorepo Networker should change its approach, so now handlers are placed under their respective sides.

What actions should be taken?

  • Message receive handlers are highly side-dependent. Therefore, they should be handled on their corresponding side. As you suggested ✅
  • @common/network should only be there to;
    • Define sides - Which sides are available throughout the application ✅
    • Define communication strategies - Which strategy a certain side uses to communicate with another side ✅
    • Define which messages are there - Which messages are present for a certain side ✅
@iGoodie iGoodie self-assigned this Jan 13, 2024
@iGoodie iGoodie linked a pull request Jan 13, 2024 that will close this issue
3 tasks
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 a pull request may close this issue.

1 participant