pharo-ai / data-inspector

Evaluate and visualize DataFrame directly in the same Inspector window.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DoIt command is not working

jordanmontt opened this issue · comments

If we write something in the inspector, and then press the do it button, it produces an error:
Capture d’écran 2022-02-28 à 16 37 19

Capture d’écran 2022-02-28 à 16 37 24

If we press cmd + G, instead of opening another page, is does nothing.
@hernanmd

I was digging into this and it is not working because the evaluator is actually a Playground, not an inspector evaluator. I find three possible solutions:

  1. Remove the evaluator completely
  2. Replace it with the actual inspector evaluator
  3. have something like moose inspector

I personally incline to have something like moose inspector, an evaluator that can be hidden:
Capture d’écran 2022-03-01 à 10 55 59

Capture d’écran 2022-03-01 à 10 56 05

I can work on this. What do you think?

I would prefer to have the evaluator always present, so you can evaluate expressions without clicking buttons. One of the ideas of having this inspector is to minimize the amount of clicks and streamline the rapid development experience with datasets.

On the other hand I find Pharo's Playground more familiar, even for people who know a little bit about the programming environment. Using a more "niche" editor like Moose may take away familiarity and I still don't see that it has many advantages over Spec2's Playground. It is true that the Playground implementation is complex and it has taken me several days to understand how to extend this inspector to work together with this implementation.

The doIt with the key combination works, it would only be a problem to associate the callback of the button to the same behavior as the key combination. I think this is easier to re-implement all that inspired by the Moose editor. Anyway if you want to experiment it could be used as a configuration option.

Let me know because I have some notes written about how I extended the editor to include it in the inspector.

Yes, I agree with what you said. But I think it would be better to have an inspector evaluator instead of a little playground inside.

Having this part:
Capture d’écran 2022-03-07 à 17 22 18

instead of this:
Capture d’écran 2022-03-07 à 17 22 27

Can you send me your notes please? To see if I can put the inspector evaluator instead of the embedded playground

@jordanmontt The idea of using the Playground with the toolbar was to have a space where to add new buttons with functionality for the DataFrame using Commander2. What would be the advantage of adding a flat evaluator and then adding a button bar?

I will send you the notes by Discord

Hello Hernán @hernanmd I am not talking about adding a button bar, I am just saying that we should use the same inspector evaluator that is already available in the Inspector. Without any extra buttons.

These are my reasons of why I think that is better to se the inspector evaluator instead of the embedded Playground:

  • The 4 buttons of the PlayGround pollutes the UI
  • The thing that you said about adding buttons with functionality can be done also with the normal inspector evaluator. Because there is also access to self. So, theoretically, with the access to self the inspector tab and the Playgound are the same for this context.
  • With the embedded PlayGround we cannot do the meta+G click with opens a new inspector pane (I am very used to that because I do it all the time, I guess other people are too)
  • And finally, as the title of the issue says, if we click on the "Do it" button the debugger is opened with an exception

Ok, so according to our discussion, I deleted the other buttons of the toolbar and I put the visualisations into another tool. I removed the dependencies to new tools. The idea is that these tools can run in both Pharo inspector or completely independently of it :)

Capture d’écran 2022-03-21 à 15 25 44

Capture d’écran 2022-03-21 à 15 26 20