-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use react + typescript #69
Conversation
…and when selecting input
… a CORS situation. Supporting CORS on POST is not sufficient, we also need OPTIONS
Can't get it to work.
In a browser, "localhost" returns:
The current instructions and code work for me. This doesn't. Are there new instructions? |
@kaby76 You need to build the UI first, check the top-level readme |
btw there's a maven plugin for running node/yarn, but let's first check if Ter wants to adopt this |
After installing yarn the correct way (not the one that Ubuntu recommends; fixed via |
Wow, thanks Eric! This is incredibly generous. Let me evaluate it. I really have tried to avoid learning these web tool kits though, and I worry about complexity, but let me take a look. |
I'll happily walk you through the code if it helps. |
@kaby76 can you send a few screenshots? |
BTW, if I resize the LHS pane with the grammars to a narrow column, the vertical separator becomes a jagged line (third picture, the vertical separator normally is in the middle of the window), and I can no longer grab it to resize the LHS pane to make it larger. The code looks nice, though. :) Nice Typescript. |
I can fix that by setting a minimal width to the left pane
|
What is the status of this PR? Is it going to be merged, please? There are bugs in the client code that need to be fixed. #74 |
In the end guys I don't have time nor interest to learn react. I'm having fun with antlr lab as it is and I am completely overwhelmed with open source work, so I'm going to close. Sorry but thanks again for the huge contribution @ericvergnaud ! On the other hand, you guys could always create your own version at a different URL. I would be only too happy to drop an open source project from my list of work. (Note that I would be keeping lab.antlr.org up as my own software for my entertainment when the mood strikes me.) |
Hey Ter,
I thought I'd step-in before maintaining 'old-style' html/css/js becomes discouraging...
This is a react + typescript version of antlr-lab.
I hope you'll find it easier to fix bugs and introduce new features.
Typescript is obviously much nicer to use than js.
React is quite straightforward once you grasp the concept:
(see for example https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/)
On the backend I made a small change to fix a CORS issue, and also renamed 'static' to 'web' because the react-built web site contains a 'static' folder, which was confusing.
On the front-end, I've tried to reuse your CSS as much as possible. A few exceptions when using bootstrap components. I made the left-hand presentation a splash screen that can be dismissed, saves screen estate.
I've updated the instructions to make it easy to start.
This runs beautifully here: mvn install, create docker image, run docker image, pretty smooth
I hope you like it.
Let me know if you need help
(I hope you're not affected by the google layoffs...)
Cherry on the cake, you can now manually set the divide between left and right panes ;-)