? Success

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
9 Jan 2015

Move form field user to layouts and use Bootstrap modal

This is a redo of #4514 with some code from @phproberto and @wilsonge PR: #3231
Now user field is using layouts and there are two sets:
One on the root/layouts this is for B/C (mootools modal)
And another on the templates isis this is using bootstrap modal

Actual rendering:

Isis:
screen shot 2015-01-09 at 10 58 23

B/C

None

Testing

Try to re edit an article on backend, go to publishing tab and select a user.

avatar dgt41 dgt41 - open - 9 Jan 2015
avatar jissues-bot jissues-bot - change - 9 Jan 2015
Labels Added: ?
avatar jissues-bot jissues-bot - change - 9 Jan 2015
Labels Added: ?
avatar richard67
richard67 - comment - 9 Jan 2015

@test Success. Works as desired, and Hathor, too. Modal allows in both templates changing the creator, and filtering by category works, too, in both.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.
avatar richard67 richard67 - test_item - 9 Jan 2015 - Tested successfully
avatar richard67
richard67 - comment - 9 Jan 2015

P.S.: Hathor of course with mootools modal.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.
avatar wilsonge
wilsonge - comment - 10 Jan 2015

Note to committers DO NOT merge this for 3.4. Wait until me and @phproberto have worked out the final desired form for a rendering class.

avatar gunjanpatel
gunjanpatel - comment - 10 Jan 2015

After applying patch I can see boostrapped modal window.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.
avatar gunjanpatel gunjanpatel - test_item - 10 Jan 2015 - Tested successfully
avatar dgt41
dgt41 - comment - 10 Jan 2015

@richard67 @gunjanpatel thanks for the tests, but as @wilsonge stated in his comment this might have to wait a little bit more...

avatar richard67
richard67 - comment - 10 Jan 2015

@dgt41 Yes, I've seen ... was easy to test and I had a bit time so I tested quickly ... which then seemed to make @wilsonge panic a bit that it could be merged too soon ;-)
What confused me a bit is that here you use the bootstrapped modal only for the isis, but in the other PR for the version property you have for both isis and Hathor a bootstrapped one. Was this by purpose?

avatar dgt41
dgt41 - comment - 10 Jan 2015

@richard67 Actually is isis and protostar not hathor and yes in this one I didn’t copy the layout to html folder of protostar as it is not used (i think so, but I might be wrong) in front end

avatar richard67
richard67 - comment - 10 Jan 2015

@dgt41 Ahhh, sure, I was wrong with the other PR. Thanks for clarification.

avatar phproberto phproberto - change - 2 Feb 2015
Milestone Added:
avatar zero-24 zero-24 - change - 14 Mar 2015
Category JavaScript
avatar n9iels
n9iels - comment - 21 Mar 2015

@test works fine for me! thanks for removing this mootools object :-)
At this moments, tree successful tests. Can somebody please set this PR as RTC?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.
avatar n9iels n9iels - test_item - 21 Mar 2015 - Tested successfully
avatar phproberto
phproberto - assign - 21 Mar 2015
Assigned to phproberto
avatar zero-24
zero-24 - comment - 1 Apr 2015

@wilsonge

Note to committers DO NOT merge this for 3.4. Wait until me and @phproberto have worked out the final desired form for a rendering class.

What is the state here?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.
avatar dgt41
dgt41 - comment - 6 Jun 2015

@zero-24 can we move this to RTC?

avatar phproberto phproberto - unassigned - 6 Jun 15
avatar zero-24
zero-24 - comment - 6 Jun 2015

@wilsonge is your comment above (10 Jan 205) #5655 (comment) still valid? Else i think we can move to RTC here @dgt41 :smile:

avatar wilsonge
wilsonge - comment - 6 Jun 2015

It's definitely a 3.5 thing anyhow. You can mark it as RTC but hold off merging it for now. I'm still chatting to Roberto about JLayouts atm

avatar zero-24 zero-24 - change - 6 Jun 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 6 Jun 2015

