Page MenuHomePhabricator

[explorer] Fix line break issues for Script Decoded section on transaction page
ClosedPublic

Authored by johnkuney on Apr 19 2023, 18:50.

Details

Summary

The OP_ tags were getting line breaks in undesireable places as outlined in https://reviews.bitcoinabc.org/T3112
To resolve I added a script to loop over the words in the string and wrap each with a span tag so we can display them each on their own line
Open to other suggestions if this a weird way to display them

Test Plan

run the app and see if it works and looks good. Example transaction /tx/254cd17f9166aaa35581a44e99fb69fe1fe638ad938ba9b1f3ce7b0f2b6451c6

Diff Detail

Repository
rABC Bitcoin ABC
Branch
explorer-script-wrap-text
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23377
Build 46373: Build Diff
Build 46372: arc lint + arc unit

Event Timeline

hm this does have a certain aesthetic appeal, actually stacking the stack. I don't think any other explorer does it this way.

That said, I don't think it's the right solution to the problem.

Seems like a combination of word-break and overflow css properties could handle this without having to reserve certain strings?

https://developer.mozilla.org/en-US/docs/Web/CSS/word-break

If that really is impractical, then this approach is better than what we currently have.

This revision now requires changes to proceed.Apr 19 2023, 21:35

add word break css rule and remove the span tags

Sweet yeah that works, think I was overthinking that one ha

This revision is now accepted and ready to land.Apr 24 2023, 16:06