EasyCorp / EasyCorp/EasyAdminBundle
Multi column layout broken after update to the new theming system
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.3k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 11
Description
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:EasyAdmin 5.5:
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()
;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the EasyAdmin 5.0-to-5.5 change using the shown configureFields method, especially FormField::addColumn(6) and the two CollectionField entries. Review the theming and column-layout implementation, then compare the rendered form with the screenshots; done means establishing whether the distributed collections are intended or restoring the compact second-column layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- design, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100