Publish npm package for manywidgets core frontend functions?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- developer-experience, frontend
Research direction
Start by examining the existing manywidgets/core frontend helpers and the custom-widget usage shown in notebooks/situation_room/app.js. Determine the smallest npm package surface that lets ESM widgets import those helpers without vendoring; done means the package is published and a custom widget can consume the supported imports, while the broader base-class API remains a separate design question.
Written by the indexing model from the issue text.
Description
Right now we publish a PyPi package for manywidgets to use the exported widgets in notebooks.
However, if one is making a custom widget with writing one's own ESM module, there is no way to easily import functions from manywidgets/core in the frontend code for useful helpers, etc. that you probably want for your widget.
This results in ugly "vendoring in" of functions that one needs, like https://github.com/developmentseed/manywidgets-playground/blob/main/notebooks/situation_room/app.js#L11
Ideally, we'd be able to just import these from manywidgets some-how on the frontend. Going further, we might want to re-architect a bit to make it more natural to create custom widgets based on the manywidgets "core" - like develop a base-class that can be inherited from instead of helper functions - probably needs a bit of thinking through.
Without a good solution to this, the story around authoring your own custom widgets that play well with manywidgets is a little bit awkward - you likely need to copy-paste in some functions from the manywidgets code, etc.
@dzole0311 would really appreciate your thoughts on this one - I think I'll play around with a couple of ideas - I think as a first step maybe just publishing the npm package and importing the helpers would at least avoid needing to vendor things in, and then perhaps a subsequent step to design the API around making custom widgets a bit better - conceptually it seems like it would be nice to be able to just extend like a Manywidget base-class on the frontend.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developmentseed/manywidgets
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
developmentseed/manywidgets#21 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
developmentseed/manywidgets#18 · 1 reaction ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
developmentseed/manywidgets#9 · 2 comments ·
All issues in developmentseed/manywidgets
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·