hirosystems / clarinet

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
https://hiro.so/clarinet
GNU General Public License v3.0
307 stars 141 forks source link

stacks-explorer link should be devnet explorer #1539

Open tippenein opened 3 months ago

tippenein commented 3 months ago

When running clarinet devnet start the link for the stacks-explorer should go to devnet, not mainnet.

The correct url is http://localhost:8000/?chain=testnet&api=http://localhost:3999

The work to fix this has been mostly done here but currently that branch will stall on "preparing container".

This issue is to get that status update to reflect a correct link

binadamu-isiyoonekana commented 3 weeks ago

Hi all. If you don't mind, as a newbie, I'm willing to fix this issue. Thanks

Image

hugocaillard commented 3 weeks ago

Hello @binadamu-isiyoonekana My concern on this one is that the url will get troncated, but maybe that's not really an issue If you're willibng to give it a try, that be nice! I just hope it won't be too ugly

binadamu-isiyoonekana commented 3 weeks ago

Two comments here:

  1. You're right, the URL is a bit ugly (see below). Why not just just indicating that it's truncated with ellipsis, like "http://localhost:8000/?chain=devnet ..."

Image

  1. By the way, it should be chain=devnet rather than chain=testnet. Correct?

Thanks

hugocaillard commented 3 weeks ago

@binadamu-isiyoonekana

  1. I don't think you can do that in the terminal UI
  2. devnet technically is a testnet, so I think that's fine
binadamu-isiyoonekana commented 3 weeks ago

Let me propose a PR tomorrow.

hugocaillard commented 3 weeks ago

@binadamu-isiyoonekana Sounds good. I can do a pass on the "good first issue" and make see if I can find others as well

binadamu-isiyoonekana commented 3 weeks ago

@binadamu-isiyoonekana

  1. I don't think you can do that in the terminal UI
  2. devnet technically is a testnet, so I think that's fine

@hugocaillard

Hey Hugo. Isn't it a bit ambiguous to mention testnet when devnet is in fact selected? Wouldn't it be clearer to display devnetinstead (though I understand that devnet and testnet are both testing platforms; however devnet is local while testnet networks are not)?

Image

binadamu-isiyoonekana commented 2 weeks ago

Hello @binadamu-isiyoonekana My concern on this one is that the url will get truncated, but maybe that's not really an issue If you're willibng to give it a try, that be nice! I just hope it won't be too ugly

In fact when the URL is truncated after resizing the terminal's window, the latter can become malformed (becoming, for instance, 'http://loca') and you cannot click on it for opening a browser. Do you consider the URL as informational only or would like the latter to be a clickable hyperlink as well (probably yes)?

hugocaillard commented 2 weeks ago

@binadamu-isiyoonekana It has to clickable. So yes, if the URL is too long, it has a higher chance of getting truncated. Regarding your other question, this is something we should discuss with the Explorer team

binadamu-isiyoonekana commented 2 weeks ago

@binadamu-isiyoonekana It has to clickable. So yes, if the URL is too long, it has a higher chance of getting truncated. Regarding your other question, this is something we should discuss with the Explorer team

@hugocaillard I'm currently evaluating a solution with ratatui where the text overflow will be "truncated" at the given size with ellipsis and the text to slide to the left when mouse is hover.