Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
views_ui.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Nov 2012 at 12:39 UTC
Updated:
20 Jul 2016 at 15:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerLet's do that, unless the user wants to see the master display all the time.
Comment #2
Bojhan commentedA side from the clear visual bug, which seems to be from another issue. Just hiding this functionality when there are no other displays, or master display sounds sensible.
Comment #3
dawehnerOh right, i worked on two issues at the same time.
For clarity, when you have hidden this field, the button will be called "Apply" all the time.
Comment #5
dawehnerLet's fix the test.
Comment #6
renat commentedIt would be nice to have a possibility to show this option even if there is just one display (probably admin/structure/views/settings is a right place for appropriate switch). It is useful in case you know other displays will be added in the future, using it you can decide what should be cloned to this displays, and what should not.
In principle it should be possible with Master display, though... Would be interesting to hear a word from other people about their workflows in such cases.
Comment #7
dawehnerAnother classical example that you can't oversimplify what people are doing with views.
Comment #8
dawehner#5: drupal-1836384-5.patch queued for re-testing.
Comment #10
dawehner#5: drupal-1836384-5.patch queued for re-testing.
Comment #12
dawehner#5: drupal-1836384-5.patch queued for re-testing.
Comment #14
dawehner#5: drupal-1836384-5.patch queued for re-testing.
Comment #15
Bojhan commentedtagging
Comment #16
damiankloip commentedrerolled, looks good and works fine.
Comment #18
Bojhan commented@damain could you reroll this?
Comment #19
damiankloip commentedYep, sure.
Comment #20
damiankloip commentedPatch applied ok, this should fix the test failure.
Comment #21
klonosComment #22
jhedstromComment #23
jain_deepak commentedRerolled
Comment #25
gaurav_varshney commentedComment #27
dawehnerNow we just have to fix the failures :)
Comment #28
anil280988 commentedRerolled
Comment #29
anil280988 commentedComment #31
tadityar commentedTrying to pass.
Comment #33
hynnot commentedNeeds review.
Comment #34
alimac commentedRemoving location tag -- there was a discussion (see 2407325#comment-9513533 and decided to use one tag to keep the autocomplete list of tags short.
Comment #36
hynnot commentedNeeds review.
Comment #37
dawehnerYou could show that in just a single line, right?
'#access'] = !\Drupal::config('views.settings')->get('ui.show.master_display') && count($displays) > 2;Comment #38
manningpete commentedPatch applies.
Comment #39
tadityar commented@dawehner, isn't that an if statement?
Comment #40
lendudeI agree with @tadiyar, it's an IF statement so it should be in curly brackets.
Could I add one more twist to this? Only remove the field when the section is not currently overridden.
Scenario:
- Add View
- Add two Pages
- Override the Field section in Page 2
- Delete Page 1
With the patch in #36 the user would now NOT get the option to revert the Field section in Page 2 back to default (because there is only one display left).
So add an additional check to see if the current section in overridden, and if so. don't hide the field.
Comment #42
lendudeThe failed tests show another issue with the fix in #36. Setting #access to FALSE actually translates to 'overridden' and not 'default'.
getOverrideValues() only checks if a value is set, and doesn't check #access. So when adding anything in the UI you will end up with a section that no longer uses the defaults.
The new patch does the check earlier and doesn't add the override field at all, like it is done for the default display.
Interdiff is against #36
Let's see what this does...
Comment #45
pguillard commentedA light re-roll from #42...
Comment #48
dawehner@pguillard Oh cool, thank you for rerolling this patch. I
I think we need some additional testing for the new behaviour. Maybe in
\Drupal\views_ui\Tests\DisplayTestwe already have some tests about the dropdownComment #49
pguillard commentedCool
I guess we have dropdown tests :
I just corrected one test, I don't know for the remaining error!
Comment #50
pguillard commentedto not consider..
Comment #53
lendudeThe change in the interdiff in #49 doesn't appear to be in the patch? Am I missing something?
Comment #54
pguillard commented@Lendude : You are right, that line was braking the tests, it was mentioning test_store_pager_settings before we get the view.
Feel free to take control!
Comment #55
lendudeThis should get it back into the green. Will look into adding more tests per #48.
Comment #56
lendudeComment #57
pguillard commentedI guess this is RTBC !
Comment #59
pguillard commentedComment #60
pguillard commentedBack to RTBC...
Comment #61
alexpottI might be wrong but I can't see any tests confirming that the "all Displays" option is not displayed as expected.
Comment #62
lendude@alexpott you are absolutely right.
Added tests and removed unrelated extra newline.
Comment #63
pguillard commentedComment #64
pguillard commentedI guess this is RTBC.
Before patch :

After patch :

Comment #65
dawehner+1
Comment #66
alexpottCommitted c536cbf and pushed to 8.1.x and 8.2.x - as a task this is not eligible for 8.0.x but this is safe for 8.1.x-beta1. Thanks!
Comment #70
gábor hojtsyThanks, removing from UX sprint now.