anyproto / anytype-ts

Official Anytype client for MacOS, Linux, and Windows
https://anytype.io
Other
4.21k stars 255 forks source link

Number typed relation should differentiate between 0 and null #678

Closed michaelmyc closed 5 months ago

michaelmyc commented 5 months ago

Have you read a contributing guide?

Current Behavior

When viewing an object with the number relation in a set/collection, when setting the number to 0, it will appear as blank.

Expected Behavior

When viewing an object with the number relation in a set/collection, when setting the number to 0, it should appear as 0, and when deleting the number, it should appear as blank.

Steps To Reproduce

  1. go to task
  2. set a priority to 0
  3. click away
  4. the priority is not set

Environment

- OS: macOS 14.3.1
- Version: 0.39.0

Anything else?

No response

ra3orblade commented 5 months ago

Known issue https://community.anytype.io/t/cant-store-0-s-in-a-number-type-relation/3583, this is a problem with how grpc-web protobuf generator handles https://protobuf.dev/reference/protobuf/google.protobuf/#value.