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

Omit #class for simple values #1004

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

amomchilov
Copy link

@amomchilov amomchilov commented Jul 28, 2023

Fixes ruby/vscode-rdbg#37

This PR depends on the changes in #1001. Only this last commit of this PR is unique to this change.

Description

The class of many values is self-evident and just clutters the UI:

Before After
image Screenshot 2023-07-28 at 9 29 43 AM

(false and nil don't have it, because of this bug described here)

This PR omits the usual #class member for instances of these classes:

  • NilClass
  • FalseClass
  • TrueClass
  • Symbol
  • String
  • Integer
  • Float
  • Class
  • Module
  • Array
  • Hash

The result is a much tidier UI you see in the "After" screenshot above.

This change still keeps the #class for other types, including subclasses of these simple types. For example, HashWithIndifferentAccess is a subclass of Hash. For clarity, we preserve its #class, but omit it for regular hashes.

Screenshot 2023-07-28 at 9 31 06 AM

@ko1
Copy link
Collaborator

ko1 commented Jan 19, 2024

Class and Module is not clear with the names so I want to leave them.

Copy link

launchable-app bot commented Nov 14, 2024

Tests Failed

✖️11 tests failed ✔️658 tests passed(1 flake)

7/23 test sessions failed

❌ Test session #3437636 failedos:ubuntu-latest test_task:test_protocoldetails on CI
🔔 no issues ✖️11 tests failed ✔️53 tests passed

❌ Test session #3437631 failedos:ubuntu-latest test_task:test_protocoldetails on CI
🔔 no issues ✖️11 tests failed ✔️52 tests passed

❌ Test session #3437630 failedos:ubuntu-latest test_task:test_protocoldetails on CI
🔔 no issues ✖️10 tests failed ✔️53 tests passed

❌ Test session #3437627 failedos:ubuntu-latest test_task:test_protocoldetails on CI
🔔 no issues ✖️11 tests failed ✔️53 tests passed

❌ Test session #3437626 failedos:ubuntu-latest test_task:test_protocoldetails on CI
🔔 no issues ✖️11 tests failed ✔️53 tests passed

❌ Test session #3437621 failedos:ubuntu-latest test_task:test_protocoldetails on CI
🔔 no issues ✖️11 tests failed ✔️53 tests passed

❌ Test session #3437619 failedos:ubuntu-latest test_task:test_protocoldetails on CI
🔔 no issues ✖️11 tests failed ✔️53 tests passed

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

Successfully merging this pull request may close these issues.

Ability to toggle display of #class items
3 participants