-
Notifications
You must be signed in to change notification settings - Fork 205
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
Distinguish witnesses and divulgences in scenario table view #6571
Conversation
Currently, we display a "D" (for "Disclosure/Divulgence") in the table view of the scenario view when a party can see a contract because they have learnt about it via disclosure. This change further refines this visibily indicators for disclosure: We display a "W" for "Witness" (i.e. the party has witnessed the creation of the contract) and "D" for "Divulgence". Help for the reviewer: In the scenario service server, witnessing is called explicit disclosure whereas divulgence is called implicit disclosure. CHANGELOG_BEGIN * [DAML Studio] When displaying scenario results in table view in DAML Studio, we now indicate _why_ a party knows about the existence of a contract: - `S` means the party is a signatory. - `O` means the party is an observer. - `W` means the party has witnessed the creation of the contract. - `D` means the party has learned about the contract via divulgence. CHANGELOG_END
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.
Awesome, thank you!
@@ -83,7 +83,7 @@ object ScenarioLedger { | |||
globalImplicitDisclosure: Relation[ContractId, Party], | |||
failedAuthorizations: FailedAuthorizations, | |||
) { | |||
def disclosures(coidToEventId: ContractId => EventId): Relation[EventId, Party] = | |||
def disclosures(coidToEventId: ContractId => EventId): Map[EventId, Set[Party]] = |
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.
While I’m not really a fan of synonyms it also seems a bit confusing to work with Relation.…
in the body of this method but then not use the type synonym.
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.
Good catch. That's a relic from a failed attempt to change some things. I'll bring it back to its original state. I should have self-reviewed my PR better. 😞
_.addDisclosures(witnesses.map(_ -> Disclosure(since = trId, explicit = true)).toMap)) | ||
} | ||
richTr.globalImplicitDisclosure.foldLeft(cacheWithExplicitDisclosures) { | ||
case (cacheP, (coid, witnesses)) => |
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.
Shouldn’t witnesses
be called divulgees
here?
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.
That's a good idea. Thanks. I blindly copied the old code...
As requested by @shaul-da, this PR hides the information added by @hurryabit in #6571 behind a checkbox, and reverts to plain "X"s by default (checkbox unchecked). CHANGELOG_BEGIN - [DAML Studio] The new S/O/W/D information is hidden behind a top-level checkbox (next to Show archived). When that checkbox is not checked (which is the default), we display X's as before. CHANGELOG_END
As requested by @shaul-da, this PR hides the information added by @hurryabit in #6571 behind a checkbox, and reverts to plain "X"s by default (checkbox unchecked). CHANGELOG_BEGIN - [DAML Studio] The new S/O/W/D information is hidden behind a top-level checkbox (next to Show archived). When that checkbox is not checked (which is the default), we display X's as before. CHANGELOG_END
As requested by @shaul-da, this PR hides the information added by @hurryabit in #6571 behind a checkbox, and reverts to plain "X"s by default (checkbox unchecked). CHANGELOG_BEGIN - [DAML Studio] The new S/O/W/D information is hidden behind a top-level checkbox (next to Show archived). When that checkbox is not checked (which is the default), we display X's as before. CHANGELOG_END
As requested by @shaul-da, this PR hides the information added by @hurryabit in #6571 behind a checkbox, and reverts to plain "X"s by default (checkbox unchecked). CHANGELOG_BEGIN - [DAML Studio] The new S/O/W/D information is hidden behind a top-level checkbox (next to Show archived). When that checkbox is not checked (which is the default), we display X's as before. CHANGELOG_END
As requested by @shaul-da, this PR hides the information added by @hurryabit in #6571 behind a checkbox, and reverts to plain "X"s by default (checkbox unchecked). CHANGELOG_BEGIN - [DAML Studio] The new S/O/W/D information is hidden behind a top-level checkbox (next to Show archived). When that checkbox is not checked (which is the default), we display X's as before. CHANGELOG_END
Currently, we display a "D" (for "Disclosure/Divulgence") in the table
view of the scenario view when a party can see a contract because they
have learnt about it via disclosure.
This change further refines this visibily indicators for disclosure:
We display a "W" for "Witness" (i.e. the party has witnessed the
creation of the contract) and "D" for "Divulgence".
Help for the reviewer: In the scenario service server, witnessing is
called explicit disclosure whereas divulgence is called implicit
disclosure.
CHANGELOG_BEGIN
When displaying scenario results in table view in DAML Studio, we now
indicate why a party knows about the existence of a contract:
S
means the party is a signatory.O
means the party is an observer.W
means the party has witnessed the creation of the contract.D
means the party has learned about the contract via divulgence.CHANGELOG_END
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.
This change is