naymspace / backpex

Backpex is a highly customizable administration panel for Phoenix LiveView applications.
https://backpex.live
MIT License
360 stars 20 forks source link

daisyUI theme support #427

Open thomasfortes opened 1 week ago

thomasfortes commented 1 week ago

closes #329

As far as I could check I removed all references to tailwind colors and replaced them with daisyUI semantic ones.

I tried my best to keep the semantic meaning wherever it was possible, but that means that some details will be lost because daisyUI is pretty limited in the amount of colors, to counterbalance that I took a couple liberties with the opacity filter in some places to keep the light theme as close as possible to the actual one.

Also fixed the docs since now backpex support themes :)

There's the question about how to change themes, the daisyUI site recommends theme-change, but this will be a problem for later.

If there's something missing or just plain wrong just let me know and I'll try to fix it as soon as possible.

thomasfortes commented 1 week ago

Forget about the last commit, a lot of issues that I didn't catch

Flo0807 commented 1 week ago

There is still an issue with tables on show views:

image

Flo0807 commented 1 week ago

I think we need a brighter ring for filter badges (right). Moreover, the filter button (left) seems to have a ring too bright.

image

Flo0807 commented 1 week ago

We should also update the (dashed) border for upload fields. It's too bright in dark mode:

image

Flo0807 commented 1 week ago

I don't know if it was an issue before, but the logout button in the user menu has a color too bright on hover. It should be the same as in the sidebar nav.

image

Flo0807 commented 1 week ago

Hey, I commented with some issues I found. Thanks again for your effort! 🙏

thomasfortes commented 1 week ago

@Flo0807 I fixed all these (and a few others that I found), just a question about the filter badges, at the moment the left one is using the secondary color and the second one just has a dark background without a ring or anything, could you check the colors and tell me what colors would you like?

I would go with accent for the left one, not so sure about the right one, maybe this.

image

Edit: Nevermind, misunderstood what you meant.

Flo0807 commented 1 week ago

I've found some more 😅

Boolean Field: The red color is too bright in light mode (see Posts demo resource)

image

The Logout button is now too bright in light mode

image

The landing page also needs some adjustments (I think we should update this as well, even though Backpex users won't benefit from it)

image

Is there a way to make the values brighter in Show and Index views so that there is a difference between normal black text and the values (like before)? Also, I think the color difference between the table header and the table is too much. But I know it's a challenge to apply shades when you can't work with real colors.

Below you can see the before and after. I think the before is a little better in terms of shading because now the table header is in focus because of the dark gray color. I also liked the light gray color of the values and item actions in the table.

image (1) image (2)

It's hard to make it look good for every theme, but maybe we can fix all of these 🚀

Flo0807 commented 1 week ago

I like the filter badges in the dark mode.

In light mode there is an issue with the x-icon (its too bright on hover):

image

In addition, I liked that the filter label had a background before. It separated the filter label and value:

image

Currently, there is now background anymore.

thomasfortes commented 1 week ago

As for the bright stuff, here it is normal, can you check if it isn't cached css or something?

image image

About the colors and brightness of text and the table headers, I will adjust the opacity and see if I can get a better result.

Flo0807 commented 1 week ago

As for the bright stuff, here it is normal, can you check if it isn't cached css or something?

You're right. It works now 🎉

thomasfortes commented 1 week ago

Had to put a div wrapper in the overflow section in the resource_index_table.html.heex because opacity was messing with it.

thomasfortes commented 1 week ago

Didn't do anything in the index mailing list form, but the rest is updated.

Flo0807 commented 1 week ago

The shading looks much better now, thank you! 🙏

Can we add the background to the action buttons (cancel and save) again? It should also be not much of a color difference. A little darker than the white background. What do you think?

image
Flo0807 commented 1 week ago

And can you format the code so that the pipeline succeeds?

Flo0807 commented 5 days ago

@thomasfortes I have updated the CI workflow. Can you merge develop back in here? Then the demo tests will hopefully succeed.

thomasfortes commented 5 days ago

Now this is an weird error, mix format --check-formatted don't find anything here.

Flo0807 commented 5 days ago

Now this is an weird error, mix format --check-formatted don't find anything here.

You need to execute it in the demo directory. We have two Mix projects: the demo and backpex itself.