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

Multi-value widget for properties #32

Open
kirillt opened this issue Sep 3, 2023 · 1 comment
Open

Multi-value widget for properties #32

kirillt opened this issue Sep 3, 2023 · 1 comment
Labels

Comments

@kirillt
Copy link
Member

kirillt commented Sep 3, 2023

We now incorporate user-defined metadata known as properties, which are essentially key-value pairs. For instance, a book resource could have a property like "title": "Moby Dick". However, property values might differ when sourced from various devices, leading to potential conflicts. In such cases, users must have the option to manually select the correct value to resolve these conflicts. Internally, we represent a property by a key coupled with a list of values. So it may be simply "title": ["Moby Dick"] in conflict-free scenarios, or "title": ["Moby Dick", "Moby-Dick; or, The Whale"] when an alternative value exists.


A view for representing such fields would be handy:

  • In normal case, we have 1 value, so the view just displays it
  • When there are N > 1 values:
    • random value from N is selected and displayed
    • conflict label is displayed in the corner of the view
  • User can tap on the conflict label and see the other values as versions list
  • User can select the preferred value from the versions list

When the user selects a value from versions list, all elements from the corresponding Set must be erased except the selected one.

@kirillt kirillt moved this to Todo in Development Oct 18, 2023
@kirillt kirillt changed the title Manual conflict-resolution widget Multi-value widget for properties Nov 4, 2023
@kirillt
Copy link
Member Author

kirillt commented Nov 4, 2023

In an alternative design, acknowledging that users may accept multiple values for a property, we could accommodate this diversity. For example, a user might appreciate having property values in various languages, accessing them as needed. This approach would enable users to choose a preferred value of a property while retaining additional values.

In this design, we treat other values as alternatives, and not as conflicts. And we must preserve all values for same property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant