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

Avoid exotic unicode symbols #202

Closed
dcastro opened this issue Oct 24, 2022 · 4 comments · Fixed by #224
Closed

Avoid exotic unicode symbols #202

dcastro opened this issue Oct 24, 2022 · 4 comments · Fixed by #224
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@dcastro
Copy link
Member

dcastro commented Oct 24, 2022

Clarification and motivation

We're using the following characters in xrefcheck's output:

  1. ➥ (U+27A5): indicates a scanning/verification error.
  2. ⛀ (U+26C0): indicates a verification error for a local link
  3. ⛂ (U+26C2): indicates a verification error for an external link
  4. ⮚ (U+2B9A): indicates a file in the repository (when xrefcheck is invoked with -v)

There are some problems with this:

  • character (4) does not come a wide font support. Neither Ubuntu nor macOS come with any of the supported fonts, so the character won't be correcly rendered.
  • characters (2) and (3) have a better font support, but still not good:
    • They're displayed correctly in Ubuntu. AFAIK, Ubuntu comes with the FreeSerif font.
    • But they're not displayed correctly in macOS, it doesn't come with any of the supported fonts.

(I haven't checked Windows support, we'll likely have issues there too.)

Given these problems, I think it's better to simply avoid using exotic unicode characters.
Let's use other visual cues instead (coloring, indentation, etc).

  • I don't think we need characters (2) and (3). They're mainly used as a visual cue to distinguish between local and external links; but this distinction is already communicated via the Buildable LocationType in color.
  • Character (4) doesn't seem to be needed either: we already use colors and indentation for this.
  • Character (1) seems to have good support: Ubuntu via FreeSerif and macOS via Arial Unicode MS. I'm pretty sure it should also work on Windows out of the box, @Sorokin-Anton can you please double-check this?

Acceptance criteria

  • We're no longer using characters 2/3/4 as visual cues
  • If character 1 is supported on Windows out of the box, we leave it alone. Otherwise, let's decide what do about it.
@dcastro dcastro added this to the 0.3.0 milestone Oct 24, 2022
@Sorokin-Anton
Copy link
Contributor

Sorokin-Anton commented Oct 24, 2022

(1) works on Windows in any terminal if proper codepage was used (and in #164 we're setting correct codepage). Others are displayed correctly only in VSCode terminal (t uses some nice font), so looks like they are not very popular

@Martoon-00 Martoon-00 added the good first issue Good for newcomers label Nov 19, 2022
@aeqz aeqz self-assigned this Nov 28, 2022
aeqz added a commit that referenced this issue Nov 29, 2022
Problem: We are using unicode symbols as visual clues in the program output that are not commonly supported and are therefore not always displayed as intended.

Solution: Remove the usage of these symbols, as the program output is already using other visual clues and the result will remain understandable for the user.
@aeqz
Copy link
Contributor

aeqz commented Nov 29, 2022

(4) is being used as a bullet character in a list. Should we replace it with another character (e.g. -) or leave that kind of entries without a bullet character?

This is how it looks like without bullet character (README.md and docs/installation.md would be coloured although not visible here):

=== Repository data ===        

  README.md:
    - references:
      - reference (absolute) at src:3:1-64:
          - text: "installation document"
          - link: /docs/installation.md
          - anchor: installation-step
    - anchors:
          - xrefcheck-demo (header I) at src:1:1-16

  docs/installation.md:
    - references:
      - reference (external) at src:3:1-51:
          - text: "Markdown"
          - link: https://www.markdowntutorial.com/lssons
          - anchor: -
      - reference (relative) at src:7:1-18:
          - text: "Broken"
          - link: ./broken
          - anchor: -

And this is how it looks like with bullet character:

=== Repository data ===        

  - README.md:
    - references:
      - reference (absolute) at src:3:1-64:
          - text: "installation document"
          - link: /docs/installation.md
          - anchor: installation-step
    - anchors:
          - xrefcheck-demo (header I) at src:1:1-16

  - docs/installation.md:
    - references:
      - reference (external) at src:3:1-51:
          - text: "Markdown"
          - link: https://www.markdowntutorial.com/lssons
          - anchor: -
      - reference (relative) at src:7:1-18:
          - text: "Broken"
          - link: ./broken
          - anchor: -

@Martoon-00
Copy link
Member

That's a good question.

To me, the version without the bullet characters looks cleaner and the visual ordering does not seem to be lost. But it's 7 vs 3 votes from my side, I don't have a strong preference.

What do you think about this case?

@aeqz
Copy link
Contributor

aeqz commented Nov 29, 2022

I agree! The version without bullets looks nicer for me also.

aeqz added a commit that referenced this issue Nov 29, 2022
aeqz added a commit that referenced this issue Nov 29, 2022
aeqz added a commit that referenced this issue Nov 29, 2022
aeqz added a commit that referenced this issue Nov 29, 2022
aeqz added a commit that referenced this issue Nov 29, 2022
Problem: We are using unicode symbols as visual clues in the program output that are not commonly supported and are therefore not always displayed as intended.

Solution: Remove the usage of these symbols, as the program output is already using other visual clues and the result will remain understandable for the user.
aeqz added a commit that referenced this issue Nov 29, 2022
Problem: We are using unicode symbols as visual clues in the program output that are not commonly supported and are therefore not always displayed as intended.

Solution: Remove the usage of these symbols, as the program output is already using other visual clues and the result will remain understandable for the user.
aeqz added a commit that referenced this issue Dec 1, 2022
Problem: We are using unicode symbols as visual clues in the program output that are not commonly supported and are therefore not always displayed as intended.

Solution: Remove the usage of these symbols, as the program output is already using other visual clues and the result will remain understandable for the user.
@aeqz aeqz closed this as completed in #224 Dec 1, 2022
aeqz added a commit that referenced this issue Dec 1, 2022
…symbols

[#202] Remove poorly supported unicode symbols from the program output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants