sudara / melatonin_inspector

A JUCE module that gives you the ability to inspect and visually edit (non-destructively) components in your UI.
MIT License
145 stars 17 forks source link

Accesibility Change One: Show Acessible Info #99

Closed baconpaul closed 7 months ago

baconpaul commented 7 months ago

This change does two things

  1. If a widget is accessible with a title, use that title for the melatonin sidebar rather than clasname and preferentially over juce name. (If it has both an accessible title and juce name and they differ the juce name is shown additionally)

  2. collect and display basic accessible info in the inspector panel. these are title, type, value, and handler class.

baconpaul commented 7 months ago

I'd appreciate a review and feedback here

the one thing I couldn't figure out is how to make the sub section in a properties panel indent properly. It works and folds but doesn't look right. Heres' what I mean

Screenshot 2024-03-10 at 8 26 25 PM

Your thoughts welcome!

sudara commented 7 months ago

Awesome!

Properties have been flat so far, which is why nested styles aren't happy out of the box. If we wanted to go with nested, I guess we'd want to match the styles in the main navigation tree and ensure that toggling the section is "remembered" across selections.

Part of me wonders if "accessibility" should be a collapsable top level section (ala preview/color/properties)... I'll have to check the branch out to weigh in on that, so I'll get back to you!

baconpaul commented 7 months ago

OK! So I made the changes you suggested

Screenshot 2024-03-11 at 12 57 52 PM

You are right that the properties panel being last is 'special' and I didn't figure out quite how, but I solved that problem by having the accessibility panel come before that. LOL. Here's a screenshot from surge.

Happy to make any other changes. This is immediately become useful for me though with even just this change.

sudara commented 7 months ago

Love it!!!

I solved that problem by having the accessibility panel come before that

Heh, I figured :)

I'll find some time to check out the branch and merge tomorrow. I was hoping the tests would run too, that always trips me up on GitHub...

baconpaul commented 7 months ago

You probably need to approve me as a first time pr contributor - there’s usually a button but you may also need to do a review first

but we have pretty good pr actions in the clap juce extensions and clap wrapper projects if that helps too?

sudara commented 7 months ago

Yeah, just strange as I have Actions set to Require approval for first-time contributors who are new to GitHub (meaning it shouldn't restrict contributors with long standing GitHub accounts).

This keeps being a problem on my repos, so I opened a ticket with support, I don't see any way for me to run the actions here:

Arc - 2024-03-12 17@2x

sudara commented 7 months ago

This is perfect! Nice work! Thanks for being willing to move stuff top level, I think it works great.

Apparently I have 0 components with accessibility titles on my app! I guess it's time I get to work. I'll have to learn about roles and actions too somewhere — almost all of my components are hand rolled, I avoid JUCE's widgets where possible (except for text editors)

baconpaul commented 7 months ago

Apparently I have 0 components with accessibility titles on my app! I guess it's time I get to work. I'll have to learn about roles and actions too somewhere — almost all of my components are hand rolled, I avoid JUCE's widgets where possible (except for text editors)

I have custom widgets and custom handlers too. feel free to ask.

baconpaul commented 7 months ago

On actions your 'on' seems odd

on:
  workflow_dispatch:
  push:

vs in clap-wrapper we have

on:
  pull_request:
    branches:
      - main
      - next