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

also run handleInfoPanelEvent for dialogs other than GoalModal #1071

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented Jan 31, 2023

Fixes #1068.

@byorgey byorgey requested a review from kostmo January 31, 2023 21:42
Copy link
Member

@kostmo kostmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI programming is a fraught exercise 😵‍💫

@@ -419,7 +419,7 @@ handleModalEvent = \case
uiState . uiGoal . listWidget .= newList
GoalSummary -> handleInfoPanelEvent modalScroll (VtyEvent ev)
_ -> handleInfoPanelEvent modalScroll (VtyEvent ev)
_ -> return ()
_ -> handleInfoPanelEvent modalScroll (VtyEvent ev)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost wish we returned EventM Name AppState Bool to indicate whether the event was handled or fell through.

Then the top handler would know to call the next handler that might be interested.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Bool doesn't really sound like it would help that much, it would just be one more thing to get wrong...

What we should REALLY do is have an effect system for tracking a type-level list of unhandled events! 😜

@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label Jan 31, 2023
@mergify mergify bot merged commit a785f5f into main Jan 31, 2023
@mergify mergify bot deleted the fix/dialog-scroll branch January 31, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dialogs other than goals dialog do not scroll
3 participants