Enhancement for the new Terminal

Hey Guys, brilliant work on the new Terminal.
It is not quite working the way I expected. It would be good if you could create both child and sibling elements. See this video explanation.

https://wpeasy.sharepoint.com/:v:/s/WPEasyOnboarding/EcVA63zxo0ZJlWrNr209Fh4B8sG9qWAPnvUxCLkmvkXR8g?e=4gIttU

Hi Alan!

Strange. Some of your commands gives me another output, check this video:

Regarding your more advanced commands: I think you want achieve something like:
> (block > text) + (block > heading)

So you need the block elements as siblings instead of the text & block becomes the sibling, right? This is currently not possible. That’s a challenge I haven’t managed yet. It would be much easier with an official API for the Vue instance. But I keep looking for possibilities :slight_smile:

Thanks Daniel,
The difference between your example and mine; I put a space between the element name and the class name. I just tried without the space and it worked properly.

Still, it would be great to have the ability to choose it the “next” element is a sibling or a child.

The current syntax creates child elements from “>”, perhaps a “+” could create a sibling element?

Thanks,
Alan.

Hi Alan! Adding siblings with the “+” already works.

Here an example:

Command: > block > div > div
Result:

Command: > block > div + div
Result:

Command: > block > div + div > heading
Result:

The last example is just the equivalent to how it get parsed in VSC for example. The command: section>div+div>span would output:

<section>
    <div></div>
    <div><span></span></div>
</section>

OK, I tried and it does work. My issue was I was putting spaces between the element and class, which confused the terminal.

However, when I use the + it does create siblings, but after doing so the overlay does not get removed and I see the following in the console.

bricksforge_terminal.js?ver=1674337372:1 Uncaught (in promise) TypeError: this.history.push is not a function
at BricksforgeTerminal.addHistory (bricksforge_terminal.js?ver=1674337372:1:12919)
at bricksforge_terminal.js?ver=1674337372:1:6080
at new Promise ()
at BricksforgeTerminal.execute (bricksforge_terminal.js?ver=1674337372:1:5966)
at HTMLDivElement. (bricksforge_terminal.js?ver=1674337372:1:1216)

Hi Alan! Oh, that’s interesting! Did this happening once? Or everytime?
Which command did you exactly use triggering the error? I cannot reproduce it here.

Thanks!

Sorry, Daniel, I did not see your response. I’ll try again and come back to you.

1 Like