-
Notifications
You must be signed in to change notification settings - Fork 150
Detailed example attribution #841
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
base: main
Are you sure you want to change the base?
Conversation
@ksen0 This looks great! I really appreciate the thoughtfulness of how you put this together. One tiny tweak: it occurred to me that since the code was copied over to this repo in 2024, it should be "2024 onwards" rather than 2023. This certainly does not need to be in this PR, but something to consider for the future: I think it would be helpful for readers to have some visual design distinction between the description and attribution. I'm picturing the ways that text publications design attribution information in articles. Italics is a common convention but may look awkward with this much text. Maybe just a slightly different background color? Thank you again! |
c2a9d3e
to
fc3c9ef
Compare
Hi @calebfoss ! This is ready for review. I've updated the 2023 to 2024, and created some flexibility for attribution copy in the schema, happy to hear your thoughts.
That seems like a good idea, I will look into that (background color and/or italics), but opening the functionality for review now. Do you think using a slightly smaller font can be an option too or does something speak against it? Also: I'm not totally sure how to correctly indicate Malay's work in some of the examples (Alpha Mask, Sine Cosine, Aim). Color Wheel and Lyrics Poem does attribute Malay but I wasn't sure on correct |
@ksen0 thank you again for your work on this! Here are the issues I found:
Across the examples, none currently link the code on GitHub for the original site version or the 2023 revision version. The 2023 revision link points to the 2023 repo, but not the specific code. As we discussed in #415, linking the specific code from both the p5.js-website-legacy and p5.js-example repos provides a path to the git history, which documents many more contributors' work. I am really happy to see this getting close to completion! Thanks again! |
Those ones you tagged me on are ones I made, yep! |
Hi @calebfoss , thanks for the detailed list! While working on this, I'm trying to keep maintenance in mind, too, and the next commit is WIP but below is a question I have in terms of design, if you have any thoughts on the below please let me know! As an update, I added support for multiple attributions in one remix line ("Revised in 2023 by PersonA, PersonB") so the missing attributions will appear in the next iteration. With that I can cover all the missing credit cases. Not yet committed to PR, but here's an example of remix:
- description: Revised in 2023 by
attribution:
- name: Caleb Foss
- name: Darren Kessner
codeURL: TODO - specific example code goes here (There's a lookup, I also updated the phrasing or "Remixed from" -> "Inspired by" of the Conditions examples, but for the structure as a whole, from what I understand, "remix" has the widest applicable meaning in modifying and building on open source code in many different ways (example usage in an analysis of sketches). Unless there is another similarly flexible alternative, I'd like to keep this usage, at least under the hood. (Because this schema is pretty complex, I'll also be adding some contributor guidelines on using it when this is more defined.) I've been trying to figure out a way to add the code links to the two repos. Please let me know if the two links in the blow example don't meet the criterion! (EDITED to reflect slightly renamed fields in an attempt to improve readability) remix:
- description: Inspired by
attribution:
- name: Prof. WM Harris
URL: https://people.rit.edu/wmhics/
codeURL: https://github.com/processing/p5.js-website-legacy/blob/main/src/data/examples/en/04_Control/05_Logical_Operators_2.js
- description: Revised in 2023 by
attribution:
- name: Caleb Foss
codeURL: https://github.com/processing/p5.js-example/tree/main/examples/02_Animation_And_Variables/03_Conditions
- collective:
- since: 2024 Option 1Less legible because too many links and unclear where the "inspired" and "revised" links go: Option 2More legible, however there are some challenges with this: I think if at some point these links become inaccessible, then it's possible to easily identify, remove, or replace with wayback machine versions where possible, so this seems alright, but please let me know if you see any other potential maintainability issues. Potential issues with option 2:
Anyway, I'm still working on this, and I'll update here if I have a different more compact (in terms of schema and template layout code) solution, but in the meantime I wanted to share in case you had thoughts on this! |
Thanks for the update @ksen0! I'm with you on Option 2 looking like a better direction. The word "code" tells me what to expect by clicking the link. To make the link more clear out of context for accessibility without getting too verbose, perhaps Regarding linking the current code, I think of the message included at the bottom of Reference pages:
I would expect this to improve the maintenance process, as it invites the community to help without having to sift through the GitHub repo searching for the matching file. If you had the current GitHub code path in the MDX, you could consider reusing it for both the attribution section and an invitation to help that matches the reference pages. |
Addresses #415 - work in progress. Remains to be done:
Prof** WM Harris
,GH/prashantgupta24
Curent Behavior
The license is at the bottom of the page, and attribution (inspired by and maintained by) is split.
(Then there is the sketch and the code - viewer has to scroll all the way down)
PR Behavior
Considering showing the attribution more clearly. "p5.js Contributors" also points to all-contributors list in p5.js repo README, rather than the People page. The screenshots includes rephrasing to increase clarity for each example but make the history more maintainable overall using a clearer schema; this is also open to feedback.
Future use
Although attribution of p5.js contributors work is collective, this schema allows detailed attribution of referenced work from outside the community. For example, including the following in the
.mdx
of an example:Will create the following attribution:
Thus, new examples can be added that correctly attribute referenced material. In the above schema, the
collectivelyAttributedSince
field is applicable mainly to examples ported from the Processing or archived p5.js site. For future additions, theremix
filed can be used to provide a complete history. The URLs for attribution and type of remix can be edited, with optional URLs. If there is no remixLabel, "Remixed from" will be used, but other phrasing can be provided for clarity.