Repository navigation
fix: keep text filter operator changes from crashing views - #13575
Closed
tiensonqin wants to merge 2 commits into
Closed
tiensonqin wants to merge 2 commits into
tiensonqin wants to merge 2 commits into
Conversation
Switching an equality filter to text contains dropped the set value and persisted a 2-element clause. View resource validation requires a 3-tuple, so the app crashed before a search string could be entered. Co-authored-by: Tienson Qin <[email protected]>
It is a special form inside is, not a referable var in this CLJS build. Co-authored-by: Tienson Qin <[email protected]>
2 tasks done
Contributor
Author
|
Closing as a duplicate of #13885, which covers the same bug more completely. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switching a tag-table Text-property filter from
istotext containsortext not containspersisted a 2-element[property operator]clause. View resource validation requires every clause to be a 3-tuple, so the app immediately showed Something went wrong before a search string could be entered.This keeps an empty string when the previous equality value is incompatible, so the editor stays on a valid
[property operator ""]clause. The user can then type a contains string and the table filters normally.Also pads 2-element text clauses on persist, so an in-progress contains filter cannot be written in the invalid shape.
Fixes logseq/db-test#1392
Tests
""; existing strings are keptvalid-filters?/require-view-context!compatibility for the in-progress 3-tuple