-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix Plone 4.3 with p.a.widgets 1.x edit modals #720
base: master
Are you sure you want to change the base?
Conversation
bah ... sorry for the mess in here ... tried to squash some commits, but gave up ... nevermind. |
@@ -96,7 +96,9 @@ $(document).ready(function() { | |||
|
|||
TitleMarkupSetup(); | |||
|
|||
if ($.fn.prepOverlay !== undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes on JS usually require an upgrade step to cook the resources; do you mind to check if we already have one in place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done that
@@ -0,0 +1,50 @@ | |||
import pkg_resources | |||
|
|||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not necessary as this code will only be execute if plone.app.widgets is installed and you already are checking for that on configure.zcml
.
also, for me is pretty important to document what you're doing here, so we can remove this in the future when we drop compatibility with Plone 4. that said, please add docstrings at the module and class levels explaining why this is needed..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure .. you're absolutely right ... i'll remove that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're still missing the docstrings.
and make flake8 happy
I'll do it in a separate pull request ...
I'll try to fix the tests today ... |
@hvelarde everything is green except one test in DEXTERITY_ONLY setup ... and I really do not know whats going wrong there. Can you give me some pointers? Could I add this test to the noncritical list (like |
@petschki those are mandelbugs; I restarted the builds for you; what happened with the idea of working on this directly in plone.app.widgets? I don't see the point on adding something that we must remove later. |
@hvelarde ah ... thanks for restarting. Now we're green. But you're right about RichTextWidget... let me check the pull request plone/plone.app.widgets#160 before merging this... |
plone/plone.app.widgets#163 was merged right now ... I'll request a release of p.a.widgets and cleanup the unused code here. |
do we still to add something in collective.cover, or just using the new widgets solve your problem? |
@hvelarde unfortunately we still have to map a custom FieldWidget adapter for the RichTextField (like its done in plone.app.widgets.dx_bbb) ... see plone/plone.app.widgets#164 ... my latest pull request would fix this, so everything would work supermagically plone/plone.app.widgets#165 |
ok, just keep me updated :-) |
@petschki do you mind to make a rebase? also, do you mind to update me the status on this after the changes you made on plone.app.widgets? |
@hvelarde sure ... I'll rebase later today. the |
we're having some mandelbugs with RF tests right now and I need to restart failing builds from time to time. I think the problem on the new build you just created seems to be related with a feature removed from zc.buildout, but I don't remember very well and I'm not sure. FWIW, buildout previously was able to downgrade itself and I think that's not the case anymore; that's why you're having: VersionConflict: (zc.buildout 2.9.4 (/home/travis/build/collective/collective.cover/eggs/zc.buildout-2.9.4-py2.7.egg), Requirement.parse('zc.buildout==1.7.1')) probably @idgserpro knows what is happening here. |
We have good news and bad news. Let's start with the good ones, the reason (and a possible workaround) of the error. When you use bootstrap.py, it downloads the latest zc.buildout (that now is 2.9.4). In Here is the insanity: after bootstraping, when running You can simulate it in your machine instead of travis, in a clean virtualenv environment (remember to comment a The bad news: It seems that it started in zc.buildout 2.9.x branch (https://travis-ci.org/collective/collective.cover/builds/247259422) but we don't have time to check exactly what happened to start having this issue. As miohtama used to say, life is hard and Plone is harder™.
There are two immediate workarounds:
Bad news part 2: now you have 20 failed tests after solving the Another question: why are you pinning |
@idgserpro thanks for the details ... pinned everything down and removed unneeded version pin of plone.app.widgets. not the buildout runs smooth ... I'm aware of those 20 errors. thats why I moved the environment to allow_failures .. |
You don't need the two pins, only one of them. It's a good practice as well to document the pins in the cfg itself, so in the future if you try to remove them its less work to know why it was pinned. Our suggestion to doc above the pins:
|
I'm not sure which one would be best practice here; I guess we should ask. |
I think we should open an issue at zc.buildout exposing the problem and, from there, we can know which one is the best approach. From a Plone perspective, since they are planning to get rid of bootstrap.py, they will probably be in favour of changing cfgs. |
twitter bootstrap sets its .hide class to `display:none !important` so we do not get any configure modal at all when assigning hide class in templates ... use the strategy to set `.modal { display:none }` like bootstrap does...
if($("body").hasClass("pat-plone-widgets")) { | ||
// XXX: reload tile content asynchronously here when destroying the modal | ||
// need to find the right event where to hook in | ||
return // exit here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
miss semicolon here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the branch is outdated; a review is not possible in this state.
see issue #719