Skip to content

[added] Breadcrumb Component #1273

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

Closed
wants to merge 1 commit into from
Closed

[added] Breadcrumb Component #1273

wants to merge 1 commit into from

Conversation

ycdesu
Copy link
Contributor

@ycdesu ycdesu commented Sep 2, 2015

I added Breadcrumb component for issue #56. Please review this request, thanks :)

/**
* HTML id for the wrapper `ol` element
*/
id: React.PropTypes.string
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed it by passing {...props} into the ol element.

Copy link
Member

Choose a reason for hiding this comment

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

What's the point in specifying this as a propType though? You're not using it in the component code, nor attaching any special semantics to it - it's just getting passed through as an HTML attribute. Better to just drop this propType entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I notice that the Nav.js also defines className and id propTypes, and pass {...this.props} to child component. https://github.com/react-bootstrap/react-bootstrap/blob/master/src/Nav.js#L20-L30. Is there any reason why Nav.js define them in propTypes? Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

In that case it's to clarify that id and className are separate from what's attached to the wrapped ul element for documentation. You don't have that here, so it's not relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your explanation. I will remove the propTypes from the Breadcrumb.js.

@taion
Copy link
Member

taion commented Sep 5, 2015

Thanks for the PR and the extensive tests! Just left a few comments.

@taion
Copy link
Member

taion commented Sep 15, 2015

Very nice. LGTM. Can you squash these down to a single commit?

Need one more reviewer.

@ycdesu
Copy link
Contributor Author

ycdesu commented Sep 16, 2015

Done! Thanks for your review 👍

@AlexKVal
Copy link
Member

Now it looks like:
screen shot 2015-09-25 at 5 25 09 pm
and I would change it to
screen shot 2015-09-25 at 5 29 30 pm
Add active into the last "breadcrumb" in the example to make it on par with Bootstrap's example
screen shot 2015-09-25 at 5 26 40 pm

Then I would not use BootstrapMixin at all. It is extraneous in this particular case
and generates misleading docs properties, which are not in use with this component:
screen shot 2015-09-25 at 5 21 06 pm
And BootstrapMixin will be removed anyway #1257 ❇️

And this PR has to be rebased against the latest master codebase because there already new component has been added with the key={29}
https://github.com/react-bootstrap/react-bootstrap/pull/1337/files#diff-0a2cd7e5cb40bd61f3d1c7e6f852060dR956
#1293

All other LGTM

P.S. If @ycavatars you want, (and nobody else mind it), I could myself fix all those small "issues" just right after merging.

🍒

@ycdesu
Copy link
Contributor Author

ycdesu commented Sep 25, 2015

@AlexKVal Yes, please help me fix the issues 👍
In my country, it's Moon Festival now so I won't be able to code for several days. Thanks for your help :)

@AlexKVal
Copy link
Member

I'm closing this PR because of #1354
If #1354 will be merged, then your @ycavatars commit will be merged as yours too.
screen shot 2015-09-25 at 9 49 42 pm

Continue discussion in #1354

🍒

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.

3 participants