Cookie settings modal buttons are not visible on smaller screens

Created on 25 June 2024, 2 months ago
Updated 26 August 2024, 13 days ago

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:

Tablet 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.

🐛 Bug report
Status

Needs review

Version

1.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sourojeetpaul
  • 🇩🇪Germany Anybody Porta Westfalica

    Thanks @sourojeetpaul!

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

  • Issue was unassigned.
  • 🇩🇪Germany Anybody Porta Westfalica
  • Assigned to 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!

  • Issue was unassigned.
  • Status changed to Needs review 2 months ago
  • 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!

  • 🇩🇪Germany Anybody Porta Westfalica

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

  • 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 🐛 Cookie settings modal buttons are not visible on smaller screens Needs review I've raised an issue on the Cookiesjsr library repo itself, which resides on github: 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!

  • 🇩🇪Germany Anybody Porta Westfalica

    @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?

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

  • 🇩🇪Germany JFeltkamp Hamburg

    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.

  • Assigned to sourojeetpaul
  • Status changed to Needs work 2 months ago
  • 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!

  • Issue was unassigned.
  • Status changed to Needs review 2 months ago
  • 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!

  • Status changed to Needs work 16 days ago
  • 🇮🇳India riddhi.addweb

    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.

  • Status changed to Needs review 13 days ago
  • 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 🐛 Cookie settings modal buttons are not visible on smaller screens Needs review 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 :)

Production build 0.71.5 2024