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

BarDropdown is not working in Bulma #1114

Closed
stsrki opened this issue Jul 8, 2020 · 7 comments
Closed

BarDropdown is not working in Bulma #1114

stsrki opened this issue Jul 8, 2020 · 7 comments
Assignees
Labels
Type: Bug 🐞 Something isn't working
Milestone

Comments

@stsrki
Copy link
Collaborator

stsrki commented Jul 8, 2020

For dropdown menu the flag is-active must be set on BarItem instead of on BarDropdownMenu.

image

We have two options:

  1. Create internal Visible property on BarItem. It would be set from BarDropdown.

  2. Merge both components into one. So we have new component BarDropdownItem.

Current:

<BarItem>
    <BarDropdown>
        <BarDropdownToggle>More</BarDropdownToggle>
        <BarDropdownMenu>
            ...
        </BarDropdownMenu>
    </BarDropdown>
</BarItem>

New:

<BarDropdownItem>
    <BarDropdownToggle>More</BarDropdownToggle>
    <BarDropdownMenu>
        <BarDropdownItem To="https://blazorise.com/docs/quick-start/">
            Quick-Start Guide
        </BarDropdownItem>
        <BarDropdownItem To="https://blazorise.com/docs/usage/">
            Usage
        </BarDropdownItem>
    </BarDropdownMenu>
</BarDropdownItem>

@MitchellNZ

@stsrki stsrki added the Type: Bug 🐞 Something isn't working label Jul 8, 2020
@MitchellNZ
Copy link
Contributor

@stsrki nice catch!

I just took a look into this, and as far as I can tell, all that is missing is a .show class in the Bulma CSS.
In Blazorise.Bulma project styles _utilities.scss, I just added the code below, and it worked!

.show {
    display: block !important;
}

Additionally, I tried to convert BarItem and BarDropdown into one when I was doing the vertical Bar changes, but it was giving me problems with styling and other issues across the providers.. (also, the name BarDropdownItem is taken by menu items in the bar 😅)

@stsrki
Copy link
Collaborator Author

stsrki commented Jul 8, 2020

Your solution is the easiest. Better not introduce breaking changes :)

@MitchellNZ
Copy link
Contributor

@stsrki an even easier solution!

In the BulmaClassProvider we should change:
Show() => "show";
to
Show() => "is-block";

This is a default Bulma display class :)

@stsrki
Copy link
Collaborator Author

stsrki commented Jul 8, 2020

It's a hack, but it works :)

@MitchellNZ
Copy link
Contributor

Would you like me to make a dev091 patch or include as part of my dev092 bar changes?

@stsrki
Copy link
Collaborator Author

stsrki commented Jul 8, 2020

dev092

@MitchellNZ MitchellNZ self-assigned this Jul 8, 2020
@MitchellNZ MitchellNZ added this to the 0.9.2 milestone Jul 8, 2020
@MitchellNZ MitchellNZ mentioned this issue Sep 23, 2020
84 tasks
@MitchellNZ
Copy link
Contributor

Fixed as part of #1287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants