Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add agree to privacy policy to download page #47

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

timtmok
Copy link
Contributor

@timtmok timtmok commented Feb 18, 2025

Address https://github.com/posit-dev/positron-builds/issues/224

Adds checkbox agreeing to privacy policy before showing the downloads. The checkbox must be selected before the download links appear.

The checkbox has a click handler that toggles a hidden class attribute that hides the element.

Screen.Recording.2025-02-18.at.5.08.25.PM.mov

Adds checkbox agreeing to privacy policy before showing the downloads
Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for positron-posit-co ready!

Name Link
🔨 Latest commit f3ddf91
🔍 Latest deploy log https://app.netlify.com/sites/positron-posit-co/deploys/67b777c4641f6a00081bf6ec
😎 Deploy Preview https://deploy-preview-47--positron-posit-co.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@juliasilge juliasilge left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on this! 🙌

What do you think our options would be if we invested just a little bit more in the UX experience? To me, this version feels quite jumpy ("SURPRISE, HERE IS THE TABLE!!!") and a bit unusual for typical website UX.

  • Instead of totally hidden, could the table be grayed out or obscured/unclickable?
  • What about a popup that must be accepted?
  • Other ideas?

I'm wondering if we can get an experience that may be less surprising to typical website users with a bit more time investment.

@timtmok
Copy link
Contributor Author

timtmok commented Feb 19, 2025

Thank you so much for working on this! 🙌

What do you think our options would be if we invested just a little bit more in the UX experience? To me, this version feels quite jumpy ("SURPRISE, HERE IS THE TABLE!!!") and a bit unusual for typical website UX.

  • Instead of totally hidden, could the table be grayed out or obscured/unclickable?
  • What about a popup that must be accepted?
  • Other ideas?

I'm wondering if we can get an experience that may be less surprising to typical website users with a bit more time investment.

These ideas are helpful! I wasn't sure what the experience should be like. I did have something to blur the table. Hiding it was easiest since the blur still requires actual disabling of the links. I'll add some link disabling and that will open up options for how the content is revealed.

@timtmok
Copy link
Contributor Author

timtmok commented Feb 19, 2025

@juliasilge I've added a change with a couple of things to try out once the preview deployment has completed.

  • The links are greyed and disabled until the checkbox is checked
  • Once the checkbox is checked, the links are normal and clickable again
  • Clicking on a link without the checkbox checked will show a dialog

The dialog can be customized more for style and behaviour. It's possible to change the dialog buttons to accept/decline the license and privacy and only allow the download if accept is selected.

I think with some more changes the dialog is more obvious why the download didn't start and can present the option of accepting or declining.

@juliasilge
Copy link
Collaborator

This is looking good! I think not having the table appear/disappear (but instead be disabled) is much better.

I think with some more changes the dialog is more obvious why the download didn't start and can present the option of accepting or declining.

Yes, I agree that the dialog is more obvious and a few more changes here would be great:

  • Can we style the dialog to inherit the styling of the site overall and change its placement? Much like the cookie consent support that Quarto has (see an example in the wild here)
  • Is it possible to use the dialog as the default/only way that people agree, and show the dialog when we load the page instead of when someone clicks?

download.qmd Outdated
</div>

<dialog id="accept-dialog">
<p>Agree to the privacy policy to download Positron.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor, but can we sync on this wording?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I've updated the dialog text and used the text that was for the checkbox.

Must accept modal to download
</div>
<div class="modal-body">
<p>
I agree to the <a href="licensing.html" target="_">Positron license agreement</a> and
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried using href="licensing" here but the preview can't navigate to it like with a live site. I've set the target to licensing.html so that it works in the preview.

@timtmok
Copy link
Contributor Author

timtmok commented Feb 19, 2025

I've changed to the modal dialog using Bootstrap components and fixed up the dialog text. The links have been scrubbed of the download URLs and set as data attributes. The agreement on the dialog will use that to navigate to the download. Declining the dialog close it.

image

@timtmok
Copy link
Contributor Author

timtmok commented Feb 19, 2025

It's a minor difference with it being a dialog now instead of a checkbox but I think the desired behaviour is the same. The user is agreeing by clicking on Accept on the dialog.

@juliasilge
Copy link
Collaborator

I am not seeing a dialog at https://deploy-preview-47--positron-posit-co.netlify.app/download.html now; do you know what might have happened?

Comment on lines 4 to 7
<div class="modal-header">
<h5>License Agreement and Privacy Policy</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems a bit redundant with the modal content. What do we think about removing the header?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it looked a bit empty without the header text. I can take it out and try out some other styling to tighten it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Here's what it looks like without the modal header. I think this is much cleaner.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I like this a lot! 🎉

I'm not seeing this dialog at https://deploy-preview-47--positron-posit-co.netlify.app/download.html, including in incognito mode. Do you know what might be happening there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I got the details after a screenshare with Pete. The modal doesn't appear until clicking on a link to download. It was the first thought for me when imagining how it it work. It's not too much to change it to show on page load.

Another option is reverting to the checkbox with a dialog showing when attempting to download without agreeing. So the user clicks the link and if the checkbox isn't checked, a dialog appears preventing the download with a reason.

@timtmok
Copy link
Contributor Author

timtmok commented Feb 20, 2025

Here's an alternate option with a fade to show that the content is available. The links are not clickable or focusable and the colour is greyed out until the checkbox is ticked.

Screen.Recording.2025-02-20.at.4.47.43.PM.mov

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