Constantly Contributing Pretty Patches FLCD
-
Upload
mark-casias -
Category
Technology
-
view
164 -
download
0
Transcript of Constantly Contributing Pretty Patches FLCD
![Page 1: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/1.jpg)
Constantly ContributingPretty Patches
![Page 2: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/2.jpg)
@teampoop
/in/markieslideshare.net/teampoop
Mark brings a fifteen year programming background and six years of Drupal experience to his role as Senior Drupal Developer at Mediacurrent. Highly involved in his local web community, Mark runs the ABQ Webgeeks Group and started the Albuquerque Drupal Users group.
Senior Drupal Developer - Mediacurrent
Shameless Self Promotion 1
![Page 3: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/3.jpg)
Mediacurrent Dropcasthttps://www.mediacurrent.com/[email protected]
@kepford@imariohernandez@ryanissampson
Shameless Self Promotion 2
![Page 4: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/4.jpg)
Mediacurrent Friday 55 things5 ways5 minutes on various topics.
Video (sorry)
Shameless Self Promotion 3
![Page 5: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/5.jpg)
Hey come work with me!
Mediacurrent helps organizations build highly impactful, elegantly designed Drupal websites that achieve the strategic results they need.
● Single-source provider● Specializing in Drupal since 2007● Headquartered in Atlanta, GA● Team of 60+ Drupal Experts
including development, design and strategy
● Clients include: Large Enterprise and high-profile global brands
![Page 6: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/6.jpg)
She’s my pal
This is DruLast thing about me.
![Page 7: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/7.jpg)
Why We Contribute
Why a Good Patch
Create a Good Patch
Know your Module Maintainer
4
3
2
1
Use a Good Patch5
Living in the Future6
![Page 8: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/8.jpg)
Why We Contribute
![Page 9: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/9.jpg)
Come for the software,Stay for the community
~Drupal Project Motto
Why We Contribute
![Page 10: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/10.jpg)
Every complaint is a contributor who needs guidance.
~Total misquote from @gregglesor was it @greggles who told me about it?
Why We Contribute
![Page 11: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/11.jpg)
Know your Module Maintainer
![Page 12: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/12.jpg)
• Probably not doing this full-time Probably working on something that puts food on the
table May not remember creating the project. May not exist (but that’s a different problem)
Know your Module Maintainer
Your module maintainer
![Page 13: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/13.jpg)
Short story long:Not at your beck and
call!
Know your Module Maintainer
![Page 14: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/14.jpg)
This does not apply to support requests. Thats
a different talk.
Know your Module Maintainer
![Page 15: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/15.jpg)
Why a Good Patch
![Page 16: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/16.jpg)
• Easier to review whats changed.Easy to apply to project.
Why make good patchesWhy a Good Patch
![Page 17: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/17.jpg)
Things that make a module maintainer sad.
Why a Good Patch
![Page 18: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/18.jpg)
Writing out requested code changes in the comments.
Why a Good Patch
![Page 19: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/19.jpg)
Zipping up a changed project and uploading it to issue.
Why a Good Patch
![Page 20: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/20.jpg)
Forking the project to Github or someplace and saying “check out my changes here”.
@Mediacurrent
Why a Good Patch
![Page 21: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/21.jpg)
• No distinct code changes.
Can’t easily integrate into project.
More work for maintainer.
#Why are these bad?
Why a Good Patch
![Page 22: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/22.jpg)
diff --git a/includes/jplayer.theme.inc b/includes/jplayer.theme.incindex 44a40c6..cb28394 100644--- a/includes/jplayer.theme.inc+++ b/includes/jplayer.theme.inc@@ -236,6 +236,7 @@ function jplayer_sort_files($raw_files = array(), $player_id = 0, $type = 'singl 'tabindex' => 1, 'onclick' => 'return(false);', ),+ 'html' => TRUE, ); if (isset($file) && $file['type'] == 'audio') { $files[][$file['ext']] = $file['url'];diff --git a/includes/jplayer_style_plugin.inc b/includes/jplayer_style_plugin.incindex b0b367b..329cb16 100644--- a/includes/jplayer_style_plugin.inc+++ b/includes/jplayer_style_plugin.inc@@ -112,7 +112,8 @@ class jplayer_style_plugin extends views_plugin_style { } $this->view->row_index = $row_index;- $label = trim(strip_tags($this->row_plugin->render($row)));+ $allowed_tags = array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'span', 'div');+ $label = trim(filter_xss($this->row_plugin->render($row), $allowed_tags)); if (empty($label)) { $label = basename($filepath); }https://www.drupal.org/files/issues/allow_html_tags_in_playlist-1649102-4.patch
Why a Good Patch
![Page 23: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/23.jpg)
• Distinct code changes.Can easily integrate into
project.Forever accessible to
the rest of the world.
#Why this is good?
Why a Good Patch
![Page 24: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/24.jpg)
Creating a good Patch
![Page 25: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/25.jpg)
Not an original thought!https://www.drupal.org/patch
Creating a Good Patch
![Page 26: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/26.jpg)
Checkout the project.
Creating a Good Patch
![Page 27: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/27.jpg)
git clone --branch 7.x-1.x http://git.drupal.org/project/colorbox.git
*branch and project name may vary
Creating a Good Patch
Check Out the Project
![Page 28: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/28.jpg)
Create a new, feature branch.git checkout -b [issue-number]-[issue-description]
Why?
Creating a Good Patch
![Page 29: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/29.jpg)
Make your awesome changes.
work /commit work / commit work /commit
Creating a Good Patch
![Page 30: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/30.jpg)
Create patch from differences between your branch and the
development branch.git diff 7.x-1-x > [PROJECT]-[DESCRIPTION]-[ISSUE#]-[COMMENT].patch
*Development branch name may vary*Patch name format should NOT.
Creating a Good Patch
![Page 31: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/31.jpg)
Seriously. Name your patches properly.
Creating a Good Patch
![Page 32: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/32.jpg)
Present your awesome back to the project.
Creating a Good Patch
●Update issue to “Needs Review”.
●Document your changes.●Sometimes you gotta nag.
![Page 33: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/33.jpg)
Using Patches
![Page 34: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/34.jpg)
Still not an original thought!
https://www.drupal.org/patch/apply
Using a Patch
![Page 35: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/35.jpg)
Checkout the project
Using a Patch
git clone --branch 7.x-1.x http://git.drupal.org/project/colorbox.git Didn’t we just see this?
![Page 36: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/36.jpg)
Download Patch to folder.
Using a Patch
![Page 37: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/37.jpg)
Apply the happy patches
Using a Patch
git apply -v path/file.patch
![Page 38: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/38.jpg)
Damien says:
Using a Patch
patch -p1 path/file.patch
Note to self: get link to blogpost from Damien
![Page 39: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/39.jpg)
Wait. Don’t Download!
Creating a Good Patch
curl https://www.drupal.org/files/issues/1307166-42.patch | patch -p1
![Page 40: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/40.jpg)
Living in the Future
![Page 41: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/41.jpg)
• Inline comments.
• Easier to pull from forked repos.
• Single button to merge changes.
Living in the Future
Pull requests instead of patches.
![Page 42: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/42.jpg)
Hot-fix Security Updates
Living in the Future
![Page 43: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/43.jpg)
Hot-fix Security UpdatesLiving in the Future
![Page 44: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/44.jpg)
Living in the Future
Hot-fix security fixes
![Page 45: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/45.jpg)
Living in the Future
Hot-fix security fixes
![Page 46: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/46.jpg)
@Mediacurrent Mediacurrent.com
Thank you!
slideshare.net/mediacurrent
![Page 47: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/47.jpg)
Constantly ContributingPretty Patches
![Page 48: Constantly Contributing Pretty Patches FLCD](https://reader036.fdocuments.in/reader036/viewer/2022062522/58abd1a81a28ab68068b7049/html5/thumbnails/48.jpg)
Constantly ContributingPretty Patches