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

Search Relation result different between : on type object and on relation menu => request for a "political" decision #220

Closed
3 tasks done
Shampra opened this issue Aug 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Shampra
Copy link
Contributor

Shampra commented Aug 26, 2023

Have you read a contributing guide?

  • I have read CONTRIBUTING.md
  • I have searched the existing issues and didn't find any that were similar
  • I have considered creating a pull request with fixes instead of a bug report and want to proceed

Current Behavior

https://community.anytype.io/t/source-relation-for-a-custom-object-type-not-searchable/10594

Library -> custom type -> add relations by in in-page "New"
and
Library -> custom type -> Relations Menu -> add relations by "New" in this popup menu
give different result

Expected Behavior

It must be the same result because it's always "add relation to my type" for user.

Steps To Reproduce

Search "Source" with :
Library -> custom type -> add relations by in in-page "New"
and
Library -> custom type -> Relations Menu -> add relations by "New" in this popup menu

Environment

- OS:Windows
- Version:0.34.3

Anything else?

In code :

  • type.tsx (in-page "add") -> onRelationAdd is filtered by recommendedKeys.concat(systemKeys)
    And many relation are excluded.
  • view.tsx ("add in relation popup") -> onAdd is filtered by dbStore.getObjectRelationKeys(rootId, rootId)
    So everything except what is already used by the

example indicated in the bug ticket :
Source relation is used by bookmark, a default AT type.

... and here, it can be a team choice!

  • either relations linked to types at the heart of AT must not be used elsewhere
  • or it must be possible to do so (even if it means hijacking them, "Source" used for purposes other than a Bookmark will have other uses... and we'll potentially have to take this into account during development)

Please tell me, I haven't made a Pull Request while waiting for confirmation.

@Shampra Shampra added the bug Something isn't working label Aug 26, 2023
@ra3orblade
Copy link
Contributor

23d3e70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants