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

Tweak the design of the detail page #5977

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

javiereguiluz
Copy link
Collaborator

Fixes #5970.

We now display a compact style similar to previous one. The label and the value of the field are displayed on the same line. The design is NOT exactly the same as before, but I think it looks better with the latest design changes.

Here's a before / after example (the screenshots are obfuscated, but it's clear that the new design is much more compact):

Before

detail-page-before

After

detail-page-after

@mahono
Copy link

mahono commented Oct 25, 2023

Interesting. You changed to align-right to still be able to not have horizontal lines. I like it. And people can probably still change to align-left and add/or add horizontal lines if they want with some simple CSS.

@javiereguiluz
Copy link
Collaborator Author

There's something I'm not sure about. For boolean fields, we have this:

<-- short label space -->  <-------------- long value space -------------->
     The contents of the   YES
   label of the checkbox

I wonder if it'd be better to flip the label/value order for boolean fields:

<-- short label space -->  <-------------- long value space -------------->
                      YES  The contents of the label of the checkbox

@john-dufrene-dev
Copy link
Contributor

john-dufrene-dev commented Oct 25, 2023

I like it too,
Do you think it's possible to have an option to add separate Line between field ?

@mahono
Copy link

mahono commented Oct 26, 2023

The horizontal lines can probably be added very easy via one or two lines of custom CSS.

But the flipping is really interesting. Maybe worth adding a setting in the Dashboard/Crud config classes?

@javiereguiluz javiereguiluz merged commit fc28b85 into EasyCorp:4.x Oct 26, 2023
@javiereguiluz
Copy link
Collaborator Author

I've merged these changes, including the label <-> value flip for boolean fields. I'll tag a new release so you can test it for real in your apps. Thanks!

@javiereguiluz javiereguiluz deleted the fix_5970 branch October 26, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Less attractive detail page rendering
3 participants