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

Excess field shown in INTERFACE #130

Open
stefjoosten opened this issue Mar 13, 2023 · 3 comments
Open

Excess field shown in INTERFACE #130

stefjoosten opened this issue Mar 13, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@stefjoosten
Copy link
Contributor

stefjoosten commented Mar 13, 2023

Suppose I have a field in an interface

CONTEXT IssuePrototype110

RELATION usedAt[Thing*Location]
 = [ ("o1", "L1")
   , ("o1", "L2")
   , ("o1", "L3")
   ]
   
INTERFACE Things : "_SESSION"[SESSION];V[SESSION*Thing] BOX
   [ things : I ]

INTERFACE Ifc FOR User: I[Thing] BOX
   [ "used at " : usedAt[Thing*Location] cRUd
   ]

ENDCONTEXT

In this example, the user cannot create new locations (c is lowercase) and the relation usedAt supports multiple locations per Thing (usedAt is not univalent).

In my browser, this is what I see in INTERFACE Ifc:
afbeelding

Feature request

I would like to see the "Add Location" field only if there is something to add. In this example, there is nothing to add and the empty box unjustly suggests that I can add a location.

So, in case the CRUD of a field forbids creation and allows update, and the population shown contains all elements of the concept, do NOT display a field to add an atom.

@stefjoosten stefjoosten added the enhancement New feature or request label Mar 13, 2023
@hanjoosten hanjoosten transferred this issue from AmpersandTarski/prototype Mar 13, 2023
@Michiel-s
Copy link
Member

I believe this is already picked up in the new frontend.

I'll do the check. Should be implemented in AtomicObjectComponent.

@Michiel-s Michiel-s self-assigned this Mar 19, 2023
@LiWeiYeh LiWeiYeh transferred this issue from AmpersandTarski/prototype-frontend Jul 10, 2023
@stefjoosten
Copy link
Contributor Author

@Michiel-s did you do the check? Can we close this?

@Michiel-s
Copy link
Member

It is implemented, but there is a bug I think. The ngIf for hiding the dropdown box uses a different options list compared to the filtered list for the options.

So currently the options don't show the items that are already included in the relation (that is good), but the dropdown is not hidden is there are no options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: New RAP5
Development

No branches or pull requests

2 participants