Fatih Acet
Sr. Frontend Engineer at GitLab
Software Craftsmanship Turkey
04.04.2018
Fatih Acet
Sr. Frontend Engineer at GitLab.com
@fatihacet
acetfatih@gmail.com
fatihacet.com
gitlab.com/fatihacet
github.com/fatihacet
Google Developer Expert on Web Technologies
GitLab Nedir?
GitLab Community Edition
Issue Boards
Merge Requests
Pipelines (CI/CD)
37 ulkeden 265 calisani bulunan
"remote only" bir sirket
18 Frontend Gelistiricisi
Team Handbook
Mayis 2016
Notes.prototype.renderDiscussionNote = function(note) {
var discussionContainer, form, note_html, row;
if (!this.isNewNote(note)) {
return;
}
this.note_ids.push(note.id);
form = $("#new-discussion-note-form-" + note.discussion_id);
if ((note.original_discussion_id != null) && form.length === 0) {
form = $("#new-discussion-note-form-" + note.original_discussion_id);
}
row = form.closest("tr");
note_html = $(note.html);
note_html.renderGFM();
// is this the first note of discussion?
discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']");
if ((note.original_discussion_id != null) && discussionContainer.length === 0) {
discussionContainer = $(".notes[data-discussion-id='" + note.original_discussion_id + "']");
}
if (discussionContainer.length === 0) {
// insert the note and the reply button after the temp row
row.after(note.diff_discussion_html);
// remove the note (will be added again below)
row.next().find(".note").remove();
// Before that, the container didn't exist
discussionContainer = $(".notes[data-discussion-id='" + note.discussion_id + "']");
// Add note to 'Changes' page discussions
discussionContainer.append(note_html);
// Init discussion on 'Discussion' page if it is merge request page
if ($('body').attr('data-page').indexOf('projects:merge_request') === 0) {
$('ul.main-notes-list').append(note.discussion_html).renderGFM();
}
} else {
// append new note to all matching discussions
discussionContainer.append(note_html);
}
if (typeof gl.diffNotesCompileComponents !== 'undefined') {
gl.diffNotesCompileComponents();
}
gl.utils.localTimeAgo($('.js-timeago'), false);
return this.updateNotesCount(1);
};
Haziran 2016
CoffeeScript'den ES6'e gecis
Temmuz 2016
ESLint
Kasim 2016
Babel + Webpack'e gecis
Yarn
Agustos 2016
❤️
VueJS v2
Neden Vue JS?
Neler kazandirdi?
Nasil kullaniyoruz?
Nasil kullaniyoruz?
Nasil kullaniyoruz?
export default {
directives: {
tooltip,
},
props: {
discussions: {
type: Array,
required: true,
},
},
components: {
Icon,
UserAvatarImage,
},
computed: {
discussionsExpanded() {
return this.discussions.every(discussion => discussion.expanded);
},
allDiscussions() {
return this.discussions.reduce((acc, note) => {
return acc.concat(note.notes);
}, []);
},
},
methods: {
...mapActions(['toggleDiscussion']),
getTooltipText(note) {
if (note.length > LENGTH_OF_AVATAR_TOOLTIP) {
note = truncate(note, LENGTH_OF_AVATAR_TOOLTIP);
}
return `${noteData.author.name}: ${note}`;
},
},
};
</script>
<template>
<div class="diff-comment-avatar-holders">
<button
v-if="discussionsExpanded"
@click="toggleDiscussions"
type="button"
aria-label="Show comments"
class="diff-notes-collapse js-diff-comment-avatar"
>
<icon
name="collapse"
:size="12"
/>
</button>
Isler nasil yuruyor?
Isler
Isler
Isler
Isler
SORU & CEVAP
TESEKKURLER
❤️
By Fatih Acet