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

Design for the aspect dropdown in the publisher #5718

Closed
wants to merge 2 commits into from
Closed

Design for the aspect dropdown in the publisher #5718

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 2, 2015

Before :

dropdown0

after :

dropdown

@Raven24
Copy link
Member

Raven24 commented Mar 2, 2015

not bad, but I'm not sure the button should be the same width as the contents. I somewhat like the "minimal" width.

@Flaburgan
Copy link
Member

Yeah this can probably break the design is someone has anaspectwithaverylongnamelikethat.

@jhass
Copy link
Member

jhass commented Mar 2, 2015

Yeah, me too. What I would consider changing is aligning the left side with the button instead of the right side though.

@ghost
Copy link
Author

ghost commented Mar 2, 2015

Yeah, I wanted to ask you advice on this one. Problem is : BS dropdown requires the following structure :

<div class="btn-group">
    <button class="btn dropdown-toggle" data-toggle="dropdown" href="#">
        Dropdown button
    </button>
    <ul class="dropdown-menu">
        <!-- dropdown menu links -->
    </ul>
</div>

I don't know how to set the width property of the <div> element to be equal to the width property of the <ul> element which has it's own width.

I could, as @jhass says, changing the aligning of the list and let the width unfixed. Problem is the following :

dropdown-problem

Which makes it elegant if the user has a very long aspect name but inelegant if not :

dropdown-problem1

Here is what I think : given that, anyway, the number of chars available for an aspect name is 20, let's adapt the width to that maximum width ?

@jhass
Copy link
Member

jhass commented Mar 2, 2015

Huh? I literally mean just changing the alignment, still keeping the round borders at the top.

@ghost
Copy link
Author

ghost commented Mar 2, 2015

I personnally don't like the BS' default space between the button and the dropdown. I find it visually illogic.

@ghost
Copy link
Author

ghost commented Mar 2, 2015

Here is my other proposition :

dropdown

With a fixed width set to the maximum with (for a 20 chars aspect name).

@jhass
Copy link
Member

jhass commented Mar 2, 2015

It still looks too big to me tbh, to much empty space in the button.

@ghost
Copy link
Author

ghost commented Mar 2, 2015

It still looks too big to me tbh, to much empty space in the button.

This is how it will look if someone has a very long aspect name anyway.

@jhass
Copy link
Member

jhass commented Mar 2, 2015

With that long aspect name it won't have as much empty space though.

Can we maybe achieve something like this? (Rough mockup, but you get the idea):

aspect_mockup

@ghost
Copy link
Author

ghost commented Mar 2, 2015

I find this really ugly :/

@jhass
Copy link
Member

jhass commented Mar 2, 2015

I didn't mean to do a pixel perfect version of how it should look like, just demonstrating the idea, use your imagination!

@ghost
Copy link
Author

ghost commented Mar 2, 2015

My imagination tells me it's not a good way. It looks really weird to me to have a button that is not the width of the dropdown.

Otherwise, the only solution I see is a bit of JS to dynamically adapt the button to the width of dropdown:

var width = $('.dropdown-menu').show().css('width');
$('.dropdown-menu').hide()
$('.btn-group').css('width', width);

@Flaburgan
Copy link
Member

It looks really weird to me to have a button that is not the width of the dropdown.

This is how the blueprint dropdown was though.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

Ok, here is my last proposition, dynamic width computed with a bit of JS code :

drpdwn1

And with very long aspect name :

drpdwn2

I have nothing more to propose :(

@goobertron
Copy link

I also don't like the over-long button, I'm afraid. Buttons should be only as long as necessary for the text contained within them, unless there's a very good reason to make a button longer. Having the drop-down longer than the button is no problem to me.

@jhass
Copy link
Member

jhass commented Mar 3, 2015

Yeah, still no improvement to me either I'm afraid.

@ghost
Copy link
Author

ghost commented Mar 3, 2015

Hmm... It seems like we are in a dead end :/
I revert the changes and leave only the pull-right change. Sounds good ?

@ghost
Copy link
Author

ghost commented Mar 11, 2015

Can this be merged ?

dropdown

@Flaburgan
Copy link
Member

@AugierLe42e the aspect dropdown is also used in hovercards and on the profile page. So this PR brings inconsistency.

If the box expands to the left and not to the right like you suggest, it's because the button is placed on the right of the profile page. So, someone with big aspect name would see the dropdown cut by the end of the screen if it was shown at the right instead of left like it is now.

@ghost
Copy link
Author

ghost commented Mar 12, 2015

Ok, closing it so.

@ghost ghost closed this Mar 12, 2015
@ghost ghost deleted the aspects-dropdown-design branch March 13, 2015 21:00
This pull request was closed.
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.

5 participants