leeoniya / leeoniya/dump_r.php

switch to font coloring rather than background coloring

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

todo
Dominant language
PHP
Stars
121
Forks
17
PR merge metrics
No merged PRs in 30d

Description

so this has bugged me for a long time.

the main reason for using (ugly) background colors rather than text colors is the inability to show leading/trailing whitespace for strings. this can be worked around in several ways.

already, an entirely empty string uses an gray "middle dot".

/* display empty strings as a gray middle dot */
.dump_r .empty.string:not(.numeric) > .lbl .val:after {
    content: "\0387";
    color: #BBBBBB;
}

in addition, there is a trailing/leading right and left border that's added if the string is indicated as having leading/trailing spaces.

the key goal is to have the string copy-able to the clipboard in the exact form it was originally and that it be very obvious visually if there are trailing or leading spaces since they're frequently a huge source of time-consuming debugging for trivial reasons. one idea is just to render a color background only for leading/trailing spaces which means splitting them off into a separate div/span.

perhaps in combination with https://github.com/leeoniya/dump_r.php/issues/49, it should be possible to move the default theme away from using the jarring background colors, or at least provide a workable alternative with no sacrifices.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing .dump_r CSS rules and issue #49 first to understand the current rendering and whitespace indicators. Evaluate an alternative that preserves exact clipboard text while making leading and trailing spaces obvious; done means the visual treatment is usable without sacrificing copying fidelity.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, php
Domain
design, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.