ast-explorer icon indicating copy to clipboard operation
ast-explorer copied to clipboard

Feature multiple splitpane

Open Triumph-light opened this issue 6 months ago • 11 comments

Description

Main function: Add splitpane to support multi block display

Change point:

  1. Transformation of parser module: Change the current parser to an array type and store the corresponding parser for the display container
  2. Transformation of options module: Transform parserOptions and rawOptions into a {parserid: parserinfo} structure to store corresponding options information for local storage of options in the future. Since parserOptions was previously computed, it is now a complex data type that cannot be processed by computed, so it is implemented by watch
  3. UI module modification: Added expLayout to store corresponding display layouts, switching layouts will clear information based on the current Parser

Linked Issues

issue 140

Additional context

  1. Is the current structural design reasonable, and are there any other issues or hidden logic bugs with the type.
  2. The language of inputContainer is determined by using the currently active tab to determine whether this interaction is OK

Triumph-light avatar Jun 28 '25 15:06 Triumph-light

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ast-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2025 9:25am

vercel[bot] avatar Jun 28 '25 15:06 vercel[bot]

Now there are still some bugs and ts type that have not been repaired. I will fix them and then see if the code is optimized.

Triumph-light avatar Jun 28 '25 16:06 Triumph-light

  1. There are many bugs need to be fixed.
    • Try switch language, editor is disappeared.
    • Padding and text color, use label for parser name instead of id.
    • image
  2. Use left-right layout by default

sxzz avatar Jun 28 '25 21:06 sxzz

everything have been fixed and this issuse175 have been done, you can check it again. @sxzz thank you every much.😊

Triumph-light avatar Jul 02 '25 14:07 Triumph-light

There are a few details and bugs that need to be addressed. I will continue your work when I have some free time.

sxzz avatar Jul 06 '25 18:07 sxzz

There are a few details and bugs that need to be addressed. I will continue your work when I have some free time.

I also found some problems when I was using it, and I will also fix and optimize it together.

Triumph-light avatar Jul 11 '25 02:07 Triumph-light

FYI clicking this produces 2 tabs

image

Result of the click, I don't think this is intended to work like that

image

outslept avatar Jul 12 '25 20:07 outslept

仅供参考,单击此按钮将产生 2 个标签

图像 点击的结果,我不认为这是应该这样运作的 图像

What do you think it should be? Do you expect that there will be two different parsers after clicking? I think it's just a display of multiple layouts, similar to how VSCode splits files. The specific content is determined by the user's own choice. The advantage of this is that users can have more autonomy in their operations. When there is only one parser for certain data formats, it can still be compatible and allow for horizontal comparisons, such as simultaneous observation of tree and JSON formats.

Triumph-light avatar Jul 13 '25 02:07 Triumph-light

I totally get the idea. I was talking that going to this mode with presumably empty localstorage & no tabs - creates 2 tabs for parser output (displaying the exact same info). Shouldn't it be a single tab for 1 parser? Why do we double it for this state?

outslept avatar Jul 13 '25 02:07 outslept

I totally get the idea. I was talking that going to this mode with presumably empty localstorage & no tabs - creates 2 tabs for parser output (displaying the exact same info). Shouldn't it be a single tab for 1 parser? Why do we double it for this state?

How to understand "a single tab for 1 parser". I don't quite understand this.

You mean that when you switched to this kind of multi-tab for the first time, you parsed the same analysis twice, right? This is indeed a problem.

Triumph-light avatar Jul 13 '25 03:07 Triumph-light