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

Dropdown Enhancement: Markup re-usage #261

Merged
merged 1 commit into from
Jan 15, 2020
Merged

Conversation

sick-sad-world
Copy link
Contributor

@sick-sad-world sick-sad-world commented Jan 10, 2020

Bug with markup duplication observed at: https://ray.wework.com/components/dropdown/
Root cause: Due to frequent update of Gatsby React component and possibility that DOM element (which used as Key to differ instances) may fail, so possible multi-instantiation of specific component. (Which may lead to creating exceeding markup in case of Dropdown component).
See screenshot
Screen Shot 2020-01-10 at 4 27 27 PM

Component enhancement as a part of solution:
Now Dropdown will check markup that needs to be added to layout, if it already been placed (by hand, or by previous instance).
Added tests to check this specific case.

Test URL: https://deploy-preview-261--ray-docs.netlify.com/components/dropdown/

@sick-sad-world sick-sad-world requested a review from a team as a code owner January 10, 2020 14:32
@kconst
Copy link

kconst commented Jan 15, 2020

Thanks for the update! Looks good.

@kconst kconst merged commit aace178 into master Jan 15, 2020
@delete-merged-branch delete-merged-branch bot deleted the ihor/dropdown/markup_reusage branch January 15, 2020 15:42
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