-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add Library page preview #1081
Add Library page preview #1081
Conversation
@VanessaScherma This is a really good PR. I will post observations and suggestions over multiple reviews. Preliminary comments. About the common assetsThe common assets are to be visible to all users. And they come from another git repository named common in dtaas group. For the example setup on gitlab.com, you see private user1 and a common repository. I am not sure of the amount of refactoring needed to achieve this change. As an immediate step, I suggest removing the common part for now and focus on merging the library feature private assets. Can you please share a screen recording of the different possibilities that this PR brings? This is to understand the requirements for each of the assets (as you implemented them) and the end result including DT execution. Rephrasing termsShopping cart --> Selection This is to keep the context a bit neutral. We don't have the accounting / payment feature yet. So "selection" might be a better word. Other comments
|
@VanessaScherma Github can't handle such huge code changes. It is difficult to provide review comments in the code. Please rebase at the earliest. |
Files .ts, concerning code logic and added in this PR, ordered by most important:
Files .ts, concerning code logic and modified in this PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are Reconfigure, Save and Close functions in this file?
function LibraryContent() { | ||
const auth = useAuth(); | ||
const getAndSetUsername = useGetAndSetUsername(); | ||
getAndSetUsername(auth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this used in the createTabs()
?
@VanessaScherma I found the following bugs in the code.
|
@VanessaScherma An update on the copying of config files. The problem happens only with mass-spring-damper example. If I put a json file in hello-world example, it gets copied into the new DT. |
1b0e8d6
into
INTO-CPS-Association:feature/distributed-demo
Title
Add Library page preview
Type of Change
Description
PR with the aim of solving issue #1080. It adds the Library page preview and integrates it with the existing creation functionality.
The Library page shows users the various assets by type and privacy. It displays a card for each asset, in a board similar to those used in the Manage tab and the Execute tab. The user can view the details (
README.md
file, if present) and add one or more assets to the shopping cart. The shopping cart keeps track of the assets added so that, when clicking on theProceed
button or opening the Create tab, the Editor sidebar presents new sections, one for each asset added. These sections contain the configuration files of the relevant asset so that the user can modify them to suit the use of the new digital twin.When a digital twin is created with assets, the relevant DT folder that is created in the user's GitLab profile will include both the DT files and a folder for each asset added, with the relevant files (the configuration files are updated with the content specified by the user during creation).
The Create tab now includes a switch to specify whether to make the new DT common or private. If the DT is common, it is also added to the
common/digital_twins folder
in the user's GitLab profile.A board search filter has also been added to simplify the search for assets or digital twins.
Testing
Unit and integration tests are currently in progress.
Impact
This change adds and integrates the use of the Library, completing the Build-Use-Share model on which the application is based.
Additional Information
None.
Checklist
existing code.