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

Zinnia/admin/entry classes conflict with bootstrap #518

Open
2 of 3 tasks
odama626 opened this issue Jul 21, 2017 · 2 comments
Open
2 of 3 tasks

Zinnia/admin/entry classes conflict with bootstrap #518

odama626 opened this issue Jul 21, 2017 · 2 comments

Comments

@odama626
Copy link

Actual behavior

expanding fieldsets are set to display none

Expected behavior

open, close

I did some digging and found that it would be a really simple change (at least here) to get it compatible
simply adding the 'in' class to each one of the field entries make it work as expected.

'classes': ('collapse', 'collapse-closed')}),
to
'classes': ('collapse in', 'collapse-closed')}),

Steps to reproduce the issue

  1. override admin template, add bootstrap
  2. /admin/zinnia/entry/add
  3. click show on any fieldset

Specifications

I checked all three of your current branches, stylesheet collision would still occur

Disclaimer

Please read these questions carefully and answer honestly with an x
into all the boxes [ ]:

  • I have read the guidelines for contributing linked to above.
  • I have checked for duplicate issues.
  • This is not a support request.
@Fantomas42
Copy link
Owner

Hello,

Do you have an example to reproduce the step one ?
In this way I can see the fix.

@odama626
Copy link
Author

odama626 commented Mar 10, 2018

Sorry, I didn't see the reply until you closed it.

https://getbootstrap.com/docs/4.0/components/collapse/

bootstrap's collapse class hides content where as your collapse class shows content.

The conflict is the fieldsets classes in admin/entry.py
https://github.com/Fantomas42/django-blog-zinnia/blob/develop/zinnia/admin/entry.py

and possibly other places, after having thought about it since creating the issue.

I fixed the issue personally by adding a second class 'in' and changing the css to be

.collapse.in { }

Not elegant in the least but it resolved the conflict in my particular situation.

Furthermore, I don't think this would be trivial to fix because it would be a breaking change for anyone that has extended the fieldsets.

@Fantomas42 Fantomas42 reopened this Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants