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

Seperate page widgets #82

Closed
oluwandabira opened this issue Apr 18, 2020 · 1 comment
Closed

Seperate page widgets #82

oluwandabira opened this issue Apr 18, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@oluwandabira
Copy link
Contributor

Currently most widgets live in Window.inputs or Window.outputs and this has gotten quite cumbersome ( Window.handleinputs is also very long as a result).
This need to be improved.

@oluwandabira oluwandabira added the enhancement New feature or request label Apr 18, 2020
@oluwandabira
Copy link
Contributor Author

I propose changing the window to hold a map[string]layout.Widget for all pages.

  • Pages themselves should be a structure that has a method (something along the lines of a page.Construct) that takes pointers to the window data it needs and returns a layout.Widget that lays out the page when called.
  • The construction method should only take the window data used.
  • For widget data that can change the page should construct the widget within the layout function as the window will not communicate data changes to the pages.
  • Dialogs will remain the same (a single dialog variable) but we expand the number of pages.
  • There would pretty much only be about 3 dialogs (confirm, info, enter password) but other more specific dialogs can also be included.
  • If a dialog needs to call another dialog it should be a page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants