MozillaFoundation / foundation.mozilla.org

Mozilla Foundation website
https://foundation.mozilla.org
Mozilla Public License 2.0
389 stars 153 forks source link

Nav Update: Multipage campaigns with long page titles look...weird #1660

Closed alanmoo closed 5 years ago

alanmoo commented 6 years ago
image

Not a huge issue since we can say "don't do that" for now, but it should fail gracefully. @kristinashu Assigning to you to identify a design solution (or assign someone else who can provide one) After that's done, flip it back to me for dev assignment.

gvn commented 6 years ago

Live text gonna live text.

A design solution / implementation should accommodate multiple lines.

kristinashu commented 6 years ago

I put this at a low priority since right now this nav is only on the Aadhaar page, which has short nav names.

But the backup can be like this:

image
youriwims commented 5 years ago

screen shot 2019-01-10 at 11 24 32 am screen shot 2019-01-10 at 11 25 03 am

@kristinashu, this is how this nav currently looks with long names & 1/2 lines. I noticed in the screenshot you provided earlier, the vertical spacing between the text and underline was roughly half of what it is now. Do you want me to update that as well? Or maybe just add more spacing beneath the 1st nav row in the event there is a total of 2?

kristinashu commented 5 years ago

~@youriwims excellent catch! Yes, it would be great if you could also reduced the vertical space between the text and underline (reducing it my half might be a little too much tho).~

cc @mmmavis in case you have any input.

kristinashu commented 5 years ago

Actually sorry, let's keep it simple and leave the space between the text and underline as it!

So for this ticket, just add vertical space between 1st and 2nd line and make sure both lines have the light gray line.

youriwims commented 5 years ago

Thanks, will do!

Pomax commented 5 years ago

As far as I know this is only really a problem in development with autogenerated Faker text (which doesn't stick to using short titles for campaign pages, and so creates really bad looking menu headings =D). It's totally worth fixing the spacing, but I would say let's not try to make thing fit over multiple lines right now, especially as there's nothing on the live site that runs into this problem.

And maybe it's worth filing a follow-up issue here around fixing the Faker text for campaigns so that it generates more sensible text for this type of page /cc @alanmoo @cadecairos

youriwims commented 5 years ago

@Pomax the spacing and gray line is only an issue when the nav wraps. The nav's parent container has a margin-bottom so, vertical spacing will be okay if it's only one line. Like we talked about yesterday, I can always add a Flex gutter to increase vertical spacing if the nav wraps at the very least.

@kristinashu I'm able to improve the vertical spacing between multiple lines of the nav in the event it wraps. However, I'm unable to keep the gray line consistent on each line if wrapping does occur. Let me know how you would like me to move forward.

This solution to this issue seems to be dependent upon whether or not there will be rules applied to this type of nav detailing max words/characters per li (@Pomax ) in addition to potential nav wrapping design(@kristinashu ). Please keep me updated on what you both decide :)

kristinashu commented 5 years ago

Thank you @youriwims! So are you saying it would look something like this?

image

That's fine with me. As we've said, this is an edge case and hopefully no one will ever actually see it but it's good to have just in case!

@Pomax yes, updating the faker text to something more realistic would be helpful.

youriwims commented 5 years ago

This is similar to how it would appear. Currently, if we add the vertical spacing in case the nav wraps, it would technically be a margin-bottom that adds the "gutter"/spacing. This is how it would look: screen shot 2019-01-11 at 1 52 49 pm Unfortunately, whatever margin-bottom is on the top row items will also be on the bottom as well which is the cause for the large spacing below the second line of items. Below is what it would look like with the nav wrap spacing and decreased padding-bottom/spacing between the nav text & underline: Top & Bottom links hover screen shot 2019-01-11 at 1 56 51 pm Top Link hover screen shot 2019-01-11 at 1 57 20 pm

Let me know what you think is best.

kristinashu commented 5 years ago

Ok, feel free to reduce the padding! Just make sure that the light gray line lines up with the black underline like so:

image
mmmavis commented 5 years ago

@kristinashu since I'm pretty involved with the nav cleanup work...

Question: is this change just for multipage links on the campaign pages? Or any pages on Foundation site that have multipage links (e.g., opportunity page, about page, etc)

kristinashu commented 5 years ago

For now, let's just change it on the multi-page campaigns.

FYI to Youri: Mavis will eventually be working on turning this sub nav into a template. It will then be used everywhere that we have a horizontal sub nav (example: primary pages like About Us and campaign pages like Aadaar).

mmmavis commented 5 years ago

@youriwims do what you need to do to land the fix. Just tag me in the PR so I'm aware of the nav changes you are adding to the codebase 👍

youriwims commented 5 years ago

@kristinashu, if space is added between the nav wrap, the gray line won't line up with the black underine.

kristinashu commented 5 years ago

Chatted with Youri and sounds like there is no elegant design solution for this. We think the best way to proceed will be to update faker text and explore options to limit character count and number of nav items. I will open up tickets for these.

@youriwims if this all sounds right, please close this ticket!

youriwims commented 5 years ago

Sounds good, thanks @kristinashu :)