-
Notifications
You must be signed in to change notification settings - Fork 57
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
To Do #1
Comments
Hey! I haven't had time to look into this yet, I will try to get some time during this week :) |
Hey! I'm just looking into this and getting acquainted with how crispy forms templates work. Do you wanna have a chat when you're online? Would help me get up to speed! |
Would be good to have a chat, timing is a bit tricky for me at the moment given the current circumstances it's a muddle of work and family at the moment. I have some time, but to say "when" is the tricky bit. I'm doing a bit of work on the |crispy filter which will help, I think. Especially if I can put some tests together. In the meantime the short* answer is something like this:
The key 'gotcha' that I've encounted is miss understanding how the For other template packs they are quite oppinionated. e.g. for bootstrap4 it's I'd also like to add an oppinionated version to get people with a "good enough" form style that "just works"™️. I think we can do this by adding some classes to the labels and having a default "CSSContainer" or set of styles we can add. Really value your oppinion here as otherwise I'm copy and pasting off the examples on their website (which may be ok?). Finally, massive amounts of imposter syndrome at my end, my experiance of Tailwind is close to none. But "it's always a template issue", and we can solve these. '* Not so sure I'm good at the 'short' answer thing... |
I've added a crispy filter for tailwind. Carlton did mention using Here is the test. We therefore now have a working example where a standard form can have The test is pretty ugly but it atleast it shows the full form being rendered. We have classes being added to Now it's some design work, setting up the defaults which we think are appropriate. Do you have any views on this? |
Hey! Thanks for the elaborate answers, finally got some time to look through all of this. I was quite confused over how the filters work, how labels are applied and how the filter is used. This is a bit clearer now with the test you've written, turned out that's a great way for me to learn :) Especially how, like you said, we use Django to render each input using widgets. I am not sure what alternatives that could be done around CSSContainer. What I feel is that having really great default styling for each element that we support is key! It should be very straight forward to just throw I've been using Tailwind quite a bit this year and usually end up finding inspiration in https://tailwindui.com and the free examples. I am not sure if the free examples is something we are allowed to re-distribute, but if we can, I believe we can use them for all default stylings. I'm currently working on a hobby project and rendering all my forms using this project. I was thinking I could provide a few PRs containing good looking designs and tests as I progress, most importantly around selects and error messaging. Hoping to send in a few PRs today with the styling 👍 |
Are we planning to support rendering using tags in the future as well? I was looking into using Helpers to render extra submit buttons etc, but this doesn't seem to be working out of the box with how CrispyTailwindFieldNode is written today. |
We should support this. On the pull request I did on django-crispy-forms I got some buttons working where i added the CSS classes in the helper. Not in front of my laptop right now to have a deeper look (I'm surprised that rendering buttons try and call |
About |
Hi all So I had some time to reflect on this earlier today and I think there are 4 stages at which people should be able to use this template pack:
Thoughts? |
Hi all Hope you are all well, this week as been a bit crazy at my end so have been a bit quiet. I've setup the Tailwind test site over at You will need to install the dependencies of django-crispy-forms and this package for it to work (I installed it with I've also added a We're currently working on the bit with the red box round it - the other bits work as I've passed a styling into the form-helper (as per original PR to crispy-forms). |
A quick update on docs. I've added a GitHub action that on |
Hi! I came here from Will Vincent tweet. I think crispy-forms is a great project for the Django ecosystem and I tried Tailwind sometime ago and I really liked it.
@smithdc1 Could you indicate what are you working on exacty?
Thanks for all the initial work done in this project! 👍 |
Hi @marcorichetta 👋 Thank you for your interest in this package. To answer your questions: What am I working on Currently their are two main things. (We've moved on a bit since the image above, the standard widgets are now rendered nicely 'out of the box').
Grouped Checkboxes Grouped checkboxes is a much wider issue for crispy-forms; they look like this on bootstrap as well. Not yet solved why crispy-forms outputs the groups instead of individual items. Current PRs The top three need a final review but should be good to go 🤞. Can't quite remember about the status of the bottom one, I think most of it's been merged from memory. What Else The to do list in the first post is up to date. Probably the next thing to think about is prepend/postpend layouts. |
Hey all, Prepend/postpend layouts are now merged and the test coverage is also much higher. Now up to the 60% range vs about 30% with the first release. While the to-do list above is up to date I think the next steps are to:
|
Hey @smithdc1! First of all, many thanks for creating such a useful project. I really appreciate all your work on making it easier to use TailwindCSS with Django forms. ✨ As you may have heard, TailwindCSS v2.0 was just released this week, and while I don’t yet fully understand the scope of the new changes, the TailwindCSS folks have provided a v2 upgrade guide. It’s not clear to me what might be needed for this project to support the changes in the new version. Do you have any thoughts about what might be required? |
@justinmayer thanks for you kind comments and your pull requests. 🙏 Having read through their docs I don't think too much has changed that impacts this project. We didn't use the additional form module, but now that it's a recommended option it's something we could look at. I had a quick look this morning and the demo site seemed to work ok but I need to take a much closer look to be more certain. 🕵️ |
@smithdc1: My pleasure. I hope that the flood of PRs wasn't too annoying. I tried to break things up into discrete bits, since as a project maintainer myself I often find smaller, more-digestible submissions to be helpful. Many thanks for having a look at Tailwind CSS v2. When time affords, I look forward to hearing more about what changes (if any) might be afoot. 👣 |
Hi @justinmayer thanks for all your effort over the weekend. It is so very much appreciated. We were wondering if you would be interested in joining the |
Hi @smithdc1. You are most welcome. It was my pleasure to contribute to this very useful project. Thank you for the thoughtful invitation. I would be honored to join the |
Hi @carltongibson @bittermandel
I've pushed an initial commit based upon the pull request to django-crispy-forms master from last week. It's not much more than a POC at the moment, with the current tests passing.
Much work to be done; here are my current thoughts. This won't be a complete list but is enough to be getting on with for now - and probably we can get an inital release out before completing all of them.
EDIT: I've updated the below to split into sections to give some sort of percieved importance. I'll keep this list live for now.
Completed
{% load tailwind_field %}
|crispy
Sooner ™️
Field
layout objectLater
The text was updated successfully, but these errors were encountered: