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

✨Frontend: Dynamic input ports #4210

Merged
merged 29 commits into from
May 16, 2023

Conversation

odeimaiz
Copy link
Member

@odeimaiz odeimaiz commented May 10, 2023

What do these changes do?

This PR implements a feature that will give users the impression of having dynamic number of inputs (only when it comes to data inputs).

In order to have this feature enabled, the service needs to provide minVisibleInputs info. From here on, the frontend and user will play with the number of visibible of the inputs. When instantiating a service, the minVisibleInputs will be shown, then the user can press the plus button to show more, the plus button will disappear when we reach the maximum number of inputs. Also if the last input gets populated, one more will automatically show up.

Demo with minVisibleInputs=2:
DynamicInputs

Related issue/s

related to ITISFoundation/osparc-issues#419

How to test

DevOps Checklist

@odeimaiz odeimaiz added a:frontend issue affecting the front-end (area group) changelog:🎨enhancement labels May 10, 2023
@odeimaiz odeimaiz added this to the Pastel de Nata milestone May 10, 2023
@odeimaiz odeimaiz self-assigned this May 10, 2023
@odeimaiz odeimaiz changed the title WIP: Dynamic input ports WIP: ✨Frontend: Dynamic input ports May 12, 2023
@odeimaiz odeimaiz changed the title WIP: ✨Frontend: Dynamic input ports ✨Frontend: Dynamic input ports May 16, 2023
@odeimaiz odeimaiz marked this pull request as ready for review May 16, 2023 09:57
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

I have some questions

  1. this feature was only for file ports, right?
  2. If so, how ports are shown if a service has its ports mixed: e.g. int, file, float, file, bool, file, file, file, bool.
  3. minVisibleInputs is a new attribute in the service input. Can you like the PR to the change in the backend?
  4. this value is set at the service metadata, right? i.e. for the example above you released a new version of plot2D

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks cool!

Copy link
Collaborator

@elisabettai elisabettai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very very cool!
A have a similar question to PC's one: does minVisibleInputs have to be in the service metadata? Does is work like boot-options?

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this one is merged I will have a followup PR for the backend to add support for this.

@codeclimate
Copy link

codeclimate bot commented May 16, 2023

Code Climate has analyzed commit 592e519 and detected 0 issues on this pull request.

View more on Code Climate.

@odeimaiz
Copy link
Member Author

odeimaiz commented May 16, 2023

  1. this feature was only for file ports, right?

Correct, as mentioned in the PR description only data inputs

  1. If so, how ports are shown if a service has its ports mixed: e.g. int, file, float, file, bool, file, file, file, bool.

I'm expecting the "dynamic" data inputs to go last in the inputs list

  1. minVisibleInputs is a new attribute in the service input. Can you like the PR to the change in the backend?
  2. this value is set at the service metadata, right? i.e. for the example above you released a new version of plot2D

Already answered by @GitHK 👌

@odeimaiz odeimaiz enabled auto-merge (squash) May 16, 2023 14:10
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@odeimaiz
Copy link
Member Author

A have a similar question to PC's one: does minVisibleInputs have to be in the service metadata? Does is work like boot-options?

Yes it is needed.

@odeimaiz odeimaiz merged commit 18deae1 into ITISFoundation:master May 16, 2023
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request May 30, 2023
24 tasks
@odeimaiz odeimaiz deleted the feature/dynamic-input-ports branch August 20, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:frontend issue affecting the front-end (area group)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants