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

We and external developers have reusable UI components that are tested and dependable #2320

Open
4 of 7 tasks
katelynsills opened this issue Feb 3, 2021 · 3 comments · Fixed by #2321
Open
4 of 7 tasks
Labels

Comments

@katelynsills
Copy link
Contributor

katelynsills commented Feb 3, 2021

We have a few react UI components that we should reuse in our dapps and suggest to external dapp developers. We should make a package in agoric-sdk which has these components. They are (names below are tentative):

Basic Components:

  • NatAmountInput - a MaterialUI TextField Input for inputting nats
  • NatPurseListItemDetailed - a MaterialUI ListItem that shows the purse petname as the primary text, with the brand petname and the purse balance as secondary text. Only works for nats.
  • PurseSelector - a MaterialUI TextField Select. A parent of PurseListItemDetailed or similar. Used for selecting purses from a list.
  • Non-nat versions of the above
  • decimalPlaces handling for Ratios

Larger Components:

  • Swap - select the purses in/out and enter the amounts. Probably should be changed to select brands first.

Libraries:

  • display - takes a raw Nat value and uses the decimalPlaces in displayInfo to display it properly. Also parses, doing the reverse.

Tests

Unit tests for each component and library should be created. The tests should use AVA and enzyme.

This package in agoric-sdk should be usable by dapp-token-economy.

@katelynsills katelynsills added the enhancement New feature or request label Feb 3, 2021
@katelynsills katelynsills self-assigned this Feb 3, 2021
@zarutian
Copy link
Contributor

zarutian commented Feb 7, 2021

Adding or augmenting that list:

  • Collapseable list for MathKind.STRING_SET amounts
  • Such a list but with selection mechanism (checkboxes?) for withdrawal from such a purse.

And the question is how would or should MathKind.SET items be displayed?

Should be there some standardized properties in brands displayInfo record for these purposes?

(self-note: So I do not forget, what about for the RECT_AREAS? That would look something like a canvas with filled rectangles each with their size written in the center in UUxUU format and coordnates in upper left corner in (U, U) format)

@katelynsills katelynsills changed the title Create agoric-sdk package for reusable UI components We and external developers have reusable UI components that are tested and dependable Feb 9, 2021
@katelynsills katelynsills added this to the Beta Launch milestone Feb 10, 2021
@katelynsills katelynsills reopened this Mar 23, 2021
@katelynsills katelynsills modified the milestones: Beta Initial Launch, Beta Treasury Launch Mar 23, 2021
@katelynsills
Copy link
Contributor Author

For complex MathKind.SET values, we will need to use the user's petnames to display the presences that may exist.

@katelynsills
Copy link
Contributor Author

More needs to be done here, but I'm taking this out of the Beta Treasury milestone because it's a long term process. For instance, instead of just enzyme which cannot test the UI as rendered, we really need a way to test user input.

@katelynsills katelynsills modified the milestones: Beta Treasury Launch, Beta Initial Launch Mar 29, 2021
@rowgraus rowgraus removed this from the Beta Initial Launch milestone Mar 29, 2021
@ivanlei ivanlei removed the Beta label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants