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

Consider wrapping Image fields in Groups #3

Open
ymdahi opened this issue Feb 18, 2022 · 2 comments
Open

Consider wrapping Image fields in Groups #3

ymdahi opened this issue Feb 18, 2022 · 2 comments

Comments

@ymdahi
Copy link

ymdahi commented Feb 18, 2022

The foreground and background images take up a significant amount of screen space. It might be easier to put both of these fields into their own groups like so:

  {
    "name": "imageBgGroup",
    "type": "group",
    "label": "Background Image",
    "importance": "high",
    "expanded": true,
    "fields": [
      {
        "name": "imageBackground",
        "label": "Background Image",
        "importance": "high",
        "type": "library",
        "options": [
          "H5P.Image 1.1"
        ],
        "optional": false,
        "description": "Image to be used in the background."
      }
  }

This has the added benefit of letting the author collapse the image panel to focus on other parts of the content config. And it does seem to be a common approach on your other content types (image choice, paragraph sort, etc.)

However, it doesn't seem like the group panel label accepts the label value and just reads "Untitled Image":
Screenshot 2022-02-17 222754

@otacke
Copy link
Owner

otacke commented Feb 18, 2022

See h5p/h5p-editor-php-library#134 for the label.
Images take up much space in general in any content type editor form and it's only common practice to put media in a group if they are optional (like the introductory media) or if they have extra settings that belong to the images so they should be grouped.

I agree that it would make sense to be able to (optionally be able to) collapse subcontent editor fields in general, but in my opinion that's something that should then be put into H5P core for "library" type fields (https://github.com/h5p/h5p-editor-php-library/blob/master/scripts/h5peditor-library.) in general instead of complicating to code in every content type.

I'll keep this issue open however and I'll add a note for the UX review that will be done by the H5P core team.

@otacke
Copy link
Owner

otacke commented Feb 18, 2022

request for review inluding UX question: https://h5ptechnology.atlassian.net/browse/HFP-3489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants