Skip to content

Comments

feat: Extract InspectorController, add panelBuilder & Zoomable Color Picker#19

Open
yelmuratoff wants to merge 14 commits intokekland:masterfrom
yelmuratoff:master
Open

feat: Extract InspectorController, add panelBuilder & Zoomable Color Picker#19
yelmuratoff wants to merge 14 commits intokekland:masterfrom
yelmuratoff:master

Conversation

@yelmuratoff
Copy link

Overall, there aren't any massive changes here. I just added some things I personally found missing during my work and fixed a couple of annoyances.

The main issue was the tight coupling between the UI and the logic. All the management logic was stuck inside the Inspector widget, which made customizing the panel impossible. I figured it was better to move the logic into a separate InspectorController and leave the UI implementation up to the developer.

  • Panel Builder: Thanks to the controller, you can now build the panel UI however you need using the panelBuilder callback. I kept it backward compatible, though: if you don't provide this parameter, it renders the standard interface just like before. So, for those who don't need customization, nothing changes visually.

  • Zoom for Color Picker: It was basically impossible to pick a specific pixel on touch screens because your finger blocked the view. I added a zoom overlay (magnifier) on press, so now you can actually see where you are pointing.

This should also resolve #7. Since users can now wrap the Inspector with any UI they want, I updated the example folder to demonstrate this using my draggable_panel package.

This PR is just a proposal/idea. Feel free to add to it, change whatever you see fit, or let me know if something needs a change. I just think these features would be useful to a lot of people.

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.

Panel alignment

1 participant