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: reusable portalFactory for App + PD #2511

Closed
IanLondon opened this issue Oct 17, 2018 · 0 comments
Closed

Chore: reusable portalFactory for App + PD #2511

IanLondon opened this issue Oct 17, 2018 · 0 comments
Labels
app Affects the `app` project chore components Affects the `components` project protocol designer Affects the `protocol-designer` project

Comments

@IanLondon
Copy link
Contributor

3 strikes you're out, duplicate copy & pasted code ⚾ 🦇 . We have 3 Portal .js files that are almost the same, and should consolidate each of those files into 1-liners: export default portalFactory('portal-root-here')

  • Make a fn portalFactory(PORTAL_ROOT_ID: string) => {getPortalRoot, Portal, PortalRoot} in components library
  • Use the factory to replace duplicate code in PD's MainPageModalPortal and TooltipPortal, and App's portal ('__otAppModalPortalRoot')
@IanLondon IanLondon added app Affects the `app` project chore protocol designer Affects the `protocol-designer` project components Affects the `components` project labels Oct 17, 2018
@bndo bndo closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project chore components Affects the `components` project protocol designer Affects the `protocol-designer` project
Projects
None yet
Development

No branches or pull requests

2 participants