-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(Dropdown): support MenuItem and Button types #642
Comments
Confirmed issue. We're lacking feature support here. This one is going to need some thought. The Menu ItemWhen a Dropdown is a Menu Item:
<div class="ui dropdown icon item"> ButtonWhen the Dropdown is a Button
Labeled Icon Button Dropdown<div class="ui floating labeled icon dropdown button"> Icon Button Dropdown<div class="ui icon top left pointing dropdown button"> ConclusionThere are no features here that require augmentation. Using augmentation actually does not work with the Button as Dropdown use case. Since augmentation will not solve all cases, I suggest we solve these use cases with a different consistent approach. We could handle this by adding an Whoever takes up this PR, we should also tackle #562 and add the missing Dropdown examples. Adding the examples alone will assist in working these use cases out. |
Update:
TODO:
Also note, many of the icon button fixes in the Dropdown docs are being completed in #1038. |
Hi guys, I would like to fix that. I'm planning add the icon class if Dropdown is an item and have no text nor placeholder (how you refer above in conclusion). |
Definitely! You'll find there are TODOs already in Dropdown.js as well as Dropdown-test.js, I believe. We also have Examples already made that will just need updated. |
Ok let's do it |
So, according rules above my plan is : const isItem = item && item.name === 'MenuItem'
const haveNoLabelAndPlaceHolder = !this.props.text && !this.props.placeholder
const isButton = !_isNil(button)
const haveTextAndIsLabeled = this.props.text && labeled
const needIconClassName = (isButton && haveTextAndIsLabeled) || (isItem && haveNoLabelAndPlaceHolder)
...
const classes = cx(
...
needIconClassName && useKeyOnly(icon, 'icon'),
...
) @levithomason do you think is correct? May be I can put this logic in new or existing file on lib folder? Do you agree? |
@pedrocostadev Sorry for the extreme delay. Yes, this approach sounds sane. How about we start a PR and iterate there instead? We're very close to shipping this one! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
There has been no activity in this thread for 90 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 90 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
This issue will be closed due to lack of activity for 12 months. If you’d like this to be reopened, just leave a comment; we do monitor them! |
There has been no activity in this thread for 180 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
I am new to open-source contributions and I want to contribute. Can I handle this issue? |
Hey, @Chris-R3 I would like to work on this issue. Could you please assign it to me? |
Steps
I'm using a
Dropdown as Menu.Item
and noticed that the width of the menu item seems off. I checked the Semantic-UI docs (3rd example) and they are using an additionalicon
class for the menu item if theDropdown
only contains anIcon
.Expected
class="ui dropdown icon item"
Result
class="ui dropdown item"
Workaround
adding
className='icon'
as additionalDropdown
propTestcase
http://codepen.io/Chlris-R3/pen/PGQbqZ
className='icon'
as additionalDropdown
propIs this a bug / missing feature / working as intended?
The text was updated successfully, but these errors were encountered: