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

Result Builder #178

Open
4 tasks
b00f opened this issue Dec 25, 2024 · 0 comments
Open
4 tasks

Result Builder #178

b00f opened this issue Dec 25, 2024 · 0 comments

Comments

@b00f
Copy link
Contributor

b00f commented Dec 25, 2024

Command results are rich text that can be formatted into HTML. At the same time, we must ensure that the result is readable and decoupled from the command to facilitate testing and comparison of the final output.

Given this, we should enforce results in Markdown format and later use a result builder to convert them to HTML. This approach allows us to generate different results based on the platform. For example, if a platform does not support <h> tags, we can use bold text as an alternative.

Another advantage of a result builder is pattern recognition. For instance, the builder can identify strings with 42 characters starting with pc1..., treat them as Mainnet addresses, and generate links to the PacViewer address.

Tasks:

  1. Define raw results for each command.
  2. Ensure results can be formatted and compared in unit tests.
  3. Define a general ResultBuilder.
  4. Define platform-specific result builders that share common properties with the general builder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant