-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enhance catalog entry and code mode RHS panel to be able to create new catalog entry #1993
base: main
Are you sure you want to change the base?
Changes from all commits
b8cdbe7
de4baaa
f488ac9
1a24148
47b8e08
30732e5
4d5451b
651302e
63222a9
997799a
6b26bef
ac05498
dc40e25
a6dcabf
d9978cd
80a7386
e8ac5db
35d479f
b21fbb4
0baf052
1ec41ea
5102958
adab3db
99c4674
d3244be
d4a6244
6a2b2aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -384,13 +384,19 @@ class Isolated extends Component<typeof CardsGrid> { | |
on: catalogEntryRef, | ||
eq: { ref: activeFilterRef }, | ||
}, | ||
sort: [ | ||
{ | ||
by: 'createdAt', | ||
direction: 'desc', | ||
}, | ||
], | ||
}; | ||
} | ||
let card = await chooseCard<CatalogEntry>( | ||
{ | ||
filter: { | ||
on: catalogEntryRef, | ||
every: [{ eq: { isField: false } }], | ||
every: [{ eq: { type: 'card' } }], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed this to be clearer about what we are filtering for. But I aslo found that when isField was turned into a computed, it cudn query and I filed https://linear.app/cardstack/issue/CS-7821/filtering-by-computed-doesnt-work-at-the-first-level There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just double checking, we don’t allow you to filter by fields that are not in the template. Is this field used the template. (Like is it part of the embedded field if this is a linked card)? If not is it set to is used? I’m positive we have passing tests that exercise the ability to filter by computeds There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirm. Oh its another one of those. Thanks for pointing out. isField was not used inside any of the template I confirm within the test that that computed WORKS when the computed field exist within the isolated template. So, the behaviour is as you point out. Although I would add that it won't work if the computed field only exist within embedded or fitted (not sure if its something we want to consider) but not the isolated template There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the rationale for the behavior is the "social graph problem". Imagine a boxel app that is a social graph like facebook. each person card has a linkToMany relationship to all their friends, which are also person cards. If we have no limits on what feields are included in the search doc, we will likely end up including all the people in the world in each search doc. the template is a natural way to draw boundaries on the search doc. we do have an escape valve There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the explanation. This is an aside. Shud not affect aspects of this PR. Since I filter by a field There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about you call this attribute |
||
}, | ||
}, | ||
{ preselectedCardTypeQuery }, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Focus on the last newly created catalog entry, if there are more than one