Closed Bug 1076893 Opened 11 years ago Closed 5 years ago

Migrate or remove code samples under /samples/ dir

Categories

(developer.mozilla.org Graveyard :: General, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: fs, Unassigned)

References

Details

(Whiteboard: [specification][type:bug])

Attachments

(1 file)

What did you do? ================ 1. Saw a page linking to https://developer.mozilla.org/samples/domref/mozGetAsFile.html What happened? ============== Can't edit or remove it, because it is a static file on the server. I don't have access to it. Outdated code samples, which we can't maintain, are bad. What should have happened? ========================== It should have been a (live) sample code on the MDN page. Is there anything else we should know? ====================================== Can we get a list of the directories and files please? The plan is probably to migrate or remove them from where they are now and put them on MDN directly.
Thanks Luke! I will probably file some sub bugs to migrate the files into the relevant Canvas/CSS/DOM/XUL content areas. Although, I guess XUL migration won't happen as we don't maintain those docs at the moment. Do we have traffic or access data for these directories/files?
Flags: needinfo?(lcrouch)
Depends on: 1078186
Hmm ... no, we don't. :( We track clicks to *external* links, but since these URLs are at "developer.mozilla.org" we don't measure them. Do we need to measure them to do this cleanup?
Flags: needinfo?(lcrouch) → needinfo?(fscholz)
It would be better, I think. We can't just delete stuff, if there is a ton of people accessing them. Once we remove links to those static resources from our wiki content, traffic should go down there. If it is still too high after a while, we also need to create redirects probably.
Flags: needinfo?(fscholz)
Depends on: 1078676
Blocks: 1075269
Blocks: 955938
(In reply to Luke Crouch [:groovecoder] from comment #1) > https://pastebin.mozilla.org/6691078 Luke, this pastebin is now empty. Can you please attach a list of the directories and files under /samples/ to this bug please? Thanks!
Flags: needinfo?(lcrouch)
Depends on: 1215255
Flags: needinfo?(lcrouch)
Depends on: 1226611
Blocks: 1232167
Blocks: 1110801
Depends on: 1288157
Blocks: 1457818
Depends on: 1398923
See Also: → 827863

I think the slow-and-steady approach of the last five years has not been very successful, and it is time for a quicker solution.

My preference is to:

  1. Publish a Github repo with these samples. I've started this as a private repo https://github.com/mozilla/mdn-legacy-files, when I thought we would bring the files under configuration management and might make changes. I think the large files should be added to the repo, and then it should be made public and moved to the https://github.com/mdn org, then archived to prevent further changes.

  2. Stop serving files from /samples, /diagrams and /presentations (404)

  3. Shut down the backing storage for these files, removing one more quirk of the MDN architecture.

This came up because I was asked if we could migrate mdn-legacy-files to a public repo. I'm against it because it would create a searchable index of the /samples folder, which may contain code that is dangerous to MDN or its users as long as they are being served from developer.mozilla.org. However, if MDN was no longer serving the files, I think an archived repo would be interesting for historical purposes, as well as a reference for migrating any broken samples to the live sample system or other current samples implementations.

MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: