Skip to content

Fix/deactivate pwa prompt#100

Merged
Quentinchampenois merged 7 commits intodevelopfrom
fix/deactivate_pwa_prompt
Apr 4, 2025
Merged

Fix/deactivate pwa prompt#100
Quentinchampenois merged 7 commits intodevelopfrom
fix/deactivate_pwa_prompt

Conversation

@Stef-Rousset
Copy link

@Stef-Rousset Stef-Rousset commented Mar 31, 2025

🎩 Description

The aim of this PR is to deactivate pwa prompt, by setting pwaInstallPromptSeen variable to true in localStorage (cf decidim-core/app/packs/src/sw/a2hs.js which the file where the prompt is launched)

📌 Related Issues

Testing

Go to develop branch and see if you can get the prompt (cf screenshot one). I wasn't able to get it in local env or in docker...
Go back to the PR branch
If you have the prompt, to test this PR, you can follow these steps:

  1. in FO, navigate on different pages and see that you never get the prompt
  2. check in dev tools, in Application tab localStorage that the pwaInstallPromptSeen is set to true (cf screenshot two)

If you don't have the prompt, to test this PR, you can follow these steps:
In local env:

  1. in FO, go to the dev tools, in Application tab
  2. see that in localStorage, you have the pwaInstallPromptSeen set to true (cf screenshot two)
  3. click on other pages, open a page in a new tab and check that the variable is still present

Then, in https://petitions.lecese.fr

  1. go to dev tools, and in Console tab, execute this command localStorage.setItem("pwaInstallPromptSeen", true) (cf screenshot three)
  2. check in localStorage that pwaInstallPromptSeen variable is set to true
  3. navigate on different pages and see that you never get the prompt

📷 Screenshots

ONE =>
427925165-bb8d8840-943c-49bc-adee-b2b2999de595

TWO =>
Capture d’écran 2025-03-31 à 15 41 37

THREE =>
Capture d’écran 2025-03-31 à 15 52 26

@Stef-Rousset Stef-Rousset marked this pull request as ready for review March 31, 2025 15:14
Copy link
Contributor

@Quentinchampenois Quentinchampenois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JS condition could have been 👍 :

!localStorage.getItem("pwaInstallPromptSeen")

@Quentinchampenois Quentinchampenois merged commit c668d33 into develop Apr 4, 2025
23 of 24 checks passed
@Quentinchampenois Quentinchampenois deleted the fix/deactivate_pwa_prompt branch April 4, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants