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

Doc updated: Image component Focal Picker needs default settings #183

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

faisal-alvi
Copy link
Member

Description of the Change

This PR simply adds a note in the readme file for the image block component that default settings must be added when a focalPoint is used. Also capitalizes the first character in the description column.

Closes #182

How to test the Change

  1. Add component as outlined in the readme
  2. Add your attributes to block.json
{
  ...
  "attributes": {
    "imageId": {
      "type": "number"
    },
    "focalPoint": {
      "type": "object"
    }
  }
}
  1. See that the Focal Picker should render.

Changelog Entry

Updated - Document for an image component, mentioned that a focal picker needs default settings when used.

Credits

Props @colinswinney @faisal-alvi

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@faisal-alvi faisal-alvi self-assigned this Dec 20, 2022
Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

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

Thanks for these updates :)

I think we can merge this in as is. As a follow up I would like to actually change the implementation in the Image component to automatically have a fallback value for the focal point in place so that this is no longer an issue.

@fabiankaegy fabiankaegy merged commit 4f2f1b9 into develop Dec 20, 2022
@fabiankaegy fabiankaegy deleted the fix/182 branch December 20, 2022 10:00
@faisal-alvi
Copy link
Member Author

That is exactly what I thought earlier but then it seems like we also need to handle the onChangeFocalPoint's fallback function. So I skipped it and just changed the readme. :)

@fabiankaegy
Copy link
Member

@faisal-alvi I created #184

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

Successfully merging this pull request may close these issues.

Image component Focal Picker needs default settings
2 participants