Closed AndreyBespamyatnov closed 3 years ago
Fair enough. I will fix a demo adaptor to illustrate.
@berezovskyi @jamsden So, the main idea here is to replace the jsp-pages for the DUI and UI-Preview. This project uses Angular instead. And instead of generating specific jsp-pages for each class (that represent an OSLC resource type), the code works generically.
See the comments I placed under https://github.com/OSLC/lyo-adaptor-sample-modelling/pull/56 that I hope explains what this implies.
To see the results in action, you can see these 2 videos. The point of the 2 videos is to illustrate that one can configure what is to be shown in the search results, as well as in hte small and large previews.
Maybe we can schedule a demo? This is hard to visualize just from the code.
Re: Angular, IBM has standardized on React and the Carbon components. Just an f.y.i.
Sorry, missed this PR. Will try to check it over the weekend, too many things this week.
--
Andrew
On 30 September 2020 at 16:23:34, Jad El-khoury (notifications@github.com(mailto:notifications@github.com)) wrote:
@berezovskyi(https://github.com/berezovskyi) @jamsden(https://github.com/jamsden) So, the main idea here is to replace the jsp-pages for the DUI and UI-Preview. This project uses Angular instead. And instead of generating specific jsp-pages for each class (that represent an OSLC resource type), the code works generically.
See the comments I placed under OSLC/lyo-adaptor-sample-modelling#56(https://github.com/OSLC/lyo-adaptor-sample-modelling/pull/56) that I hope explains what this implies.
To see the results in action, you can see these 2 videos. The point of the 2 videos is to illustrate that one can configure what is to be shown in the search results, as well as in hte small and large previews.
https://kth.box.com/s/zuhizzctn9vja19udpasszcbbx2u59kg https://kth.box.com/s/9gvtqql6ixb94p4hptx8vapsceujh981
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub(https://github.com/eclipse/lyo.designer/pull/174#issuecomment-701424362), or unsubscribe(https://github.com/notifications/unsubscribe-auth/AAAPZXS7JVE57MY4TZIINATSIM5ONANCNFSM4ROLA6SQ).
No probs @berezovskyi. A demo and discussion would be good. I see this as a starting point for something that eventually replaces all jsp pages (at least for DUIs and Previews). But most likely, it will take some time before we start generating code to fit it.
I am not familiar with neither Angular nor React. So, we need to also consider the maintainability aspect of this contribution.
Thanks for the videos, looks nice!
I will likely get time to dig in and run it over the weekend but from a brief look:
jsonschema2pojo
. is there a way to avoid pushing blobs to git?oslc-ui/includes/PreviewFactory.java
? I as see from the build script, it is just copied for future compilation as part of the Lyo OSLC server? Second, what is the idea behind the generation process? let me see if I got it right: TypeScript classes are analysed and a matching JSON schema is generated with ts-json-schema-generator
which is then passed to jsonschema2pojo
to generate "matching" Java POJOs for the TS models. I checked the https://github.com/AndreyBespamyatnov/lyo.designer/blob/oslc-ui-temp/oslc-ui/src/app/preview/models.ts and the factory and it seems like that code won't change much. I was thinking there is something domain-specific being generated there. So, I think it can be just shipped as a regular Maven project that an OSLC server shall include in the build if they want to use your frontend. Then the ts-json-schema-generator
> jsonschema2pojo
chain can be just described in the README for the future developers to keep two models in sync.lyo.oslc-ui
or lyo.ui-angular
or lyo.frontend
?If we agree to have this, let us start by creating the repo. We can then deal with your questions at the same time.
jsonschema2pojo: @AndreyBespamyatnov Do we need this as part of the project?
PreviewFactory.java: This was manually created (by me). It is not compiled. It is indeed just to be copied together with the other java classes created by jsonschema2pojo. Besides that, I am not sure I got what you mean @berezovskyi
@jadelkhoury preferred repo name?
tough question. lyo.oslc-ui: is good, but is all too encompassing. It would be good name, if we can use that same repo for many other such components.
And how about "lyo.server-ui"?
server-ui is a bit strange. server implies backend and UI in this case is a frontend 🤔
otherwise we can just move this under lyo.server
until we can decide
not lyo.server. That always confuses me. Most of the stuff in lyo is about server.
Let' go with lyo.oslc-ui
I actually thought to move some stuff from core to server but always found smth better to do.
For tracking: https://bugs.eclipse.org/bugs/show_bug.cgi?id=567853
move some stuff from core to server: Not sure if it makes sense. oslc-client depends on a lot of stuff from core. It will not make sense if client becomes dependent on "server". Instead, I'd rather we move stuff from server to core.
https://github.com/eclipse/lyo.oslc-ui is now available. I'll push this code there, and we take it from there.
@berezovskyi @AndreyBespamyatnov I have now clone the code to https://github.com/eclipse/lyo.oslc-ui I can't do a pull-request, because there is just 1 branch there (oslc-ui). I am sure there is a more correct way but now it is done :-)
Changes I made:
Let's discuss first and make changes then.
First, I will merge this PR and delete the files from here to create a legal record of Andrei's PR as a commit, otherwise it looks like you are pushing his code without PR.
Second, I want the repo to work, so it's bad to have blobs but better to have blobs rather than to have a repo that does not build.
ok. You ignore my push then. But maybe you can then just update the start of the readme.md file with teh following? Just so we don'thave to work it out again.
After cloning this git repository
oslc-ui\libs\
. (that is, under the path oslc-ui\libs\jsonschema2pojo-1.0.2
, there should be bin
& lib
folders)npm run build:elements-prod
...Hi, I just reviewed this PR locally and applied it on one of the OSLC RefImpl adaptors. Seems to work great except for matching the iframe size but I think we can file it as a bug once we merge this in and then move it to the new repo. Please note I had to remove windows-specific bits in the NPM scripts and you might have to use Git Bash or WSL2 to run npm commands on this repo in the future under Windows.
@AndreyBespamyatnov great work and thank you!
@AndreyBespamyatnov @jadelkhoury if you don't have objections to my last commit, I will proceed with the merge and repo migration.
Go ahead and merge so that we can take some next steps. Thanks andrii
@berezovskyi Just to be sure, are you planning to do the next steps, or should i?
Yes, I will. Most likely when our current work is wrapped up this week.
Done, please head over to https://github.com/eclipse/lyo.oslc-ui for future work.
Tracking https://bugs.eclipse.org/bugs/show_bug.cgi?id=568317 to undo Jad's push because I lack admin rights on the repo.
@berezovskyi The Bugzilla issues seems to be resolved. Anything more you need to repair, before we are all set on that repo?
I think we are all set!
@berezovskyi @jamsden I will do a demo adpator that uses this new code for DUIs and UI previews. In the meantime, it's worth discussing where we should host this code.
it doesn't fit under Lyodesigner. I suggested this pull request to @AndreyBespamyatnov so that we can get started. Should we create a new repo under Lyo?