8000 refactor miner name truncation by mononaut · Pull Request #5550 · mempool/mempool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor miner name truncation #5550

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

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

mononaut
Copy link
Collaborator

a light refactor of a few parts of the miner name tag feature:

  • moves the ASCII filtering into the backend to reduce code repetition.
  • simplifies the HTML templates.
  • changes the miner name truncation on the blockchain blocks to use CSS text-overflow: ellipsis, to take better advantage of the limited space available.
  • adds JS truncation to the names on the block and transaction pages.
    • limit of 16 characters, including any ellipsis.

The text-overflow CSS property isn't compatible with the baseline vertical alignment we were previously using on those badges, so for consistency this PR applies the overflow ellipsis to all badges, not just the new miner name ones.

This means some particularly long historical pool names are now truncated where they weren't before, although I think this is an improvement. To avoid changing the appearance of active pools with borderline length names like "Carbon Negative", the width limit is slightly more generous for existing pool names than it is for the new miner names. (145px vs 125px)

Before After
Screenshot 2024-09-26 at 5 23 03 PM Screenshot 2024-09-26 at 5 23 10 PM

@mononaut mononaut requested a review from softsimon September 26, 2024 17:35
@cla-bot cla-bot bot added the cla-signed label Sep 26, 2024
Copy link
Member
@softsimon softsimon left a comment

Choose a reason for hiding this comment

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

tested ACK @ [b29c4cf]

Screenshot 2024-09-26 at 23 58 42 Screenshot 2024-09-26 at 23 59 02

@softsimon softsimon merged commit 9bfe1fb into master Sep 26, 2024
25 checks passed
@softsimon softsimon deleted the mononaut/truncate-miner-name branch September 26, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0