For various reasons it would be fine, if there would be a update and override button.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Active » Needs review
FileSize
1.33 KB

Here is a working version.

Bilmar’s picture

Hi dereine,

I did some testing with the patch and below are my results:

When the Fields section is set to default display
Buttons available are 'Update default display' 'Override and Update' 'Override' and 'Cancel'
- Clicking Update default display closes the Configure fields, keeps section as Use default
- Clicking Override and Update works as expected => sets section to override and updates in one go
http://www.screencast.com/users/trupal218/folders/Jing/media/393026b8-6e...
- Clicking Override makes the 'Update' and 'Cancel' buttons show
-- clicking 'Update' or 'Cancel' here both still overrides the section (is the cancel button suppose to cancel the overriding of the section? but this seems to be the flow without the patch as well)** http://www.screencast.com/users/trupal218/folders/Jing/media/c657387d-1c...
- Clicking Cancel closes the Configure fields, keeps section as Use default

When the Fields section is set to override
Buttons available are 'Update' 'Cancel' and 'Use Default'
- Clicking Update doesn't change anything => closes the Configure fields, keeps section as override
- Clicking Cancel doesn't change anything => closes the Configure fields, keeps section as override
- Clicking Use Default makes 'Update default display', 'Override and Update', 'Cancel' buttons show
-- clicking 'Cancel' still changes the section to Use default (again, i'm not too clear about this flow)**
-- clicking 'Update default display' changes the section to Use default (when the section has more fields than the default display, the Fields section is set to show fields only in default display). http://www.screencast.com/users/trupal218/folders/Jing/media/7ea60299-54...
-- clicking 'Override and Update' loses any changes to the overridden Field section that was saved or not saved, returned Field section to fields in default display but keeps the section as override (not sure if this is intended behavior) http://www.screencast.com/users/trupal218/folders/Jing/media/29cdd090-a0...

Please let me know if I'm misunderstanding how the Cancel button should be working (marked above with **).
If it's a bug I can open a new issue in the queue.

Thanks!

merlinofchaos’s picture

- Clicking Override makes the 'Update' and 'Cancel' buttons show
-- clicking 'Update' or 'Cancel' here both still overrides the section (is the cancel button suppose to cancel the overriding of the section? but this seems to be the flow without the patch as well)** http://www.screencast.com/users/trupal218/folders/Jing/media/c657387d-1c...

This is true without the patch too. That's a behavior that has never been handled properly in Views (it requires longer term cached tracking that hasn't been implemented)

-- clicking 'Override and Update' loses any changes to the overridden Field section that was saved or not saved, returned Field section to fields in default display but keeps the section as override (not sure if this is intended behavior)

This one seems wrong.

dawehner’s picture


When the Fields section is set to default display

- Clicking Update default display closes the Configure fields, keeps section as Use default

This is exactly how it should be.

-- clicking 'Update' or 'Cancel' here both still overrides the section (is the cancel button suppose to cancel the overriding of the section? but this seems to be the flow without the patch as well)** http://www.screencast.com/users/trupal218/folders/Jing/media/c657387d-1c...

Yeah this is not part of this patch, sorry :)

When the Fields section is set to override

Buttons available are 'Update' 'Cancel' and 'Use Default'
- Clicking Update doesn't change anything => closes the Configure fields, keeps section as override
- Clicking Cancel doesn't change anything => closes the Configure fields, keeps section as override
- Clicking Use Default makes 'Update default display', 'Override and Update', 'Cancel' buttons show

All default behavior.

-- clicking 'Cancel' still changes the section to Use default (again, i'm not too clear about this flow)**

Once you clicked "use default" the changes are made against the default.

-- clicking 'Update default display' changes the section to Use default (when the section has more fields than the default display, the Fields section is set to show fields only in default display). http://www.screencast.com/users/trupal218/folders/Jing/media/7ea60299-54...

This is exactly how views worked before. I just added the button, everything else wasn't changed :)

-- clicking 'Override and Update' loses any changes to the overridden Field section that was saved or not saved, returned Field section to fields in default display but keeps the section as override (not sure if this is intended behavior) http://www.screencast.com/users/trupal218/folders/Jing/media/29cdd090-a0...

If you click "use default" the settings are deleted and the settings from the default display are used. From my perspective it's exactly how the behaviour should be.

@earl
Watching the video helps a lot here.

@trupal218
It's crazy how awesome your tests are. It's indescribable

Bilmar’s picture

Always a pleasure to help with testing! =)

merlinofchaos’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs review » Patch (to be ported)
FileSize
3.56 KB

Ok, I changed the wording on the button and committed this to both D6 branches.

Also, the button was not properly marking the right section as updated with the patch; since it thought it was updating the default display, it marked *that* as changed, not what was actually changed. I added submit chaining to make this happen properly, and moved the old submit out of the validate function, which is an odd place for it to be.

Actual patch is attached. Needs porting to D7.

dawehner’s picture

Status: Patch (to be ported) » Fixed

Commited, and ported
Perhaps i should find a message which i can copy and paste for every comment. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

iamjon’s picture

Marked #737764: lock default display as a duplicate