Thanks @wilsonge RTC but hold off merging it for now :smile:


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar zero-24 zero-24 - change - 6 Jun 2015
Labels Added: ?
avatar anibalsanchez
anibalsanchez - comment - 14 Jun 2015

#Test OK


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar anibalsanchez anibalsanchez - test_item - 14 Jun 2015 - Tested successfully
avatar roland-d
roland-d - comment - 3 Oct 2015

@wilsonge Have you figured things out as to what to do with this PR? Can this be merged into 3.5 or should it wait longer?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar phproberto
phproberto - comment - 4 Oct 2015

A couple of comments :)

  • If you move the logic that all the fields have to JFormField getInput() method you will save most of the getInput methods in child fields because the logic of getting the active layout and pass it data received from getLayoutData() will be probably the same. So I'd directly create a base getInput() in:

https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/field.php#L676

  • If you do something like:
        $layout = !empty($this->element['layout']) ? (string) $this->element['layout'] : $this->layout;

in the top of the getInput method you can specify a different layout for the same field type (see my comment in #7948 (comment)). That multiplies x10 the power of fields and drastically reduces the number of fields your extensions require because most of the times that can be done with a layout.

I'm talking about something like:

<field 
    name="test" 
    type="list"
    label="Test field"
    layout="mylib.field.select2"
/>

That would be a list field type using a select2 override. So with one single field type you can implement multiple ways of rendering it. Do you want a typeahead field? Use type="text" layout="mylib.field.typeahead", etc.

That setting can also be tweaked when preparing forms from models, etc. so that also adds another entry point to programmatically control the layout rendered.

  • Thinking in the future and in third part extensions I think we should move also the logic to get the renderer to JFormField with something like:
function getRenderer()
{
    $layout = !empty($this->element['layout']) ? (string) $this->element['layout'] : $this->layout;

    return new JLayoutFile($layout);
}

And it would be consumed in the getInput() method like:

return $this->getRenderer()->render($this->getLayoutData());

That allows us to easily replace the renderer that all our fields use changing 1 single method. It also allows that third part extensons use their favorite renderer instead of JLayout.

This maybe is outside the scope of current PR but I think it's better to start using layouts thinking in the future and making the system as flexible as possible.

avatar dgt41
dgt41 - comment - 4 Oct 2015

@phproberto Since there is a programmed work to be done next week, here in Athens GR, I will not try all these recommendations in this PR. The code sprint should redo the Forms so I guess this input is more than valuable. By the way I can see the simplicity and the flexibility introduced with those few lines. :+1:

avatar dgt41 dgt41 - change - 4 Oct 2015
Status Ready to Commit Pending
avatar dgt41 dgt41 - change - 4 Oct 2015
Category JavaScript JavaScript Layout
avatar zero-24 zero-24 - change - 5 Oct 2015
Labels Removed: ?
avatar Fedik
Fedik - comment - 24 Oct 2015

note, this will not work with repeatable :ghost:
would be cool if we can fix it ... so will be one problem less for #6882

avatar joomla-cms-bot
joomla-cms-bot - comment - 24 Oct 2015

This PR has received new commits.

CC: @anibalsanchez, @gunjanpatel, @n9iels, @richard67


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar dgt41
dgt41 - comment - 24 Oct 2015

@Fedik check if this is ok for the repeatable, seems ok here

avatar Fedik
Fedik - comment - 25 Oct 2015

@dgt41 hm, no not work in repeatable, something missed .. need to check

avatar dgt41
dgt41 - comment - 28 Oct 2015

@Fedik thanks for the code here. There is a minor thing still here, if the modal is closed by esc or clicking outside of the modal then the next time you will reopen you get one more iframe (repeating that procedure makes it even worst…). I think we need a listener for modal.on('hide') or something similar, this might affect also the media field (haven’t checked yet)

avatar dgt41
dgt41 - comment - 28 Oct 2015

Same behavior also for media field

avatar dgt41
dgt41 - comment - 28 Oct 2015

@Fedik Never mind I fixed that ????

avatar zero-24 zero-24 - test_item - 28 Oct 2015 - Tested successfully
avatar zero-24
zero-24 - comment - 28 Oct 2015

I have tested this item :white_check_mark: successfully on 0723af2

Works good to me. Thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar designbengel
designbengel - comment - 1 Nov 2015

Successful in isis, In Hathor similar to #5654, ...
bildschirmfoto 2015-11-01 um 17 51 37
bildschirmfoto 2015-11-01 um 17 50 35

avatar designbengel
designbengel - comment - 1 Nov 2015

btw: why is Hathor used?

avatar dgt41
dgt41 - comment - 2 Nov 2015

But Hathor here is still using the mootools modal, so in essence nothing really changed there. Maybe Hathor needs some love or someone kicking it out of Joomla. Both will work...

avatar zero-24
zero-24 - comment - 2 Nov 2015

or someone kicking it out of Joomla.

@dgt41 @mbabker did it allready here: joomla-projects/joomla-pythagoras#56 :smile:

avatar joomla-cms-bot
joomla-cms-bot - comment - 2 Nov 2015

This PR has received new commits.

CC: @anibalsanchez, @gunjanpatel, @n9iels, @richard67, @zero-24


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar zero-24 zero-24 - test_item - 3 Nov 2015 - Tested successfully
avatar zero-24
zero-24 - comment - 3 Nov 2015

I have tested this item :white_check_mark: successfully on 589eff4

Works great. For testing you need aslso apply this: #8248


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar joomla-cms-bot
joomla-cms-bot - comment - 5 Nov 2015

This PR has received new commits.

CC: @anibalsanchez, @gunjanpatel, @n9iels, @richard67, @zero-24


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar phproberto
phproberto - comment - 5 Nov 2015

This is what a I see on Isis. Note the filter overlapping the modal:
userfield-modal

avatar designbengel
designbengel - comment - 5 Nov 2015

I don´t know if thats a local issue? But the patch causes a broken layout... bildschirmfoto 2015-11-05 um 15 44 06

avatar phproberto
phproberto - comment - 5 Nov 2015

I think that's a local issue yes @designbengel . Patch works here except that small filter thing.

avatar designbengel
designbengel - comment - 5 Nov 2015

ok i´ll install a new environment, thanks

avatar phproberto phproberto - test_item - 5 Nov 2015 - Tested successfully
avatar phproberto
phproberto - comment - 5 Nov 2015

I have tested this item :white_check_mark: successfully on 5077c77

This works without when #5871 is merged


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar phproberto
phproberto - comment - 5 Nov 2015

I mean this requires the fixes applied in #5871 that affect all the modal windows

avatar designbengel designbengel - test_item - 5 Nov 2015 - Tested successfully
avatar designbengel
designbengel - comment - 5 Nov 2015

I have tested this item :white_check_mark: successfully on 5077c77


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar zero-24 zero-24 - change - 5 Nov 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 5 Nov 2015

Thanks :+1: RTC now


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5655.

avatar joomla-cms-bot joomla-cms-bot - change - 5 Nov 2015
Labels Added: ?
avatar wilsonge wilsonge - change - 5 Nov 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-11-05 21:58:08
Closed_By wilsonge
avatar wilsonge wilsonge - close - 5 Nov 2015
avatar joomla-cms-bot joomla-cms-bot - close - 5 Nov 2015
avatar wilsonge wilsonge - reference | 38aac08 - 5 Nov 15
avatar wilsonge wilsonge - merge - 5 Nov 2015
avatar wilsonge wilsonge - close - 5 Nov 2015
avatar joomla-cms-bot joomla-cms-bot - change - 5 Nov 2015
Labels Removed: ?
avatar dgt41 dgt41 - head_ref_deleted - 5 Nov 2015
avatar infograf768
infograf768 - comment - 13 Dec 2015

REGRESSION: see #8669

Add a Comment

Login with GitHub to post a comment