feat(relationships): explain the community's identifier default on the request form (#241 follow-up) - #338
Merged
Conversation
…e request form (#241 follow-up) #335 made a new relationship's mint default follow the working community's declared `relationshipIdentifierDefault`, but the form's identifier toggle was static ("Pairwise R-DID (recommended)" / "Your persona DID") — so when a community declares `attributed`, the toggle silently started on the persona DID while still labelling pairwise "(recommended)", with no reason given. Carry the declaration into the `NewRequest` form state (`community_default`) and surface it: - the toggle labels the persona-DID option "(your community's default)" and drops "(recommended)" from pairwise when the community prefers attributed (pairwise is then shown as "(more private)"); - a line under the toggle says why the default is where it is — "Your community publishes relationships under members' persona DIDs, so this defaults there" or "Your community recommends a pairwise DID (the default)" — and nothing extra when no community declared one. The lookup that seeded the default is refactored to return the declaration itself (`working_community_relationship_default`) rather than a bare bool, so the form gets both the default and the reason from one place. Behaviour is unchanged when no community declares a preference. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
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.
Follow-up to #241 / #335.
#335 made a new relationship's mint default follow the working community's declared
relationshipIdentifierDefault, but the form's identifier toggle was still static —Pairwise R-DID (recommended)/Your persona DID. So when a community declaresattributed, the toggle silently started on the persona DID while pairwise still read "(recommended)", with no explanation.This carries the declaration into the
NewRequestform state and surfaces it:The lookup that seeded the default is refactored to return the declaration itself (
working_community_relationship_default) rather than a bare bool, so the form gets both the default and the reason from one place. No behaviour change when no community declares a preference.Tests
the_form_explains_a_community_relationship_default— the form shows the right label + reason for attributed / pairwise, and nothing extra for none.cargo fmt,clippy --all-targets --all-features,RUSTDOCFLAGS="-D warnings" cargo doc, fullcargo testall pass.