Skip to content

Multi column layout broken after update to the new theming system #7793

Description

@maciazek

Hello,

I have admin panel created using EasyAdmin 5.0. In some of my CRUDs, I use two-column layouts as shown in screenshot below - as you can see, first column has lots of input fields and checkboxes, and second column has only a few collections. Recently I tried to update EasyAdmin to 5.5 and realized that my layout looks broken after update - collections in the second column are distributed over entire column's height, which doesn't look good in my opinion.
I would like to ask you if it is correct behavior of the new theming system, or is there something that could be done about this? If this is intended, feel free to close this issue and I will end up splitting my form into separate tabs, or maybe reorganize fields between columns, but first I would like to ask you if there is any other method to keep such a layout look correct?

Thank you for your work on this bundle!

Screenshots EasyAdmin 5.0: Image

EasyAdmin 5.5:

Image
Code
    public function configureFields(string $pageName): iterable
    {
        yield FormField::addColumn(6);
        yield IdField::new('id', new TranslatableMessage('competition.id', [], 'entities'))
            ->setMaxLength(26)
            ->hideOnForm()
        ;
        yield TextField::new('name', new TranslatableMessage('competition.name', [], 'entities'));
        yield TextField::new('friendlyId', new TranslatableMessage('competition.friendlyId', [], 'entities'))
            ->hideOnIndex()
            ->setRequired(false)
        ;
        yield TextField::new('description', new TranslatableMessage('competition.description', [], 'entities'));
        yield UrlField::new('bannerUrl', new TranslatableMessage('competition.bannerUrl', [], 'entities'));
        yield BooleanField::new('isNameDisplayed', new TranslatableMessage('competition.isNameDisplayed', [], 'entities'))
            ->renderAsSwitch(false)
            ->hideOnIndex()
        ;
        yield BooleanField::new('isDescriptionDisplayed', new TranslatableMessage('competition.isDescriptionDisplayed', [], 'entities'))
            ->renderAsSwitch(false)
            ->hideOnIndex()
        ;
        yield BooleanField::new('isSelfStatisticsDisplayed', new TranslatableMessage('competition.isSelfStatisticsDisplayed', [], 'entities'))
            ->renderAsSwitch(false)
            ->hideOnIndex()
        ;
        yield BooleanField::new('isPublic', new TranslatableMessage('competition.isPublic', [], 'entities'))
            ->renderAsSwitch(false)
            ->hideOnIndex()
        ;
        yield BooleanField::new('isResignAllowed', new TranslatableMessage('competition.isResignAllowed', [], 'entities'))
            ->renderAsSwitch(false)
            ->hideOnIndex()
        ;
        yield IntegerField::new('rankingEntriesPerPageCount', new TranslatableMessage('competition.rankingEntriesPerPageCount', [], 'entities'))
            ->hideOnIndex()
        ;
        yield DateTimeField::new('activeFrom', new TranslatableMessage('competition.activeFrom', [], 'entities'));
        yield DateTimeField::new('activeTo', new TranslatableMessage('competition.activeTo', [], 'entities'));
        yield DateTimeField::new('visibleFrom', new TranslatableMessage('competition.visibleFrom', [], 'entities'));
        yield DateTimeField::new('visibleTo', new TranslatableMessage('competition.visibleTo', [], 'entities'));
        yield IntegerField::new('attemptsLimit', new TranslatableMessage('competition.attemptsLimit', [], 'entities'));
        yield IntegerField::new('attemptsInterval', new TranslatableMessage('competition.attemptsInterval', [], 'entities'));
        yield FormField::addColumn(6);
        yield CollectionField::new('competitionTakePartConditions', new TranslatableMessage('competition.competitionTakePartConditions', [], 'entities'))
            ->setEntryType(CompetitionTakePartConditionType::class)
            ->hideOnIndex()
        ;
        yield CollectionField::new('competitionResources', new TranslatableMessage('competition.competitionResources', [], 'entities'))
            ->setEntryType(CompetitionResourceType::class)
            ->hideOnIndex()
        ;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions