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

Date picker left border in button group #1324

Open
3 tasks done
mrextreme opened this issue Mar 14, 2025 · 4 comments
Open
3 tasks done

Date picker left border in button group #1324

mrextreme opened this issue Mar 14, 2025 · 4 comments

Comments

@mrextreme
Copy link

Flux version

v2.0.6

Livewire version

v3.6.2

Tailwind version

v4.0.7

Browser and Operating System

Chrome on macOS

What is the problem?

When i put a date picker in a button group, the border on the left does not match the border on the right.

Image

Code snippets

    <flux:button.group class="float-right" size="xs">
        <flux:button icon="chevron-left"></flux:button>
        <flux:date-picker/>
        <flux:button icon-trailing="chevron-right"></flux:button>
    </flux:button.group>

How do you expect it to work?

The border on the left side should match to border on the right

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.
@jeffchown
Copy link

jeffchown commented Mar 14, 2025

@mrextreme I would normally use a flux:input.group for this layout, but strangely, now the right-hand border is double thickness:

<flux:input.group size="xs">
    <flux:button icon="chevron-left" />
    <flux:date-picker/>
    <flux:button icon-trailing="chevron-right" />
</flux:input.group>

Image

@joshhanley ?

@kylewallace
Copy link

From memory I think this same issue applies to other element combinations such as input/button/button. Might just be a minor styling issue to address.

@joshhanley
Copy link
Member

joshhanley commented Mar 17, 2025

@mrextreme thanks for reporting! @jeffchown is correct, you should be using an input group for that, not a button group.

But as Jeff and @kylewallace noted, there are still issues with the input group borders.

I've investigated it and have a fair idea of what is wrong, but not 100% sure on the fix yet.

I tested a bunch of different variations and got the below results.

Image

This is the Volt component I used.

<?php

use Livewire\Attributes\Layout;
use Livewire\Volt\Component;

new
//#[Layout('components.layouts.rtl')]
class extends Component {
    //
}; ?>

<div class="flex flex-col">
    <flux:button.group class="float-right" size="xs">
        <flux:button icon="chevron-left"></flux:button>
        <flux:date-picker/>
        <flux:button icon-trailing="chevron-right"></flux:button>
    </flux:button.group>

    <flux:button.group class="float-right" size="xs">
        <flux:button icon="chevron-left"></flux:button>
        <flux:button/>
        <flux:button icon-trailing="chevron-right"></flux:button>
    </flux:button.group>

    <flux:input.group size="xs">
        <flux:button icon="chevron-left" />
        <flux:date-picker/>
        <flux:button icon-trailing="chevron-right" />
    </flux:input.group>

    <flux:input.group size="xs">
        <flux:button icon="chevron-left" />
        <flux:input />
        <flux:button icon-trailing="chevron-right" />
    </flux:input.group>

    <flux:input.group size="xs">
        <flux:input />
        <flux:input />
        <flux:input />
    </flux:input.group>

    <flux:input.group size="xs">
        <flux:button icon="chevron-left" />
        <flux:input />
        <flux:input />
        <flux:button icon-trailing="chevron-right" />
    </flux:input.group>

    <flux:input.group size="xs">
        <flux:button icon="chevron-left" />
        <flux:select>
        </flux:select>
        <flux:button icon-trailing="chevron-right" />
    </flux:input.group>

    <flux:input.group size="xs">
        <flux:button icon="chevron-left" />
        <flux:select variant="listbox">
        </flux:select>
        <flux:button icon-trailing="chevron-right" />
    </flux:input.group>

    <flux:input.group size="xs">
        <flux:input />
        <flux:button icon="chevron-left" />
        <flux:button icon-trailing="chevron-right" />
    </flux:input.group>

    <flux:input.group>
        <flux:input placeholder="Post title" />

        <flux:button icon="plus">New post</flux:button>
    </flux:input.group>

    <flux:input.group>
        <flux:select class="max-w-fit">
            <flux:select.option selected>USD</flux:select.option>
            <!-- ... -->
        </flux:select>

        <flux:input placeholder="$99.99" />
    </flux:input.group>

    <flux:input.group>
        <flux:input.group.prefix>https://</flux:input.group.prefix>

        <flux:input placeholder="example.com" />
    </flux:input.group>

    <flux:input.group>
        <flux:input placeholder="chunky-spaceship" />

        <flux:input.group.suffix>.brand.com</flux:input.group.suffix>
    </flux:input.group>

    <flux:input.group>
        <flux:input.group.prefix>https://</flux:input.group.prefix>

        <flux:input placeholder="mysite" />

        <flux:input.group.suffix>.brand.com</flux:input.group.suffix>
    </flux:input.group>

    <flux:input.group>
        <flux:input.group.prefix>https://</flux:input.group.prefix>

        <flux:input placeholder="mysite" />

        <flux:input.group.suffix>.brand.com</flux:input.group.suffix>
    </flux:input.group>

    <flux:input.group>
        <flux:input.group.prefix>https://</flux:input.group.prefix>

        <flux:date-picker />

        <flux:input.group.suffix>.brand.com</flux:input.group.suffix>
    </flux:input.group>
</div>

@jeffchown
Copy link

Thanks for the thorough variation testing, @joshhanley ! Helps to know in advance when/where we may run into the 'effect' until a fix is available.

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

No branches or pull requests

4 participants