Skip to content

[fix]: [pfe-navigation 1.x] doesn't render slot="mobile-login" unless slot"mobile-language" exists. #1106

@ryanissamson

Description

@ryanissamson

Discovered in our site, pfe-navigation doesn't render slot="mobile-login" unless slot"mobile-language" exists.

Impacted component(s)

In our HTML, we have:

<a href="https://github.com/login" slot="mobile-login" pfe-icon="web-user" tabindex="-1">Log in</a>

This results in the Log in link not being displayed on mobile.

But if we alter it to include:

<a href="https://github.com/login" class="rh-user-loggedout" slot="mobile-login" pfe-icon="web-user" tabindex="-1">Log in</a> <a href="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/url-to-language-page" slot="mobile-language" pfe-icon="web-globe">English</a>
Then both links render. The issue is, our site does not have a mobile language link.

Steps to reproduce

  1. Add a slot in HTML for mobile-login only.
  2. Observe that the slot isn't used.

Expected behavior

A mobile-login link can be used by itself.

Screenshots

Screen Shot 2020-09-23 at 1 47 54 PM

Screen Shot 2020-09-23 at 1 48 14 PM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions