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

Props incorrectly documented for FocalPointPicker #16056

Closed
dsifford opened this issue Jun 9, 2019 · 5 comments
Closed

Props incorrectly documented for FocalPointPicker #16056

dsifford opened this issue Jun 9, 2019 · 5 comments
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Developer Documentation Documentation for developers

Comments

@dsifford
Copy link
Contributor

dsifford commented Jun 9, 2019

Describe the bug
The docs for components/focal-point-picker state that dimensions is both a property, and required.

It appears that that prop was replaced with an internal function to get the dimensions from the DOM itself.

This should probably be removed to avoid confusion.

The relevant portion of the outdated docs:

### `dimensions`
- Type: `Object`
- Required: Yes
- Description: An object describing the height and width of the image. Requires two paramaters: `height`, `width`.

The relevant portion of the code:

const dimensions = {
width: this.imageRef.current.clientWidth,
height: this.imageRef.current.clientHeight,
};
const pickerDimensions = this.pickerDimensions();
const widthRatio = pickerDimensions.width / dimensions.width;
const heightRatio = pickerDimensions.height / dimensions.height;

@swissspidy swissspidy added [Package] Components /packages/components [Type] Developer Documentation Documentation for developers labels Jun 9, 2019
@swissspidy swissspidy changed the title [docs] Props incorrectly documented for FocalPointPicker Props incorrectly documented for FocalPointPicker Jun 9, 2019
@oandregal oandregal added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Jun 4, 2020
@UdokaVrede
Copy link

UdokaVrede commented Aug 24, 2020

@nosolosw can I get further detail on this

@oandregal
Copy link
Member

Sure! The issue here is that the docs of the component don't reflect what the code really does at the moment. Specifically, the dimensions property is no longer used. It'd be good to review whether the docs need other changes and prepare a Pull Request that updates them. Is this helpful?

@UdokaVrede
Copy link

If I am getting right, I'm to show what #dimensions does in the readme.md does in the code.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 21, 2021
@seanvarnham
Copy link

Hi team, has there been any movement on this issue?

@skorasaurus
Copy link
Member

Thanks for reporting; this was fixed in 4f21fdb and c5ae463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants