bblfsh / web

Web client for Babelfish server
http://dashboard.bblf.sh
GNU General Public License v3.0
23 stars 21 forks source link

select mode for parsing #161

Closed smacker closed 5 years ago

smacker commented 5 years ago

We have an open PR with support for UAST2 but we are missing a new feature provided by the new client: choose parsing mode.

New bblfsh can return UAST in 3 different formats:

A user should be able to choose one of them.

We need UI for that.

ricardobaeta commented 5 years ago

Hi @smacker ! Hope this initial proposal makes sense to you too!

image

It was all edited on the dom

smacker commented 5 years ago

Hi Ricardo! Thanks for such a quick response.

I just want to mention that to get a new type of UAST the code must be re-parsed. Sorry for not being clear about it in the original description. Your proposal still works but let me know if you want to change something knowing this.

ricardobaeta commented 5 years ago

Hi @smacker I got that from the start. But I aimed to keep the main interaction to one click, for not having to choose every time the parsing mode when you want to run. In this way you can choose the parsing mode in the visualisation block, and keep that mode and just keep on running in one-click, makes sense? :)

smacker commented 5 years ago

It definitely does.

The only thing that is bothering me if I change the code on the left and then change the mode, I would expect to see UAST for the old code (because the control is scoped to the uast). But it would trigger re-parsing and show me UAST for the new code.

I'm not sure how confusing it is. Let me implement the current proposal and then we can play with it and decide if we need any changes or not.