Skip to content
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

Create a new workflow to test all of the UI #84

Open
HeriLFIU opened this issue Sep 23, 2024 · 0 comments
Open

Create a new workflow to test all of the UI #84

HeriLFIU opened this issue Sep 23, 2024 · 0 comments
Labels
epic_ui_vue3 Vue.js 3 epic_ui UI improvements

Comments

@HeriLFIU
Copy link
Collaborator

HeriLFIU commented Sep 23, 2024

Issue

Currently there is no way to test the UI in its entirety. This includes the UI located across the napps.

Importance

I believe that this issue is of high importance for the transition from vue2 to vue3 because:

  • The UI within the napps isn't being covered by @vue/compat, which means that the code within the napps isn't being tested/reviewed so it cannot be properly transitioned from Vue2 to Vue3.
  • Due to the fact that the napps are being loaded in at runtime, the dev server does not have access to these. So to test the Kytos UI, one has to bundle it and then copy and paste the files into the Kytos web UI folder. This is a bit tedius, time-consuming, and does not allow for quick testing of the UI.
  • Fixing this issue means that in the future other developers would have an easier time managing/working with the UI.

Current Fix

The best solution that I have in mind would be to create a bash script that would specifically look for the UI of each napp within the other repos and store them within a file. Then the webpack config files could be updated to use the DefinePlugin which replaces variables in the code with other values or expressions at compile time. This plugin would be used to conditionally utilize different pieces of code. The reason for this is to have two sections of code within the files responsible for loading the napps, one for dev where the files are directly accessible within the UI repo, and one for prod where the files are loaded in at runtime.
This would separate the prod environment from the dev environment and allow proper testing of all code.
There are also a few bugs that would need to be fixed along the way.
The webpack configuration files would need to be modified and new loaders would need to be added in order to bundle the napps together with the rest of the UI.

Related Issues

#86 (comment)
#87 (comment)
#88 (comment)

Additional Thoughts

It would also be nice to have some way to individually test the UI within each napp separately. Such as having a single toolbar component and some scripts that load it in for viewing and testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic_ui_vue3 Vue.js 3 epic_ui UI improvements
Projects
None yet
Development

No branches or pull requests

1 participant