Problem/Motivation

I'm no advanced CSS freak, so I can't easily fix that, however when I add a "Global: Dropbutton" field to a view and don't set a long enough label, t is being pushed out of the table. Same happens if the Dropbutton is in another column: column size is minimal, so overlapping the neighboring column.

Dropbutton pushed out

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Only local images are allowed.

Only local images are allowed.

Only local images are allowed.

Only local images are allowed.

Only local images are allowed.

Only local images are allowed.

CommentFileSizeAuthor
#53 3029468-d11-global-dropdown.png188.87 KBnayana_mvr
#53 3029468-d11-multiple-fields.png339.73 KBnayana_mvr
#53 3029468-d11-single-field.png324.38 KBnayana_mvr
#52 Bulkdrop multi field.png131.81 KBakashdab
#52 Normal drop multi field.png128.39 KBakashdab
#52 Transparent bg dropdown.png66.81 KBakashdab
#52 Standard redirect dropdown.png68.69 KBakashdab
#52 Bulk form dropdown open.png64.76 KBakashdab
#52 Bulk form view.png51.35 KBakashdab
#52 Text breaking view.png27.41 KBakashdab
#52 Word without space.png27.55 KBakashdab
#52 Normal length word.png77.53 KBakashdab
#44 After_add_dropdown.PNG12.19 KBgaurav-mathur
#44 Before_add_dropdown.PNG11.28 KBgaurav-mathur
#41 seven-theme-after-patch.png199.26 KBpradipmodh13
#41 seven-theme-before-patch.png192.42 KBpradipmodh13
#40 3029468-40.patch606 bytesramenkage
#39 Seven-before-patch.png134.19 KBShubham Sharma 77
#39 Bartik-before-patch.png105.73 KBShubham Sharma 77
#39 Seven-after-patch.png107.01 KBShubham Sharma 77
#39 Bartik-after-patch.png110.86 KBShubham Sharma 77
#35 3029468-after_patch-2.png11.91 KBabhijith s
#35 3029468-after_patch-1.png14.37 KBabhijith s
#35 3029468-before_patch-2.png10.97 KBabhijith s
#35 3029468-before_patch-1.png15.52 KBabhijith s
#34 drupal9.2-before-patch.png173.12 KBdjsagar
#34 drupal9.2-after-patch.png176.6 KBdjsagar
#34 drupal9.1-after-patch.png161.73 KBdjsagar
#34 3029468-33.patch758 bytesdjsagar
#30 onSeven_afterPatch.JPG39.33 KBpankaj.singh
#30 onBartik_afterPatch.JPG32.23 KBpankaj.singh
#30 patchApplied.JPG22.01 KBpankaj.singh
#30 onStark_beforePatch.JPG31.1 KBpankaj.singh
#30 onSeven_beforePatch.JPG41.67 KBpankaj.singh
#30 onClaro_beforePatch.JPG39.87 KBpankaj.singh
#30 onBartik_beforePatch.JPG31.69 KBpankaj.singh
#29 interdiff_25-29.txt816 byteskomalk
#29 3029468-29.patch758 byteskomalk
#29 outside-seven.png114.04 KBkomalk
#29 outside-claro.png115.26 KBkomalk
#29 outside-bartik.png92.74 KBkomalk
#29 inside-view-table-seven.png122.89 KBkomalk
#29 inside-view-table-claro.png96.72 KBkomalk
#29 inside-view-table-bartik.png100.69 KBkomalk
#28 After_D9_Bartik_Single_Dropdown.png128.79 KBpriyanka.sahni
#28 After_D9_Claro_Single_Dropdown.png134.33 KBpriyanka.sahni
#28 After_D9_Seven_Single_Dropdown.png147.72 KBpriyanka.sahni
#28 D9.1.png172.8 KBpriyanka.sahni
#28 D9.png96.96 KBpriyanka.sahni
#28 Before_D.9.1.x_Seven_Single_Dropdown.png256.47 KBpriyanka.sahni
#28 Before_D_9.1.x_Stark_Single_Dropdown.png170.93 KBpriyanka.sahni
#28 Before_D_9.1.x_Claro_Single_Dropdown.png272.32 KBpriyanka.sahni
#28 Before_D_9.1.x_Bartik_Single_Dropdown.png219.67 KBpriyanka.sahni
#25 3029468-25.patch442 bytespoojakural
#22 Seven-theme-before-patch.png87.99 KBpoojakural
#22 Bartik-theme-before-patch.png79.94 KBpoojakural
#22 3029468-22.patch834 bytespoojakural
#22 Stark-theme-after-patch.png70.66 KBpoojakural
#22 Stable-theme-after-patch.png75.85 KBpoojakural
#22 seven-theme-after-patch.png101.16 KBpoojakural
#22 Claro-theme-after-patch.png104.79 KBpoojakural
#22 Bartik-theme-after-patch.png78.57 KBpoojakural
#19 Screenshot 2020-06-10 at 3.33.16 PM.png29.38 KBpoojakural
#16 Single-select-dropdown.png99.67 KBpoojakural
#16 multiselect-dropdown.png102.25 KBpoojakural
#11 outside view table after patch.png219.06 KBrohit tiwari
#11 outside view table before patch.png220.67 KBrohit tiwari
#11 inside view table after patch.png67.28 KBrohit tiwari
#11 inside view table before patch.png64.5 KBrohit tiwari
#8 dropbutton_field_pushed-3029468-8.patch424 bytesrohit tiwari
dropbutton-pushed-out.png34.35 KBpancho

Comments

Pancho created an issue. See original summary.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

poojakural’s picture

Assigned: Unassigned » poojakural
poojakural’s picture

Assigned: poojakural » Unassigned
rohit tiwari’s picture

Assigned: Unassigned » rohit tiwari
rohit tiwari’s picture

Status: Active » Needs review
StatusFileSize
new424 bytes

The issue exists only when there is single option in drop-button field. Works fine with multiple option. Have created a patch to fix this for single optioned drop-button.

rohit tiwari’s picture

Assigned: rohit tiwari » Unassigned
lendude’s picture

Component: views.module » CSS
Issue tags: +Needs screenshots

Since the current fix is not in Views, I'm moving it out of Views and into the generic CSS component.

We should ideally have some before/after screenshots. Also screenshots from a use case outside of a Views table to show that this is still looking good.

rohit tiwari’s picture

Thanks for the suggestion @Lendude,
Attaching screenshots inside and outside view table, before and after applying patch.

rohit tiwari’s picture

Rkumar’s picture

As per screenshot changes seem fine, can we check/verify with the other core themes as well?

lendude’s picture

Status: Needs review » Needs work

@Rohit Tiwari thanks for those!

+1 on #13

As the non-views screenshots in #11 show, the whitespace around the content of the rows changes. It gets more padding/margin than before the patch, which sounds like an unwanted change.

poojakural’s picture

Assigned: Unassigned » poojakural
poojakural’s picture

StatusFileSize
new102.25 KB
new99.67 KB

I have checked the issue with select and multiselect dropwdown. Not able to find the issue. Dropwdown button is not going out of the table. Please refer the SS.

Step to test:
1. Create a view page
2. Add fields
3. Then add global dropdown field. select field you want to show in dropdown.
4. Check with single select and miltiselect dropdown field.

poojakural’s picture

Assigned: poojakural » Unassigned
Status: Needs work » Needs review
lendude’s picture

Status: Needs review » Needs work

Needs work for the regression in #14

@poojakural "Not able to find the issue. Dropwdown button is not going out of the table." Is that with or without the patch applied? On which version of Drupal core? Since the screenshots in the issue summary show the problem quite clearly.

poojakural’s picture

StatusFileSize
new29.38 KB

@Lendude I have checked the issue without applying patch. Not able to replicate the issue. I am using this drupa1 version attached SSVersion Drupal

poojakural’s picture

Status: Needs work » Needs review
lendude’s picture

Status: Needs review » Needs work

@poojakural per the title of this issue: "if no label set", in your screenshots you do have a label set for that column. So they are a good test case for this only happening when no label is set :)

poojakural’s picture

Status: Needs work » Needs review
StatusFileSize
new78.57 KB
new104.79 KB
new101.16 KB
new75.85 KB
new70.66 KB
new834 bytes
new79.94 KB
new87.99 KB

Fixed single dropbutton issue. Tested on Bartik, Stable, Claro, Stark. Seven themes.
Step to test:
1. Create a view page
2. Add fields
3. Then add global dropdown field. select field you want to show in dropdown.
4. Check with single select and miltiselect dropdown field.

Please refer the SS and patch.

Rkumar’s picture

Few observations -
=>

--- a/core/themes/seven/css/components/tables.css
+++ b/core/themes/seven/css/components/tables.css

Why in this file?

=> Don't you think it must have solution wrt all core themes

poojakural’s picture

Assigned: Unassigned » poojakural
Status: Needs review » Needs work
poojakural’s picture

Assigned: poojakural » Unassigned
StatusFileSize
new442 bytes

Please refer the attached patch. Single dropdown issue found in bartik and seven. Dropbutton is working finr in rest of the themes.

poojakural’s picture

Status: Needs work » Needs review
priyanka.sahni’s picture

Assigned: Unassigned » priyanka.sahni

Working on it

priyanka.sahni’s picture

Assigned: priyanka.sahni » Unassigned
Status: Needs review » Needs work
StatusFileSize
new219.67 KB
new272.32 KB
new170.93 KB
new256.47 KB
new96.96 KB
new172.8 KB
new147.72 KB
new134.33 KB
new128.79 KB

Verified and tested by applying the patch #25.Getting error while applying patch on Drupal 9.1.x whereas patch was applied successfully on Drupal 9 and issues exists with Bartik and Seven theme.Patch #25 should be re-rolled for Drupal 9.1.x

Steps to test -
1. Go to the admin site.
2. Go to admin/structure/views/view/content.
3. Edit a view page.
4. Add fields.
5. Then add global dropdown field. select field you want to show in dropdown and leave label as blank.
6. Check with single select and multi - select dropdown field.

After Patch D.9.1.x -
After Patch

After Patch D.9 -
After Patch

komalk’s picture

Status: Needs work » Needs review
StatusFileSize
new100.69 KB
new96.72 KB
new122.89 KB
new92.74 KB
new115.26 KB
new114.04 KB
new758 bytes
new816 bytes

This issues exists with Bartik and Seven theme. Tested patch #25 is not working for me after applying patch issue still exit in outside the view.
/core/modules/views_ui/css/views_ui.admin.theme.css changing the code in this file not work the outside view table.
Here is the fixed review the patch attached screen shot for the reference.

pankaj.singh’s picture

StatusFileSize
new31.69 KB
new39.87 KB
new41.67 KB
new31.1 KB
new22.01 KB
new32.23 KB
new39.33 KB

The issue "Drop button field pushed out of the table if no label set" is occurring on Bartik and Seven themes only.

Tested the patch given in #25, patch applied on my end on 9.1.x and patch fixed the issue. Please refer to SS attached for ref.

@priyanka.sahni the error you're getting with the patch while applying on 9.1.x probably because the last patch you applied was not made reset on your end.

pameeela’s picture

Issue tags: -Needs screenshots

Removing the tag as we definitely do not need anymore screenshots for this issue!

pameeela’s picture

Issue tags: +Bug Smash Initiative

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

djsagar’s picture

StatusFileSize
new758 bytes
new161.73 KB
new176.6 KB
new173.12 KB

Hi,

Patch is working on drupal9.1.
Rolling up patch for drupal9.2.x-dev.

Please review

Thanks!

abhijith s’s picture

StatusFileSize
new15.52 KB
new10.97 KB
new14.37 KB
new11.91 KB

Applied patch #34 and it works fine.Adding screenshots below.

Before patch:
before1

before2

After patch;
after1

after2

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Shubham Sharma 77’s picture

StatusFileSize
new110.86 KB
new107.01 KB
new105.73 KB
new134.19 KB

Applied patch #34 applied successfully in drupal-9.5.x-dev. Good to move for RTBC.
Thanks for the patch
For ref sharing screenshots...

ramenkage’s picture

StatusFileSize
new606 bytes

I just ran into this issue on a site, and Patch #34 introduced some undesirable visual behavior by setting fixed-width columns on the table. I came up with a different solution, included here.

The way dropbuttons are handled in tables isn't particularly elegant as the CSS just assumes a width for the button. I think completely revamping that would be out of scope for this issue.

For now, I simply added CSS for .dropbutton-single to make it consistent with .dropbutton-multiple, reducing the padding by the width of .dropbutton-toggle.

pradipmodh13’s picture

StatusFileSize
new192.42 KB
new199.26 KB

Patch #40 was successfully applied.
Admin Theme: Seven for Drupal 9.5X
Please see the accompanying screenshot.
It's a good move, RTBC.
Thanks

Note: For testing purposes, I used Bartik and the default admin theme. It is fully operational.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gaurav-mathur’s picture

Assigned: Unassigned » gaurav-mathur
gaurav-mathur’s picture

StatusFileSize
new11.28 KB
new12.19 KB

I have tested the issue without applying any patch & not able to get the issue.
I am using this drupa1 10.0.x-dev version, tested with claro theme.
Refer to screenshots.

gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

FYI once one set of screenshots is added additional screenshots are duplicative work.

Reviewing the patch believe we are trying to get away from using dir="rtl"

Tried testing on claro but I didn't see the issue. Maybe additional steps should be added?

sonam.chaturvedi’s picture

I also tried testing on both claro and seven themes, however issue is not reproducible on 10.1.x-dev.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

shweta__sharma’s picture

#46 and #47 were unable to replicate the issue so adding a tag

shweta__sharma’s picture

Issue summary: View changes

Added standard IS template which was missing.

akashdab’s picture

Issue summary: View changes

The issue of Global dropdown getting pushed out of the table does not seem to be reproduced in 11.x, but new issues has taken its place altogether.

Steps taken to reproduce the issue taken from #28.
(Edited out content as images did not appear)

akashdab’s picture

The new issue that seem to appear are :

1. If single field dropdown is selected,

      a. It follows standard when text character length is normal without too much spacing.

    Normal length words

      b. It follows standard when text character length is not normal without any spacing between words in dropdown button

    word without spacing

      c. It does not follow when text character length is long and has spacing between words.

    Text breaking view

2. In multi field dropdown selection,

      a. It follows proper spacing standards in relation to other table rows only when Content: Node operations bulk form is selected

    Bulk form view:

    Bulk form view


    Bulk form dropdown open:
    Bulk form dropdown open

      b. It breaks standard view if any other field besides Content: Node operations bulk form is selected and when the first field contains anything unique such as Title, Author Name



    Standard redirect dropdown broken view:
    Standard redirect dropdown broken view


    Transparent dropdown broken view:
    transparent dropdown broken view

      c. It breaks standard view when any field that cannot be redirected is selected; these fields are visible with a transparent bg, without following any spacing, positioning standards. Similarly if fields that can be redirected appear they appear normally.



    Normal drop multi field:
    Normal drop multi field


    Bulkdrop multi field:
    Bulkdrop multi field

nayana_mvr’s picture

Status: Needs work » Needs review
StatusFileSize
new324.38 KB
new339.73 KB
new188.87 KB

The original issue mentioned in this ticket

Dropbutton field pushed out of the table if no label set

is not reproducible in Drupal version 11.x. Attaching screenshots for reference.

d11-single
d11-multiple

But as mentioned in #52, there are UI issues when a field which cannot be redirected is added in the Global dropdown (SS can be referred in #52).
In the Global dropdown configuration, all the fields which are added in the view are listed down as options for global dropdown items. Also, there is a help text saying "Fields to be included as links." which doesn't make sense because fields such as Content Type, Status, Updated, etc doesn't have any link to redirect, so why do we have to show those fields as an option for global dropdown? Also Operations field which is already a dropdown should not be allowed as an item in another dropdown right? (I'm checking this in /admin/structure/views/view/content)

fields

Please correct me if I'm getting this wrong. If we need to work on dropdown style, then I think it should be tracked in a different ticket since the original issue of this ticket is already fixed in D11. Marking this as Needs Review for feedback from others.

smustgrave’s picture

Status: Needs review » Needs work

Issue summary still appears to be incomplete/incorrect.

No steps to reproduce
No proposed solution
Broken images in release notes (this doesn't need release notes as it's not a major change)

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.