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

Pannel to add a new theme from organization show using "+" doesn't show Add button #189

Open
fluidlog opened this issue Jul 31, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@fluidlog
Copy link
Contributor

fluidlog commented Jul 31, 2024

Décrivez le bug
Add a new theme from organization show using "+" does'nt work directly.

image

Etapes pour reproduire

  1. On a organisation panel
  2. click on "+" (if there is a theme on the right)
  3. A pannel appear, but we can create new theme

Possible solution
If I press on two letter, I can see the "Add" button
image

Then, I can create a new theme.

image

And the theme is well created
image

I would not like to type 2 letters to have the "Add" button.

I use Archipelago 2.1.0.

@fluidlog fluidlog added the bug Something isn't working label Jul 31, 2024
@fluidlog fluidlog changed the title Add a new theme from organization show using "+" does'nt work fine directly Pannel to add a new theme from organization show using "+" doesn't show Add button Jul 31, 2024
@mguihal mguihal transferred this issue from assemblee-virtuelle/semapps Jul 31, 2024
@fluidlog
Copy link
Contributor Author

fluidlog commented Aug 1, 2024

Moreover, when the pannel appear, I can't select theme in the list when I click on sur line.

image

@SlyRock
Copy link

SlyRock commented Aug 27, 2024

Seems to me there are two issues at stake here, both related to the QuickAppendReferenceArrayField component from @semapps/field-components package :

  1. The need to be able to create a theme without first having to search the existing ones, when using that component

I wouldn't call that one "a bug", looks like an evolution request to me and I think it would need to be processed as such to address properly the related use cases.
For example : Should we allow users to create a new referenced resource without checking beforehand that it doesn't already exist ? Could lead to duplicates.
Analyzing this also led to highlighting another issue : The Theme resource is using a LexiconImportForm component from @semapps/interop-components that link themes to a dictionary in the Create form. The QuickAppendReferenceArrayField compoenent doesn't seem do that which allows to create Themes unrelated to the dictionary.

  1. The fact that a specific state of an Organization resource makes it impossible to append an existing theme using that component

To be precise : When an organization has Members (which is a reified relation), the edit page produces a correct value for the pair:organizationOfMembership node of the payload for the put operation on the resource, in the same situation the QuickAppendReferenceArrayField produces an incorrect value :

Value produced by the edit page :

"pair:organizationOfMembership":[
      {
         "pair:membershipActor":"http://localhost:3000/users/sylvain.roquebert",
         "pair:membershipRole":"http://localhost:3000/membership-roles/developper",
         "type":"pair:MembershipAssociation"
      }
   ],

Value produced by the QuickAppendReferenceArrayField component:

    "pair:organizationOfMembership": [
        "http://localhost:3000/membership-associations/ea0881ec-6ede-4d12-ac10-3942be3abf82"
    ],

It seems related to the dataprovider.

At my level of onboarding on this project this clearly something I need help sorting out :)

@mguihal
Copy link
Collaborator

mguihal commented Oct 5, 2024

Is it really usefull to display this edit component on the show pages for resources?
Some drawbacks:

  • Not displayed if no themes already provided
  • Not redesigned after the tree structure of themes introduced a few months ago
  • UX thinking: nothing on the page is editable inline, except themes with that component => it is confuse for users

I suggest to hide this component to force users to go Edit page to update the organization. This way, we can also fully concentrate to improve the only themes component on the Edit pages (which also has a lack of great UI).

If in the future we redesign the Show page to make it editable in a more friendly way, we'll think about what to do to with themes.

@srosset81
Copy link
Contributor

Personnaly I find the ability to add directly new links between pages very useful. For me this is different from editing the resource. Also when a user has only a acl:Append right (and not acl:Write right), these buttons can be shown, while the Edit button will be hidden. I agree it is far from perfect the way it is now, but removing it completely is, for me, like removing a feature that can have real interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants