filament icon indicating copy to clipboard operation
filament copied to clipboard

Add/vertical tabs

Open Bender-0 opened this issue 1 year ago • 1 comments

Description

Adds a vertical orientation option for Tabs component

Visual changes

Before

image

After

image


Tabs::make('Tabs')
    ->vertical() // Makes the tabs display vertically
    ->tabs([
        Tabs\Tab::make('Tab 1')
            ->schema([
                // ...
            ]),
        Tabs\Tab::make('Tab 2')
            ->schema([
                // ...
            ]),
        Tabs\Tab::make('Tab 3')
            ->schema([
                // ...
            ]),
    ])

Functional changes

  • [✓] Code style has been fixed by running the composer cs command.
  • [✓] Changes have been tested to not break existing functionality.
  • [ ] Documentation is up-to-date.

Bender-0 avatar Oct 03 '24 15:10 Bender-0

when can see v4 ?

NazarAli avatar Oct 13 '24 10:10 NazarAli

Hi, i made PR for vertical Wizard in v3, but it was closed for new features.

If someone wants to rebase/refactor/use it for v4...

It feels similar to the vertical Tabs situation, including ->vertical() method on Wizard.

Discussion: https://github.com/filamentphp/filament/discussions/13894 PR for v3: https://github.com/filamentphp/filament/pull/13919

PS: Feel free to do whatever with the old PR, sadly I won't have time for this anytime soon (probably not until v4 is out and i will be considering upgrade of my project, which currently uses the css override from the discussion)

vikijel avatar Dec 03 '24 10:12 vikijel

Alright no worries, thanks for letting me know!

danharrin avatar Dec 03 '24 11:12 danharrin

Alright no worries, thanks for letting me know!

@danharrin This might be a misunderstanding, I am not author of this PR (vertical Tabs), @Bender-0 is.

I only tried to link it to my old PR (vertical Wizard) as it felt related, so they could implement the vertical style for more components than just Tabs).

I would like v4 to have vertical styles/layouts, so please reconsider reopening this and waiting for Bender / someone to finish it

Sorry for the confusion

vikijel avatar Dec 03 '24 12:12 vikijel

Sorry, I didn't check the author

danharrin avatar Dec 03 '24 12:12 danharrin

Please request a review from me when all other changes have been implemented.

zepfietje avatar Dec 03 '24 13:12 zepfietje

Hi, i made PR for vertical Wizard in v3, but it was closed for new features.

If someone wants to rebase/refactor/use it for v4...

It feels similar to the vertical Tabs situation, including ->vertical() method on Wizard.

Discussion: #13894 PR for v3: #13919

PS: Feel free to do whatever with the old PR, sadly I won't have time for this anytime soon (probably not until v4 is out and i will be considering upgrade of my project, which currently uses the css override from the discussion)

Hi @vikijel i will check your PR and see where things go from there :)

Bender-0 avatar Dec 03 '24 16:12 Bender-0

@Bender-0 can you please rebase these changes onto v4? The Blade components have been refactored and the Tailwind classes are now in CSS files

Hi @danharrin is there a deadline to do that? Also i have uncommitted addiction (Alignment: start/left, center, end/right for horizontal tabs and start/top, center, end/bottom for the vertical tabs) should i push them in the same PR or create a new PR "add/tabs-alignment "?

Bender-0 avatar Dec 03 '24 16:12 Bender-0

No deadline, but if you're not planning to work on it within the next month I would rather close this and then you can open it once you do get to it.

Also I would rather PRs are smaller so if you want to add the alignment stuff to a separate PR that is based on top of your vertical tabs one that would be easier to review.

danharrin avatar Dec 04 '24 12:12 danharrin

No deadline, but if you're not planning to work on it within the next month I would rather close this and then you can open it once you do get to it.

Also I would rather PRs are smaller so if you want to add the alignment stuff to a separate PR that is based on top of your vertical tabs one that would be easier to review.

I'm out of the country for the next 2 weeks, but i can rebase this PR in a few hours. As for the alignment stuf i will create a new PR once I get back.

Bender-0 avatar Dec 04 '24 16:12 Bender-0

Unfortunately this branch still has many conflicts @Bender-0

danharrin avatar Dec 09 '24 08:12 danharrin

Hi @danharrin, I'm currently out of the country and unable to access my development environment to resolve the conflicts. I anticipate returning on the 17th and will prioritize resolving the conflicts as soon as possible.

Bender-0 avatar Dec 12 '24 17:12 Bender-0

@danharrin so i pulled and rebased onto 4.x and created a new empty commit "rebased onto 4.x ". on my terminal git says everything up-to-date. but i still see the conflicts here and not sure why... any idea why is that? Am i missing something?

Bender-0 avatar Dec 22 '24 10:12 Bender-0

@Bender-0 please follow these steps:

First, update your fork by going to your fork's Github page and pressing "Sync Fork"

From your terminal:

git checkout 4.x git pull git checkout add/vertical-tabs git merge 4.x

You'll see the conflicts.

PS: the schema package got renamed to schemas so you'll need move your changes to the correct location.

saade avatar Dec 23 '24 13:12 saade

@Bender-0 please follow these steps:

First, update your fork by going to your fork's Github page and pressing "Sync Fork"

From your terminal:

git checkout 4.x git pull git checkout add/vertical-tabs git merge 4.x

You'll see the conflicts.

PS: the schema package got renamed to schemas so you'll need move your changes to the correct location.

thank you @saade. it was easier to redo it from the start so i closed this on and opened a new PR #15176 :D

Bender-0 avatar Dec 24 '24 19:12 Bender-0