Skip to content

add resize doc #553

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

Merged
merged 8 commits into from
Jan 18, 2024
Merged

add resize doc #553

merged 8 commits into from
Jan 18, 2024

Conversation

trebor
Copy link
Contributor

@trebor trebor commented Jan 17, 2024

adding doc for resize. @mbostock i'm adding you for review here as i wanted to be sure i wasn't missing nuance on resize()

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

Can we just say

`resize`

instead of

**`resize()`**

when referencing the resize function? I don’t think we need so many different special typographic treatments.

Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

Also, and apologies for the duplicate effort, but I just added documentation for resize as part of #555 by way of moving it from the Dash library to the standard library.

I do think it would be nice to document the special behavior with one argument (width), the use of position: absolute to prevent a feedback loop, the support for the invalidation promise as an optional argument after the render function, the fact that it uses ResizeObserver under the hood, the fact that it requires a wrapper element, etc. But also not a high priority.

@trebor trebor changed the title Trebor/resize doc add resize doc Jan 17, 2024
@trebor
Copy link
Contributor Author

trebor commented Jan 17, 2024

no worries. how about i wait for #555 to land then i can reconcile what's in there and the suggestions above.

@allisonhorst allisonhorst mentioned this pull request Jan 18, 2024
9 tasks
@trebor
Copy link
Contributor Author

trebor commented Jan 18, 2024

@mbostock i've added the width only case and restyled it to match the other component docs. it looks like this now:

image

i'm merging this up into components so we can move that all along. we change/remove this section if winds up redundant.

@trebor trebor merged commit 9f10e32 into components Jan 18, 2024
@trebor trebor deleted the trebor/resize-doc branch January 18, 2024 18:00
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.

2 participants