Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Conversation

sebxian
Copy link
Collaborator

@sebxian sebxian commented Jan 3, 2024

The query string created by the UI was wrong (filter.type "MATCH" instead of "AFTER" or "BEFORE" after picking a t@ime).

@stefan-kracht setting [field] dynamically in this line of code means TypeScript will not ensure that the following values are valid. Do you have any ideas on how to improve this?

    setFilter({
      [field]: { type: field, value: date },
    });

Copy link

linear bot commented Jan 3, 2024

@sebxian sebxian requested a review from stefan-kracht January 3, 2024 11:50
Copy link
Member

@stefan-kracht stefan-kracht left a comment

Choose a reason for hiding this comment

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

Great that you could fix this issue.

@stefan-kracht setting [field] dynamically in this line of code means TypeScript will not ensure that the following values are valid. Do you have any ideas on how to improve this?

The TS problem, that you described here seems to be harder to fix than I thought. I did not find a good solution to that (without having to refactor) either.

You can merge this if you like. It would be great if you could check, if all e2e tests are still passing locally, because I think we have some e2e test that cover the filters (is it worth to add a simple test that covers this fix as well?)

@stefan-kracht stefan-kracht merged commit 3ad5332 into main Jan 9, 2024
1 check passed
@stefan-kracht stefan-kracht deleted the sebastianarmbrust/dir-1026-reported-from-open-source-slack-event-filter-broken branch January 9, 2024 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants