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

feat: improve proposal details visualization #260

Merged
merged 7 commits into from
Nov 7, 2023

Conversation

manu0466
Copy link

@manu0466 manu0466 commented Nov 7, 2023

Description

Closes: DPM-162, DPM-163, DPM-172, DPM-178

This PR enhances the visualization of the details of a governance proposal with the following changes:

  1. Displays the proposal messages inside the scrollview instead of a horizontal list.
  2. Generalizes the visualization of the modules MsgUpdateParams to display the changed parameters.
  3. Adds the visualization of the proposal summary.
  4. Shows the profile of the proposal's proposer.

###Final result:
output


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

  • included the correct type prefix in the PR title
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed

@manu0466 manu0466 added Type: Enhancement New feature or request C: UI Related to the visual aspect of the app automerge Related to mergify labels Nov 7, 2023
@manu0466 manu0466 requested a review from RiccardoM November 7, 2023 12:46
@@ -79,6 +65,15 @@ const ProposalDetails: React.FC<ProposalDetailsProps> = ({ proposal }) => {
return (
<View>
<Spacer paddingTop={24} />
{/* Summary */}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RiccardoM I display the proposal summary above the description. Let me know if this is fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea it's perfect 👍

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link

github-actions bot commented Nov 7, 2023

SonarQube Quality Gate Result

  • Result: ✅ OK
  • Triggered by @manu0466 on pull_request
Metric Status Value Error Threshold
New reliability rating ✅ OK 1 > 1
New security rating ✅ OK 1 > 1
New maintainability rating ✅ OK 1 > 1
New duplicated lines density ✅ OK 1.62 > 3
New security hotspots reviewed ✅ OK 100 < 100

View on SonarQube

updated: 11/7/2023, 16:47:34 (UTC+0)

Copy link
Contributor

@RiccardoM RiccardoM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a minor comment on the rendering of the parameter values

serializedValue = JSON.stringify(objectValue, undefined, 4);
}
} else {
serializedValue = objectValue.toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on boolean values as well? I saw in your preview Gif that the send_enabled parameter was rendered as a white square box for some reason.

Also, would it be better to check if the objectValue is either undefined or null and render it as null in both cases?

Copy link
Author

@manu0466 manu0466 Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RiccardoM I have handled the case where objectValue is undefined or null.
About the boolean there was an error in the conversion of the /desmos.tokenfactory.v1.MsgUpdateParams.
I have update it to matche the proto definition.

@mergify mergify bot merged commit cb6271a into main Nov 7, 2023
7 checks passed
@mergify mergify bot deleted the manuel/improve-multi-message-proposals branch November 7, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Related to mergify C: UI Related to the visual aspect of the app Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants