Problem/Motivation

The 'Accept All' and Deny All' buttons of the Cookie Settings modal are visible on Desktop and Tablet screens, but those are not showing on mobile devices, hence not giving the user any option to accept of deny the cookie from the modal itself if he/she is viewing it on small screen.

Steps to reproduce

1. Install and Configure the module as per need.
2. Place the block on the footer region.
3. Click on the Cookie Settings button which will open up the modal.
4. All the buttons ('Accept All'. 'Deny All', 'Save') are visible on desktop and tablet screens.
5. Now switch to responsive screen of mobile devices.
6. The 'Accept All' and 'Deny All' button will disappear.

Desktop View:
Desktop View

Tablet View:
Tablet View

Mobile View:
Mobile View

Proposed resolution

Make the buttons visible on mobile devices by removing display: none property from the modal buttons and add suitable style for the same.

CommentFileSizeAuthor
#21 after_spacing_issue.png111.76 KBesha_kundu
#20 Screenshot from 2024-10-04 14-06-11.png124.99 KBsourojeetpaul
#20 3457021-20.patch23.9 KBsourojeetpaul
#19 spacing_issue.png110.12 KBesha_kundu
#19 alignment_fixes.png128.28 KBesha_kundu
#18 Screenshot from 2024-10-03 12-16-24.png183.62 KBsourojeetpaul
#18 Screenshot from 2024-10-03 11-56-01.png176.02 KBsourojeetpaul
#18 Screenshot from 2024-10-03 11-55-23.png176.92 KBsourojeetpaul
#18 3457021-18.patch23.97 KBsourojeetpaul
#17 button_german.png187.38 KBesha_kundu
#17 buttons_german_portrait.png171.27 KBesha_kundu
#17 after_cookies_button_landscape.png141.5 KBesha_kundu
#17 after_cookies_button.png175.11 KBesha_kundu
#17 before_cookies_button.png207.92 KBesha_kundu
#15 Screenshot from 2024-08-23 11-42-47.png262 KBriddhi.addweb
#15 Screenshot from 2024-08-23 11-42-26.png263.08 KBriddhi.addweb
#15 Screenshot from 2024-08-23 11-42-04.png122.23 KBriddhi.addweb
#15 Screenshot from 2024-08-23 11-41-56.png202.8 KBriddhi.addweb
#14 Screenshot from 2024-07-08 14-22-06.png215.07 KBsourojeetpaul
#14 Screenshot from 2024-07-08 14-21-50.png149.12 KBsourojeetpaul
#14 3457021-14.patch23.99 KBsourojeetpaul
#6 after-landscape.png108.63 KBsourojeetpaul
#6 after-portrait.png178.6 KBsourojeetpaul
#6 before-landscape.png106.11 KBsourojeetpaul
#6 before-portrait.png153.02 KBsourojeetpaul
#6 buttonfix.patch23.79 KBsourojeetpaul
Screenshot from 2024-06-25 18-56-12.png174.25 KBsourojeetpaul
Screenshot from 2024-06-25 18-59-54.png191.86 KBsourojeetpaul
Screenshot from 2024-06-25 18-57-05.png217.46 KBsourojeetpaul

Issue fork cookies-3457021

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sourojeetpaul created an issue. See original summary.

sourojeetpaul’s picture

Working on it!

anybody’s picture

Thanks @sourojeetpaul!

@thomas.frobieter could you perhaps take a look at this in the next weeks? (For review or implementation)

anybody’s picture

Assigned: thomas.frobieter » Unassigned
sourojeetpaul’s picture

Assigned: Unassigned » sourojeetpaul

Hello @Anybody,
Thanks for the prompt response, but I'm not sure why I've been unassigned from the issue.
I've already started working on it, just got occupied on something else in between.
Anyways, as per my latest findings, the issue seems to be coming from the cookiesjsr library that the module is dependent upon. Hence I think it'll be better if we address the issue as a part of the library only, so that if the library gets used on somewhere else apart from this module, it'll also mitigate the same issue over there as well.
So I created an issue on the github repo of the library
https://github.com/jfeltkamp/cookiesjsr/issues/25
I've also prepared the solution which address the issue correctly, but unfortunately I'm not able to raise PR against it, as it seems that the repo might be maintaining some sort of strict push access policy. It'll be great if you can grant me push access to that repo, so that I can raise the PR and you guys can have a look at it!

sourojeetpaul’s picture

Assigned: sourojeetpaul » Unassigned
Status: Active » Needs review
StatusFileSize
new23.79 KB
new153.02 KB
new106.11 KB
new178.6 KB
new108.63 KB

Hi,
As I don't have the push access on the libraries repo, hence I'm giving a patch file over here. On applying it over the cookiesjsr library the issue is getting resolved. I'll create the corresponding PR for the same on that github repo once I get required permissions to do so.
Also I'm attaching before and after screenshots for reference!

sourojeetpaul’s picture

Issue summary: View changes
anybody’s picture

@sourojeetpaul simply click "Get push access" above and create a MR please.

sourojeetpaul’s picture

Hi @Anybody,
I'm not talking about getting push access on this issue's forked repo on gitlab. I already have a push access for the same.
As I've already mentioned on #5 I've raised an issue on the Cookiesjsr library Github repo itself
https://github.com/jfeltkamp/cookiesjsr/issues/25
I'm getting the push access issue on the Github repo, and as I can see @JFeltkamp is the contributor of the repo, so I'd request if he/anyone can grant me push access on that repo.

Thanks!

anybody’s picture

@sourojeetpaul aaah sorry I got you wrong! Yeah that's something @JoachimFeltkamp has to have a look at. Maybe you can send him a PM?

sourojeetpaul’s picture

Ok sure, I'm trying to get in touch with him via Drupal Slack!

jfeltkamp’s picture

Hey @sourojeetpaul, I'm here :-)

The missing buttons in mobile layouts are technically and legally not required, but general shortcuts for "configure all/none + save".
The reason why the buttons are missing is the missing space for button labels.
In English everything looks fine, but if you translate the plugin to German, then:
Save | Deny all | Accept all
Speichern | Alle ablehnen | Alle akzeptieren

This will break the layout.
If you have a good solution for that problem I would be pleased.

sourojeetpaul’s picture

Assigned: Unassigned » sourojeetpaul
Status: Needs review » Needs work

Hi @JFeltkamp,
Thanks for the prompt reply, and indeed its breaking when we change the language to german or something else where the number of letters are increasing. Sorry for the overlook!
One solution would be to change the flex layout at smaller screens like that of the primary cookies panel.
Thanks for pointing that out, I'm working on it and providing the solution ASAP!

sourojeetpaul’s picture

Assigned: sourojeetpaul » Unassigned
Status: Needs work » Needs review
StatusFileSize
new23.99 KB
new149.12 KB
new215.07 KB

Hello there,
According to the feedback and as per my findings as well, I'm providing a new patch over here, which will hopefully resolves the issue.
As mentioned on my previous comment, on changing the flex layout to that of the primary cookies panel, things will look good.
Removing options from the user who're viewing it from smaller devices, and force them to select or deselect cookies by going back to the primary panel would be little bit injustice I think :)
Pls have a look at this new patch, and do let me know if it looks good to you.
Attaching screenshots for reference!

riddhi.addweb’s picture

I tried to apply the patch 3457021-14. but seems like it does not resolve the issue. The patch issue persists and also on the Desktop and Mobile view the Texts are overlapping on the card. Attaching the SS for the same.

sourojeetpaul’s picture

Status: Needs work » Needs review

Hi @riddhi.addweb,
The text overlapping issue that you've mentioned in your previous comment is legit and I've also experienced the same, but that's a completely separate issue to discuss over here. The text overlapping issue is happening with Drupal's default Olivero theme, but doesn't happen with Bootstrap. I'm yet to test the same on other themes to come to a conclusion. So after my investigation I'll raise a new issue for that and try to address that on that ticket only.
As far as this issue is concerned, try to follow the provided "Steps to Reproduce" on Bootstrap5 theme, I hope you'll be able to get what I'm talking about in this issue.
And for the patch, as I've mentioned explicitly on comment #6 the issue is of the library and not of the module, so to resolve the issue you've to apply the patch on the cookiesjsr library which comes with the module, and not directly on the module. I think you've tried to apply the patch conventionally on the module itself, so it won't work here like that. Pls go through the previous threads to get a better understanding of the same.

Thanks :)

esha_kundu’s picture

Status: Needs review » Needs work
StatusFileSize
new207.92 KB
new175.11 KB
new141.5 KB
new171.27 KB
new187.38 KB

Hello,
I've reviewed the issue by following the below steps:

  1. Installed the module version 1.2.13 in Drupal version 10.3.4, enabled the module COOKiES.
  2. Set Bootstrap 5 theme as Default theme.
  3. In Block Layout added the Cookies UI block in the footer section.
  4. Switched to responsive screen for mobile devices. Found the missing buttons (Deny all, Accept all) on opening the Cookie Settings.
  5. Applied the patch in cookiesjsr library, provided in comment #14. The patch applied cleanly.
  6. Checked the three buttons ( Deny all, Accept all, Save ) appearing both in portrait and landscape view for mobile/tab view, it looked fine in desktop devices also.
  7. As per the comment #12, checked the buttons design for 3-4 languages (German, French, Spanish, Japanese) and it looked fine.

I would like to point out two design fixes that needs to be rectified,

  • For mobile devices, I found the alignment of the save button is'nt correct.
  • In landscape view the save button seems to be a bit smaller in size compared to the Deny all and Accept all buttons especially when the save text is small like in japanese its 保存.

Hence, moving to NW.

sourojeetpaul’s picture

Status: Needs work » Needs review
StatusFileSize
new23.97 KB
new176.92 KB
new176.02 KB
new183.62 KB

Hi @esha_kundu,
Thanks for the extensive review and pointing out the minute style breaks. I've addressed these on my latest patch which I'm providing here now, please have a look once again! I've tested the same on Japanese as well as you've suggested, hope it'll solve the said issue :)
Attaching screenshots for better reference!

esha_kundu’s picture

Status: Needs review » Needs work
StatusFileSize
new128.28 KB
new110.12 KB

Hello @sourojeetpaul,
I've re-reviewed by applying the patch 3457021-18.patch. The design fixes that I had mentioned in #17 was addressed, which resolved the incorrect alignment and the smaller width of save button in landscape view of mobile devices. However, it seems like there is still one design issue that is not addressed. In devices having width greater than 576px the buttons are having equal space between them, but the save button is not equally spaced below 576px. I've provided ss for reference.
Please have a look.

sourojeetpaul’s picture

Status: Needs work » Needs review
StatusFileSize
new23.9 KB
new124.99 KB

Hi @esha_kundu,
Thanks for re-reviewing my patch so minutely, I've accidentally missed that. Can you pls have a look once again!
Attaching screenshot for quick ref.

esha_kundu’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new111.76 KB

Hello @sourojeetpaul,
The issue that I had mentioned previously in #19 has been resolved with your current patch 3457021-20.patch hence moving to RTBC. Attaching ss for reference.
Thanks