Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Comments

Rework dash-renderer setProps#478

Merged
Marc-Andre-Rivet merged 31 commits intomasterfrom
renderer-setprops-20rc1
Mar 11, 2019
Merged

Rework dash-renderer setProps#478
Marc-Andre-Rivet merged 31 commits intomasterfrom
renderer-setprops-20rc1

Conversation

@Marc-Andre-Rivet
Copy link
Contributor

No description provided.

"prettier": "^1.14.2",
"react": "^16.6.1",
"react-dom": "^16.6.1",
"react-dot-fragment": "^0.2.8",
Copy link
Contributor Author

@Marc-Andre-Rivet Marc-Andre-Rivet Mar 5, 2019

Choose a reason for hiding this comment

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

React 16 <Fragment /> polyfill -- gets rid of the wrapper <div /> and allows the same behavior as before -- the extra div could break existing styles or make styling more difficult

if (setProps) {
setProps(update);
}
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like before, inserting onClick prop for the real child to use

@Marc-Andre-Rivet Marc-Andre-Rivet changed the title [WIP] Rework dash-renderer setProps Rework dash-renderer setProps Mar 5, 2019
@Marc-Andre-Rivet Marc-Andre-Rivet marked this pull request as ready for review March 5, 2019 18:34
test('Tab can be clicked and will display its content', () => {
tabs.find('[value="tab-2"]').simulate('click');
const renderedContent = tabs.find('.tab-content > div').html();
const renderedContent = tabs.find(Tab).html();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking for the Tab component instead of some arbitrary selector

test('Tab without value will still be clickable', () => {
tabs.find('[value="tab-2"]').simulate('click');
const renderedContent = tabs.find('.tab-content > div').html();
const renderedContent = tabs.find(Tab).html();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test makes no sense. It's the exact copy of the one above with a different name. It's clearly not testing that case.. removing.

});
test('Tab without value will still be clickable', () => {
tabs.find('[value="tab-2"]').simulate('click');
const renderedContent = tabs.find('.tab-content > div').html();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test is an exact copy of the test above. Looks like copy-paste that was never modified. Removing.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃

@Marc-Andre-Rivet Marc-Andre-Rivet merged commit 63be1c2 into master Mar 11, 2019
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the renderer-setprops-20rc1 branch March 11, 2019 22:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants