Skip to content

Implement Invisible Characters Setting #2065

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

thecoolwinter
Copy link
Collaborator

@thecoolwinter thecoolwinter commented Jun 13, 2025

Description

Implements invisible character drawing in CodeEdit, including warning characters for ambiguous or invisible characters.

This is stored in a new submenu in the Text Editing settings page. I decided a pane like this was the best option, as a table cannot grow to fit it's contents or scroll when it's placed in some Forms (like our settings pages for some reason). The table also takes up a lot of space, so I felt it was a good use of a sheet.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screen.Recording.2025-06-16.at.4.16.50.PM.mov

@austincondiff
Copy link
Collaborator

austincondiff commented Jun 13, 2025

We should probably call this setting "Show invisible characters" which is a toggle. Then when toggled on, a button beside it that says "Configure..." is enabled which when clicked shows the sheet. Similar to this setting in macOS System Settings:

image image

That way we keep the setting simple, and then if the user wants to go into further configuration they can.

Also, typically there is no title header to the sheet, but the entire top is scrollable and the title is the first Section title like this

image

@thecoolwinter
Copy link
Collaborator Author

@austincondiff I've updated the settings page to be a little more flexible, including the top-level toggle you suggested. Let me know what you think

@austincondiff
Copy link
Collaborator

austincondiff commented Jun 16, 2025

There's some redundancy in the UI. Remove the top fixed header.

image

This UI doesn't seem too conventional

image

I'd almost rather each toggle be it's own section and toggling them on reveals more setting rows in the section instead of using the setting description as a label for child settings.

@austincondiff
Copy link
Collaborator

austincondiff commented Jun 16, 2025

Also, should "Warning characters" exist separately from invisible characters?

image

What if we instead had:
Invisible characters [Toggle] [Configure...]
Warning characters [Toggle] [Configure...]

I'd personally want invisible characters off but warning characters on (which I believe is the default for VS Code). The only way to do that now is to turn on invisible characters, then in configure disable everything, leaving warning characters on.

Also, missing a space in the description before the word "You" and after the period.

@thecoolwinter
Copy link
Collaborator Author

@austincondiff that's a good point, I'll make those changes.

@thecoolwinter
Copy link
Collaborator Author

Changes made, screen recording updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Render Whitespace Characters ✨ Invisible characters
2 participants