-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
feat: Value Renderer for repeated #13604
Merged
joeabbey
merged 5 commits into
cosmos:main
from
joeabbey:joeabbey/textual-repeated-repeated-repeated-render
Nov 29, 2022
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
14c5057
Support for repeated
joeabbey ebec624
Merge branch 'main' into joeabbey/textual-repeated-repeated-repeated-…
joeabbey de879f1
Merge branch 'main' into joeabbey/textual-repeated-repeated-repeated-…
facundomedica a6ca57e
Merge branch 'main' into joeabbey/textual-repeated-repeated-repeated-…
amaury1093 d771861
Merge branch 'main' into joeabbey/textual-repeated-repeated-repeated-…
amaury1093 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
[ | ||
{ | ||
"proto": {}, | ||
"parses": true, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0} | ||
] | ||
}, | ||
{ | ||
"proto": { | ||
"messages": [ | ||
{ | ||
"full_name": "thing one", | ||
"nickname": ":thing two" | ||
} | ||
] | ||
}, | ||
"parses": true, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0}, | ||
{"text": "Messages: 1 Foo", "indent": 1}, | ||
{"text": "Messages (1/1): Foo object", "indent": 2}, | ||
{"text": "Full name: thing one", "indent": 3}, | ||
{"text": "Nickname: :thing two", "indent": 3}, | ||
{"text": "End of Messages", "indent": 1} | ||
] | ||
}, | ||
{ | ||
"proto": { | ||
"messages": [ | ||
{ | ||
"full_name": "thing one", | ||
"nickname": "thing two" | ||
}, | ||
{ | ||
"full_name": "thing three", | ||
"nickname": "thing four" | ||
} | ||
] | ||
}, | ||
"parses": true, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0}, | ||
{"text": "Messages: 2 Foo", "indent": 1}, | ||
joeabbey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{"text": "Messages (1/2): Foo object", "indent": 2}, | ||
{"text": "Full name: thing one", "indent": 3}, | ||
{"text": "Nickname: thing two", "indent": 3}, | ||
{"text": "Messages (2/2): Foo object", "indent": 2}, | ||
{"text": "Full name: thing three", "indent": 3}, | ||
{"text": "Nickname: thing four", "indent": 3}, | ||
{"text": "End of Messages", "indent": 1} | ||
|
||
] | ||
}, | ||
{ | ||
"proto": { | ||
"string_messages": [ | ||
"/OmniFlix.onft.v1beta1.MsgTransferONFT" | ||
] | ||
}, | ||
"parses": true, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0}, | ||
{"text": "String messages: 1 String", "indent": 1}, | ||
{"text": "String messages (1/1): /OmniFlix.onft.v1beta1.MsgTransferONFT", "indent": 2}, | ||
{"text": "End of String messages", "indent": 1} | ||
] | ||
}, | ||
{ | ||
"proto": { | ||
"string_messages": [ | ||
"/OmniFlix.onft.v1beta1.MsgTransferONFT", | ||
"/OmniFlix.onft.v1beta1.MsgBurnONFT", | ||
"/OmniFlix.marketplace.v1beta1.MsgListNFT" | ||
] | ||
}, | ||
"parses": true, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0}, | ||
{"text": "String messages: 3 String", "indent": 1}, | ||
{"text": "String messages (1/3): /OmniFlix.onft.v1beta1.MsgTransferONFT", "indent": 2}, | ||
{"text": "String messages (2/3): /OmniFlix.onft.v1beta1.MsgBurnONFT", "indent": 2}, | ||
{"text": "String messages (3/3): /OmniFlix.marketplace.v1beta1.MsgListNFT", "indent": 2}, | ||
{"text": "End of String messages", "indent": 1} | ||
] | ||
}, | ||
{ | ||
"proto": { | ||
"vote" : { | ||
"proposal_id": 4, | ||
"voter": "cosmos1abc...def", | ||
"options": [ | ||
{ | ||
"option": "Yes", | ||
"weight": "0.7" | ||
}, | ||
{ | ||
"option": "No", | ||
"weight": "0.3" | ||
} | ||
] | ||
} | ||
}, | ||
"parses": false, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0}, | ||
{"text": "Vote: Ballot object", "indent": 1}, | ||
{"text": "Proposal id: 4", "indent": 2}, | ||
{"text": "Voter: cosmos1abc...def", "indent": 2}, | ||
{"text": "Options: 2 WeightedBallotOption", "indent": 2}, | ||
{"text": "Options (1/2): WeightedBallotOption object", "indent": 3}, | ||
{"text": "Option: Yes", "indent": 4}, | ||
{"text": "Weight: 0.7", "indent": 4}, | ||
{"text": "Options (2/2): WeightedBallotOption object", "indent": 3}, | ||
{"text": "Option: No", "indent": 4}, | ||
{"text": "Weight: 0.3", "indent": 4}, | ||
{"text": "End of Options", "indent": 2} | ||
] | ||
}, | ||
{ | ||
"proto": { | ||
"price": [ | ||
{ "amount": "1", "denom": "ucosm" }, | ||
{ "amount": "3", "denom": "ustake" } | ||
] | ||
}, | ||
"parses": false, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0}, | ||
{"text": "Price: 1 ucosm, 3 ustake", "indent": 1} | ||
] | ||
}, | ||
{ | ||
"proto": { | ||
"expirations": [ | ||
{"seconds": 0, "nanos": 1}, | ||
{"seconds": 0, "nanos": 10}, | ||
{"seconds": 0, "nanos": 100}, | ||
{"seconds": 0, "nanos": 1000}, | ||
{"seconds": 0, "nanos": 10000}, | ||
{"seconds": 0, "nanos": 100000}, | ||
{"seconds": 0, "nanos": 1000000}, | ||
{"seconds": 0, "nanos": 10000000} | ||
] | ||
}, | ||
"parses": true, | ||
"screens": [ | ||
{"text": "Qux object", "indent": 0}, | ||
{"text": "Expirations: 8 Timestamp", "indent": 1}, | ||
{"text": "Expirations (1/8): 1970-01-01T00:00:00.000000001Z", "indent": 2}, | ||
{"text": "Expirations (2/8): 1970-01-01T00:00:00.00000001Z", "indent": 2}, | ||
{"text": "Expirations (3/8): 1970-01-01T00:00:00.0000001Z", "indent": 2}, | ||
{"text": "Expirations (4/8): 1970-01-01T00:00:00.000001Z", "indent": 2}, | ||
{"text": "Expirations (5/8): 1970-01-01T00:00:00.00001Z", "indent": 2}, | ||
{"text": "Expirations (6/8): 1970-01-01T00:00:00.0001Z", "indent": 2}, | ||
{"text": "Expirations (7/8): 1970-01-01T00:00:00.001Z", "indent": 2}, | ||
{"text": "Expirations (8/8): 1970-01-01T00:00:00.01Z", "indent": 2}, | ||
{"text": "End of Expirations", "indent": 1} | ||
] | ||
} | ||
] |
This file contains 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
Oops, something went wrong.
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.
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.
Add these test cases to
message.json
instead of using a separate file - allows us to reuse the same test driver code.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.
I'm not sure I agree with this one. I still think the reason we put repeated logic in messageValueRenderer is an implementation detail. Conceptually, I prefer them to be 2 different value renderers. I'd love to know how JS implements this.