captbaritone / captbaritone/webamp
Add API to control which windows are showing
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 796
- PR merge metrics
- No merged PRs in 30d
Description
One often requested feature (e.g. #1023) is the ability to control which windows are visible. There are a lot of things this might end up including, and I'm not 100% sure how it should work.
1. Control initial set of open windows.
2. Control initial position of windows.
3. Control the initial size of windows.
4. Imperatively control the position of a window in a running instance of Webamp.
5. Imperatively open/close windows in a running instance of Webamp.
6. Imperatively control the size or windows in a running instance of Webamp.
If we wanted to simplify things to just one API, we could skip 1-3 and just implement 4-6 (or even a subset to start with) since users could construct a Webamp instance and then imperatively set the window positions before rendering.
This is all further complicated by the auto-layout we do to ensure Webamp gets centered within the element you render it into. Currently we have internal APIs that let us position the windows but they end up only being relative to each other since we center the windows relative to the space they take up rather than relative to some `0,0` (I think).
One other question I have is should we have separate methods for controlling each window, or should we have a single enum which gets passed an identifier for which window the user wants to act on.
A frustratingly large number of decisions to make.
## Next Steps
Document how we might achieve these effects using the Redux actions directly. That will help unblock #1023 and perhaps give us some insights.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing Redux actions that control Webamp windows, as requested in the issue's Next Steps. Document how those actions could control visibility, position, and size, and use that documentation to clarify a smaller API scope and unblock #1023.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100