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

Refactor event handling to use combinators, show query errors inline #443

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

LucasPickering
Copy link
Owner

@LucasPickering LucasPickering commented Jan 3, 2025

Description

Describe the change. If there is an associated issue, please include the issue link (e.g. "Closes #xxx"). For UI changes, please also include screenshots.

  • Use combinators on Update instead of a variety of match/if let/let...else to match events
    • This is more consistent, more ergonomic, and makes it easy to get an owned value out of a propagated event
  • Show query errors directly in the response pane instead of hidden in a help dialog
    • This un-overrides the OpenHelp action
    • It's unlikely someone would want to browse the request while their query has failed, they probably just want to see the error. To get the request back they can easily just delete the query
  • Fix bug where query state wasn't being reset for an empty string

Known Risks

What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?

I touched a lot of event handling code so it's possible something broke. Unit tests should cover almost everything, manual testing before the next release should get the rest.

QA

How did you test this?

A bit of manual testing, mostly leaning on existing unit tests.

Checklist

  • Have you read CONTRIBUTING.md already?
  • Did you update CHANGELOG.md?
    • Only user-facing changes belong in the changelog. Internal changes such as refactors should only be included if they'll impact users, e.g. via performance improvement.
  • Did you remove all TODOs?
    • If there are unresolved issues, please open a follow-on issue and link to it in a comment so future work can be tracked

@LucasPickering LucasPickering changed the base branch from master to 3.0 January 3, 2025 02:58
@LucasPickering LucasPickering enabled auto-merge (rebase) January 3, 2025 02:58
@LucasPickering LucasPickering merged commit 7253e0b into 3.0 Jan 3, 2025
15 checks passed
@LucasPickering LucasPickering deleted the query-tweaks branch January 3, 2025 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant