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

Chore: Push burger slot to the same position as default burger #4037

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

franciscoh017
Copy link
Contributor

@franciscoh017 franciscoh017 commented Apr 17, 2024

Fixes #3906.

Proposed Changes

  • Push burger slot to the same position as default burger using ml-auto

Example

Before
image
image

After
image

Copy link

netlify bot commented Apr 17, 2024

Deploy Preview for buefy-org ready!

Name Link
🔨 Latest commit 404b431
🔍 Latest deploy log https://app.netlify.com/sites/buefy-org/deploys/6626ea72bdae75000973555f
😎 Deploy Preview https://deploy-preview-4037--buefy-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kikuomax
Copy link
Collaborator

@franciscoh017 Thanks for your PR! I will review and test your change.

@kikuomax
Copy link
Collaborator

@franciscoh017 I have tested with the following simple component:

<template>
    <b-navbar>
        <template #brand>
            <b-navbar-item>
                <img
                    src="https://raw.githubusercontent.com/buefy/buefy/dev/static/img/buefy-logo.png"
                    alt="Lightweight UI components for Vue.js based on Bulma"
                >
            </b-navbar-item>
        </template>
        <template #burger>
            <p>🍔</p>
        </template>
    </b-navbar>
</template>

I think it has a problem if the screen is wider than $burger-breakpoint (1024px by default), where the burger slot is displayed beside the brand logo. It should be invisible on a wide screen.

Narrow screen:
image

Wide screen:
image

@franciscoh017
Copy link
Contributor Author

franciscoh017 commented Apr 24, 2024

@kikuomax is it present on dev branch?

@kikuomax
Copy link
Collaborator

kikuomax commented May 9, 2024

@kikuomax is it present on dev branch?

@franciscoh017
I tested the above behavior on your branch (franciscoh017:franciscoh017/b-navbar-move-burger-slot-right). On dev branch, the burger icon always appears beside the brand logo whether the screen is wide or narrow.
image

@kikuomax
Copy link
Collaborator

kikuomax commented May 9, 2024

@franciscoh017 @wesdevpro
I would like to keep your PR as a workaround rather than merging it, because

  1. I do not think everyone would be happy with the burger slot contents wrapped in an <a> tag
  2. We may not have defined the behavior of the burger slot, but I think it should appear only when the screen is narrow

The following code should be equivalent to your PR:

        <template #burger>
            <a href="#" class="ml-auto" role="button" aria-label="menu">🍔</a>
        </template>

@franciscoh017
Copy link
Contributor Author

@franciscoh017 @wesdevpro I would like to keep your PR as a workaround rather than merging it, because

  1. I do not think everyone would be happy with the burger slot contents wrapped in an <a> tag
  2. We may not have defined the behavior of the burger slot, but I think it should appear only when the screen is narrow

The following code should be equivalent to your PR:

        <template #burger>
            <a href="#" class="ml-auto" role="button" aria-label="menu">🍔</a>
        </template>

Makes a lot of sense now that you mention it!

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.

b-navbar burger slot
2 participants