mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
126 stars 41 forks source link

Replace devhub.docs links to MDN by EW #8127

Closed wagnerand closed 3 years ago

wagnerand commented 3 years ago

On the developer hub (and maybe in other places), we link to MDN, which in turn redirects to EW, for example https://github.com/mozilla/addons-server/blob/master/src/olympia/devhub/views.py#L1791-L1807 . We should link to the EW pages directly, as MDN is going through some bigger changes and redirects might break at some point.

// cc @caitmuenster

eviljeff commented 3 years ago

If we can get a list of the links this could be a GFB

caitmuenster commented 3 years ago

This is an exciting bug for the legacy Dev Hub! It seems like some of the things referenced in https://github.com/mozilla/addons-server/blob/master/src/olympia/devhub/views.py#L1791-L1807 aren't being used. Here's what I see on the legacy DevHub:

Screen Shot 2021-01-07 at 12 17 13 PM

I'm not sure where some of these other links get referenced, but we should be able to remove the following:

eviljeff commented 3 years ago

(I should have looked at the link to the code before I commented!)

https://github.com/mozilla/addons-server/blob/master/src/olympia/devhub/views.py#L1791-L1807 are old redirects from /developers/docs/xxx e.g. https://addons.mozilla.org/developers/docs/themes goes to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Themes/Background (which is a 404)

If we don't want to keep those redirect around any longer we could remove it. There are another ~39~ 23* references to MDN in the addons-server codebase though (some in emails, etc) - the links in the devhub header @caitmuenster noted are the most prominent - should they all be changed from MDN?

(*16 were in test files/comments)

caitmuenster commented 3 years ago

The links in the emails do need to be updated. :/ Would we need to file a separate issue for that?

the links in the devhub header @caitmuenster noted are the most prominent - should they all be changed from MDN?

Yes! It also looks like we have an update for the new Dev Hub front-end:

Screen Shot 2021-01-07 at 12 05 04 PM
eviljeff commented 3 years ago

These are all the literal results - I don't know if they need splitting out into different issues (probably not?):


olympia • src\olympia\applications\templates\applications\appversions.html:
  16  {% endtrans %}</p>
  17  
  18: <p>{% trans amo_version_link_open='<a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/applications">'|safe,
  19              amo_version_link_close='</a>'|safe %}
  20        Please be aware that WebExtensions will not accept a "*" in {{ amo_version_link_open }}strict_min_version{{ amo_version_link_close }}.

  36  
  37  <p>
  38:   {% trans amo_manifests_mdn_link_open='<a href="http://developer.mozilla.org/en/docs/Install_Manifests">'|safe,
  39              amo_manifests_mdn_link_close='</a>'|safe %}
  40      If your supported application does not require a manifest file, you still

olympia • src\olympia\constants\base.py:
  344                  'Validation was unable to complete successfully due to an '
  345                  'unexpected error.',
  346:                 'Check https://developer.mozilla.org/en-US/Add-ons/WebExtensions '
  347                  'to ensure your webextension is valid or file a bug at '
  348                  'http://bit.ly/1POrYYU',

olympia • src\olympia\devhub\file_validation_annotations.py:
  101          blog_link_close='</a>',
  102          doc_link_open=(
  103:             '<a href="https://developer.mozilla.org/docs/Mozilla/Add-ons/'
  104              'WebExtensions/manifest.json/chrome_settings_overrides">'
  105          ),

olympia • src\olympia\devhub\templates\devhub\nav.html:
  35        <a href="#" class="controller">{{ _('Documentation') }}</a>
  36        <ul>
  37:         <li><a href="https://developer.mozilla.org/en-US/Add-ons">
  38            {{ _('Extension Development') }}</a></li>
  39:         <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Themes">
  40            {{ _('Themes') }}</a></li>
  41          <li><a href="{{ url('devhub.docs', 'policies') }}">

olympia • src\olympia\devhub\templates\devhub\emails\submission.html:
   3  <p>Please keep in mind that while your add-on has been screened and approved for listing, other reviewers may look into it in the future and determine that it requires changes or should be removed from the gallery. If that occurs, you will receive a separate notification with details and next steps.</p>
   4  
   5: <p>For more information about the review process and policies, please visit <a href="https://developer.mozilla.org/Add-ons/AMO/Policy/Reviews">https://developer.mozilla.org/Add-ons/AMO/Policy/Reviews</a>.</p>
   6  
   7  <hr />

  11  <p>Add-ons help personalize the web experience for millions of users who have installed Firefox, and we want to help make your users happy!</p>
  12  
  13: <p>To learn how to help users discover your extension, stay up-to-date with news from the add-ons community, or contact the add-ons team, please visit <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Distribution/Resources_for_publishers">https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Distribution/Resources_for_publishers</a>.</p>>
  14  
  15  <p>If you are interested in getting more involved with Mozilla and want to help keep the add-ons ecosystem safe and healthy, please consider becoming a volunteer add-on reviewer. You can learn more at <a href="https://wiki.mozilla.org/Add-ons/Reviewers">https://wiki.mozilla.org/Add-ons/Reviewers</a>.</p>

olympia • src\olympia\devhub\templates\devhub\includes\source_form_field.html:
  5      {{ _('Please include instructions on how to reproduce the final add-on file, '
  6           'either in a README file or the Notes to Reviewer for this version.') }}<br />
  7:     <a href="https://developer.mozilla.org/en-US/Add-ons/AMO/Policy/Reviews#Source_Code_Submission"
  8        target="_blank" rel="noopener noreferrer">{{
  9        _('Read more about the source code review policy.') }}</a>

olympia • src\olympia\devhub\templates\devhub\new-landing\components\dev_footer.html:
  7          <h4>{{ _('Documentation') }}</h4>
  8          <ul>
  9:           <li><a href="https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=devhub-resource-link">{{ _('WebExtensions API') }}</a></li>
  10            <li><a href="{{ settings.EXTENSION_WORKSHOP_URL }}/extension-basics/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=devhub-resource-link">{{ _('Extensions') }}</a></li>
  11            <li><a href="{{ settings.EXTENSION_WORKSHOP_URL }}/documentation/themes/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=devhub-resource-link">{{ _('Themes') }}</a></li>

olympia • src\olympia\devhub\templates\devhub\new-landing\components\navigation.html:
  20            {{ _('Extension Workshop') }}
  21        </a></li>
  22:       <li class="in-hamburger-menu"><a href="https://developer.mozilla.org/en-US/Add-ons">
  23          {{ _('Documentation') }}
  24        </a></li>
  25:       <li class="in-hamburger-menu"><a href="https://developer.mozilla.org/en-US/Add-ons#Contact_us">
  26          {{ _('Support') }}
  27        </a></li>

olympia • src\olympia\reviewers\templates\reviewers\emails\base.ltxt:
   9  To respond, please reply to this email or visit: {{ dev_versions_url }}
  10  
  11: You can also get in touch with us using these channels: https://developer.mozilla.org/Add-ons#Contact_us
  12  
  13: For tips on how to attract more users by updating your add-on’s listing, please visit: https://developer.mozilla.org/Add-ons/Listing
  14  
  15: To learn more about the review process, please visit: https://developer.mozilla.org/en-US/Add-ons/AMO/Policy/Reviews
  16  
  17  -- 

olympia • src\olympia\templates\copyright.html:
  16          {% endif %}
  17          &nbsp;|&nbsp;<a href="https://status.mozilla.org">{{ _('Site Status')}}</a>
  18:         &nbsp;|&nbsp;<a href="https://developer.mozilla.org/en-US/Add-ons/AMO/Policy/Contact">{{ _('Report a bug')}}</a>
  19        {% endblock %}
  20      {% endblock %}

olympia • src\olympia\templates\photon-footer.html:
  13                  <li><a class="Footer-extension-workshop-link" href="{{ settings.EXTENSION_WORKSHOP_URL }}/?utm_source=addons.mozilla.org&amp;utm_medium=referral&amp;utm_content=footer-link">Extension Workshop</a></li>
  14                  <li><a href="{{ url('devhub.index') }}">Developer Hub</a></li>
  15:                 <li><a href="https://developer.mozilla.org/docs/Mozilla/Add-ons/AMO/Policy">Developer Policies</a></li>
  16                  <li><a href="https://discourse.mozilla-community.org/c/add-ons">Forum</a></li>
  17:                 <li><a class="Footer-bug-report-link" href="https://developer.mozilla.org/Add-ons/AMO/Policy/Contact">Report a bug</a></li>
  18                  <li><a href="{{ url('pages.review_guide') }}">Review Guide</a></li>
  19                  <li><a href="https://status.mozilla.org/">Site Status</a></li>
eviljeff commented 3 years ago

And there's the slightly more opaque usage of the old redirects that were highlighted: https://github.com/mozilla/addons-server/blob/master/src/olympia/devhub/views.py#L1791-L1807 - those are probably best dealt with in a separate issue (to either update or remove them)

eviljeff commented 3 years ago

Filed mozilla/addons#8255 for remaining links to devhub.

In addition to the other changes made in spun-off issues already, this issue still contains, imo, two different problems - one is the old redirects that @wagnerand reports in the issue summary, and the other is the out of date nav bar that @caitmuenster has detailed in the 2 comments. I'll leave Caitlin and Andreas to fight over who gets to claim this issue and who has to log a new one! 😆

eviljeff commented 3 years ago

closing as we've filed follow-ups for everything (I hope!)