Skip to content

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Jul 14, 2025

Fixes: mozilla/addons#15681

Description

Refactor documentation links and update agreement form layout

  • Replaced hardcoded URLs in the docs view with helper functions for better maintainability.
  • Updated the agreement form in the template to use labels for inputs, improving accessibility.
  • Adjusted the test for agreement form errors to match the new HTML structure.
  • Added a redirect test for the policies documentation page.

Context

We need to add another link to an already confusing html structure and we mention the "exact" same words in the paragraph above explaining the context. We can just ad the links there instead of confusingly adding them (and then mulitiple sibling links) inside the html form.

Testing

  • with a fresh developer account, open the agreement form
  • the checkbox items should be clickable links to open the linked docs in a new tab
  • there should be a new FAQ link in the form description that opens the new FAQ page on extensionworkshop
  • all links should have a utm_referrer=amo parameter.
Screen.Recording.2025-07-24.at.01.04.07.mov

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from 8934c3b to 4a67ec2 Compare July 14, 2025 14:55
@wagnerand

This comment was marked as resolved.

@wagnerand

This comment was marked as resolved.

@KevinMind KevinMind marked this pull request as draft July 16, 2025 07:54
@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from 4a67ec2 to f71d8ec Compare July 17, 2025 19:56
@KevinMind

This comment was marked as resolved.

@KevinMind KevinMind requested review from eviljeff and Copilot July 17, 2025 20:00
@KevinMind KevinMind marked this pull request as ready for review July 17, 2025 20:00
Copilot

This comment was marked as outdated.

@KevinMind KevinMind marked this pull request as draft July 18, 2025 07:53
@KevinMind

This comment was marked as resolved.

@KevinMind KevinMind marked this pull request as ready for review July 18, 2025 08:18
@wagnerand wagnerand requested a review from fjosephmoz July 18, 2025 08:23
@wagnerand

This comment was marked as resolved.

@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from 4013fb2 to c0b237e Compare July 18, 2025 10:42
Copy link
Member

@eviljeff eviljeff left a comment

Choose a reason for hiding this comment

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

code review r+wc

  • I'll check it out for a test once Frantz has okayed the copy, etc.

@fjosephmoz

This comment was marked as resolved.

@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch 2 times, most recently from 2a2fc4d to 0fac43b Compare July 18, 2025 19:00
@KevinMind

This comment was marked as resolved.

@KevinMind

This comment was marked as resolved.

@KevinMind KevinMind marked this pull request as draft July 18, 2025 19:27
@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from e435e05 to 4992a3b Compare July 22, 2025 12:42
@fjosephmoz

This comment was marked as resolved.

@KevinMind

This comment was marked as resolved.

@fjosephmoz

This comment was marked as resolved.

@KevinMind

This comment was marked as resolved.

@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from 4992a3b to 4f6be1e Compare July 23, 2025 22:15
@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch 2 times, most recently from 970fd59 to 856ad85 Compare July 23, 2025 22:26
@KevinMind KevinMind requested review from eviljeff and Copilot July 23, 2025 22:27
Copilot

This comment was marked as resolved.

@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from 0b37410 to e055d4c Compare July 23, 2025 23:08
…ge in template

- Replaced hardcoded URLs in the `docs` view with helper functions for better maintainability.
- Updated the agreement message in the `agreement.html` template to include a link to the FAQ and improved wording.
- Adjusted test case to reflect the change in the URL structure for the policies documentation.

Refactor URL generation in `docs` view and enhance test assertions

- Introduced a helper function `get_url` to streamline URL construction in the `docs` view.
- Updated test cases to assert the presence of the `utm_referrer=amo` query parameter for 301 redirects.
- Improved readability of the test case by unpacking the URL and status code directly in the loop.

Update src/olympia/devhub/templates/devhub/includes/agreement.html

Co-authored-by: Copilot <[email protected]>

TMP: better name for argument
@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from e055d4c to a489a00 Compare July 24, 2025 01:58
@KevinMind KevinMind force-pushed the kevinmind/addons/15681 branch from a489a00 to c3dc9e9 Compare July 24, 2025 01:59
@KevinMind KevinMind marked this pull request as ready for review July 24, 2025 02:01
Copy link
Member

@eviljeff eviljeff left a comment

Choose a reason for hiding this comment

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

I think this is working as expected, from reading the back and forth - the testing instructions and video relate to an earlier iteration.

@KevinMind
Copy link
Contributor Author

The video I updated last night and the solution we ended up going with is having the FAQ link in the form description and keeping all of the other links the same.

I'll double check the test instructions to make sure they match.

@KevinMind KevinMind merged commit 2bf9c64 into master Jul 24, 2025
46 checks passed
@KevinMind KevinMind deleted the kevinmind/addons/15681 branch July 24, 2025 12:28
eviljeff pushed a commit that referenced this pull request Jul 28, 2025
…ious (#23689)

* Refactor documentation URLs in `docs` view and update agreement message in template

- Replaced hardcoded URLs in the `docs` view with helper functions for better maintainability.
- Updated the agreement message in the `agreement.html` template to include a link to the FAQ and improved wording.
- Adjusted test case to reflect the change in the URL structure for the policies documentation.

Refactor URL generation in `docs` view and enhance test assertions

- Introduced a helper function `get_url` to streamline URL construction in the `docs` view.
- Updated test cases to assert the presence of the `utm_referrer=amo` query parameter for 301 redirects.
- Improved readability of the test case by unpacking the URL and status code directly in the loop.

Update src/olympia/devhub/templates/devhub/includes/agreement.html

Co-authored-by: Copilot <[email protected]>

TMP: better name for argument

* TMP: fix broken link rendering false positives by adding actually referenced links to the docs link test

* TMP: fix broken test
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.

[Task]: Add link to policy FAQ page to submission flow dev-agreement page
4 participants