diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 4f1efb8f8..7aabdb8c4 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -8,9 +8,11 @@ about: Create a report to help us improve
**Describe the bug**
+
**To Reproduce**
+
@@ -19,9 +21,11 @@ about: Create a report to help us improve
**Expected behavior**
+
**Screenshots**
+
**Desktop (please complete the following information):**
@@ -38,4 +42,5 @@ about: Create a report to help us improve
- Version:
**Additional context**
+
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 70db6972f..b21ade046 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -4,13 +4,17 @@ about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
+
**Describe the solution you'd like**
+
**Describe alternatives you've considered**
+
**Additional context**
+
diff --git a/app/assets/images/mobile-onboarding-background.png b/app/assets/images/mobile-onboarding-background.png
new file mode 100644
index 000000000..564e66005
Binary files /dev/null and b/app/assets/images/mobile-onboarding-background.png differ
diff --git a/app/assets/images/onboarding-background-white.png b/app/assets/images/onboarding-background-white.png
new file mode 100644
index 000000000..7cc09d02d
Binary files /dev/null and b/app/assets/images/onboarding-background-white.png differ
diff --git a/app/assets/images/onboarding-background.png b/app/assets/images/onboarding-background.png
new file mode 100644
index 000000000..105342c39
Binary files /dev/null and b/app/assets/images/onboarding-background.png differ
diff --git a/app/assets/images/purple-dev-logo.png b/app/assets/images/purple-dev-logo.png
new file mode 100644
index 000000000..a46367325
Binary files /dev/null and b/app/assets/images/purple-dev-logo.png differ
diff --git a/app/assets/javascripts/hello-dev.js b/app/assets/javascripts/hello-dev.js
index 6ac359010..486acfc33 100644
--- a/app/assets/javascripts/hello-dev.js
+++ b/app/assets/javascripts/hello-dev.js
@@ -1,5 +1,5 @@
var bigDev =
-' \n \
+ ' \n \
\n \
-oooooooo/- .+ooooooooo: +ooo+ oooo/ \n \
+MMMMMMMMMMm+ -NMMMMMMMMMMs +MMMM: /MMMM/ \n \
@@ -19,5 +19,5 @@ var bigDev =
console.log(
bigDev,
"Hey there! Interested in the code behind dev.to? Well you're in luck - we're open source! Come say hi, tell us what you're debugging, or even lend a hand in our repo - https://github.com/thepracticaldev/dev.to/ \n",
- "Did you find a bug or vulnerability? Check out our bug bounty info here: https://dev.to/security"
+ 'Did you find a bug or vulnerability? Check out our bug bounty info here: https://dev.to/security',
);
diff --git a/app/assets/javascripts/initializers/initializeAllFollowButts.js b/app/assets/javascripts/initializers/initializeAllFollowButts.js
index 6557346b4..0d150cdf9 100644
--- a/app/assets/javascripts/initializers/initializeAllFollowButts.js
+++ b/app/assets/javascripts/initializers/initializeAllFollowButts.js
@@ -1,6 +1,6 @@
function initializeAllFollowButts() {
var followButts = document.getElementsByClassName('follow-action-button');
- for(var i = 0; i < followButts.length; i++) {
+ for (var i = 0; i < followButts.length; i++) {
initializeFollowButt(followButts[i]);
}
}
@@ -8,10 +8,12 @@ function initializeAllFollowButts() {
//private
function initializeFollowButt(butt) {
- var user = userData()
- var deviceWidth = (window.innerWidth > 0) ? window.innerWidth : screen.width;
+ var user = userData();
+ var deviceWidth = window.innerWidth > 0 ? window.innerWidth : screen.width;
var buttInfo = JSON.parse(butt.dataset.info);
- var userStatus = document.getElementsByTagName('body')[0].getAttribute('data-user-status');
+ var userStatus = document
+ .getElementsByTagName('body')[0]
+ .getAttribute('data-user-status');
if (userStatus === 'logged-out') {
addModalEventListener(butt);
return;
@@ -19,9 +21,8 @@ function initializeFollowButt(butt) {
if (buttInfo.className === 'Tag' && user) {
handleTagButtAssignment(user, butt, buttInfo);
return;
- }
- else {
- if(butt.dataset.fetched === 'fetched') {
+ } else {
+ if (butt.dataset.fetched === 'fetched') {
return;
}
fetchButt(butt, buttInfo);
@@ -30,27 +31,34 @@ function initializeFollowButt(butt) {
function addModalEventListener(butt) {
assignState(butt, 'login');
- butt.onclick = function (e) {
+ butt.onclick = function(e) {
e.preventDefault();
showModal('follow-button');
return;
- }
+ };
}
function fetchButt(butt, buttInfo) {
butt.dataset.fetched = 'fetched';
var dataRequester;
if (window.XMLHttpRequest) {
- dataRequester = new XMLHttpRequest();
+ dataRequester = new XMLHttpRequest();
} else {
- dataRequester = new ActiveXObject('Microsoft.XMLHTTP');
+ dataRequester = new ActiveXObject('Microsoft.XMLHTTP');
}
dataRequester.onreadystatechange = function() {
- if (dataRequester.readyState === XMLHttpRequest.DONE && dataRequester.status === 200) {
+ if (
+ dataRequester.readyState === XMLHttpRequest.DONE &&
+ dataRequester.status === 200
+ ) {
addButtClickHandle(dataRequester.response, butt);
}
- }
- dataRequester.open('GET', '/follows/' + buttInfo.id + '?followable_type=' + buttInfo.className, true);
+ };
+ dataRequester.open(
+ 'GET',
+ '/follows/' + buttInfo.id + '?followable_type=' + buttInfo.className,
+ true,
+ );
dataRequester.send();
}
@@ -61,11 +69,16 @@ function addButtClickHandle(response, butt) {
butt.onclick = function(e) {
e.preventDefault();
handleOptimisticButtRender(butt);
- }
+ };
}
function handleTagButtAssignment(user, butt, buttInfo) {
- var buttAssignmentBoolean = JSON.parse(user.followed_tags).map(function (a) { return a.id; }).indexOf(buttInfo.id) !== -1;
+ var buttAssignmentBoolean =
+ JSON.parse(user.followed_tags)
+ .map(function(a) {
+ return a.id;
+ })
+ .indexOf(buttInfo.id) !== -1;
var buttAssignmentBoolText = buttAssignmentBoolean ? 'true' : 'false';
addButtClickHandle(buttAssignmentBoolText, butt);
shouldNotFetch = true;
@@ -75,17 +88,13 @@ function assignInitialButtResponse(response, butt) {
butt.classList.add('showing');
if (response === 'true' || response === 'mutual') {
assignState(butt, 'unfollow');
- }
- else if (response === 'follow-back') {
- assignState(butt, 'follow-back')
- }
- else if (response === 'false') {
+ } else if (response === 'follow-back') {
+ assignState(butt, 'follow-back');
+ } else if (response === 'false') {
assignState(butt, 'follow');
- }
- else if (response === 'self') {
+ } else if (response === 'self') {
assignState(butt, 'self');
- }
- else {
+ } else {
assignState(butt, 'login');
}
}
@@ -98,25 +107,29 @@ function handleOptimisticButtRender(butt) {
} else {
// Handles actual following of tags/users
try {
- //lets try grab the event buttons info data attribute user id
- var evFabUserId = JSON.parse(butt.dataset.info).id;
- var requestVerb = butt.dataset.verb;
- //now for all follow action buttons
- document.querySelectorAll('.follow-action-button').forEach(function(fab){
- try{
- //lets check they have info data attributes
- if( fab.dataset.info ){
- //and attempt to parse those, to grab that buttons info user id
- var fabUserId = JSON.parse(fab.dataset.info).id;
- //now does that user id match our event buttons user id?
- if ( fabUserId && fabUserId === evFabUserId ) {
- //yes - time to assign the same state!
- assignState(fab, requestVerb);
- }
- }
- }catch (err) {return}
- });
- }catch (err) {return}
+ //lets try grab the event buttons info data attribute user id
+ var evFabUserId = JSON.parse(butt.dataset.info).id;
+ var requestVerb = butt.dataset.verb;
+ //now for all follow action buttons
+ document.querySelectorAll('.follow-action-button').forEach(function(fab) {
+ try {
+ //lets check they have info data attributes
+ if (fab.dataset.info) {
+ //and attempt to parse those, to grab that buttons info user id
+ var fabUserId = JSON.parse(fab.dataset.info).id;
+ //now does that user id match our event buttons user id?
+ if (fabUserId && fabUserId === evFabUserId) {
+ //yes - time to assign the same state!
+ assignState(fab, requestVerb);
+ }
+ }
+ } catch (err) {
+ return;
+ }
+ });
+ } catch (err) {
+ return;
+ }
handleFollowButtPress(butt);
}
diff --git a/app/assets/javascripts/initializers/initializeArticleReactions.js b/app/assets/javascripts/initializers/initializeArticleReactions.js
index 10eef26f8..79f76fa20 100644
--- a/app/assets/javascripts/initializers/initializeArticleReactions.js
+++ b/app/assets/javascripts/initializers/initializeArticleReactions.js
@@ -1,75 +1,84 @@
// Set reaction count to correct number
function setReactionCount(reactionName, newCount) {
- var reactionClassList = document.getElementById("reaction-butt-" + reactionName).classList;
- var reactionNumber = document.getElementById("reaction-number-" + reactionName);
+ var reactionClassList = document.getElementById(
+ 'reaction-butt-' + reactionName,
+ ).classList;
+ var reactionNumber = document.getElementById(
+ 'reaction-number-' + reactionName,
+ );
if (newCount > 0) {
- reactionClassList.add("activated");
+ reactionClassList.add('activated');
reactionNumber.textContent = newCount;
-
- }
- else {
- reactionClassList.remove("activated");
- reactionNumber.textContent = "0";
+ } else {
+ reactionClassList.remove('activated');
+ reactionNumber.textContent = '0';
}
}
function showUserReaction(reactionName, animatedClass) {
- document.getElementById("reaction-butt-" + reactionName).classList.add("user-activated", animatedClass);
+ document
+ .getElementById('reaction-butt-' + reactionName)
+ .classList.add('user-activated', animatedClass);
}
function hideUserReaction(reactionName) {
- document.getElementById("reaction-butt-" + reactionName).classList.remove("user-activated", "user-animated");
+ document
+ .getElementById('reaction-butt-' + reactionName)
+ .classList.remove('user-activated', 'user-animated');
}
function hasUserReacted(reactionName) {
- return document.getElementById("reaction-butt-" + reactionName)
- .classList.contains("user-activated");
-
+ return document
+ .getElementById('reaction-butt-' + reactionName)
+ .classList.contains('user-activated');
}
function getNumReactions(reactionName) {
- var num = document.getElementById("reaction-number-" + reactionName).textContent;
- if (num == "") {
+ var num = document.getElementById('reaction-number-' + reactionName)
+ .textContent;
+ if (num == '') {
return 0;
}
return parseInt(num);
}
function initializeArticleReactions() {
- setTimeout(function () {
- if (document.getElementById("article-body")) {
- var articleId = document.getElementById("article-body").dataset.articleId;
- if (document.getElementById("article-reaction-actions")) {
-
+ setTimeout(function() {
+ if (document.getElementById('article-body')) {
+ var articleId = document.getElementById('article-body').dataset.articleId;
+ if (document.getElementById('article-reaction-actions')) {
var ajaxReq;
var thisButt = this;
if (window.XMLHttpRequest) {
ajaxReq = new XMLHttpRequest();
} else {
- ajaxReq = new ActiveXObject("Microsoft.XMLHTTP");
+ ajaxReq = new ActiveXObject('Microsoft.XMLHTTP');
}
- ajaxReq.onreadystatechange = function () {
+ ajaxReq.onreadystatechange = function() {
if (ajaxReq.readyState == XMLHttpRequest.DONE) {
var json = JSON.parse(ajaxReq.response);
- json.article_reaction_counts.forEach(function (reaction) {
- setReactionCount(reaction.category, reaction.count)
- })
- json.reactions.forEach(function (reaction) {
- if (document.getElementById("reaction-butt-" + reaction.category)) {
- showUserReaction(reaction.category, "not-user-animated");
+ json.article_reaction_counts.forEach(function(reaction) {
+ setReactionCount(reaction.category, reaction.count);
+ });
+ json.reactions.forEach(function(reaction) {
+ if (
+ document.getElementById('reaction-butt-' + reaction.category)
+ ) {
+ showUserReaction(reaction.category, 'not-user-animated');
}
- })
-
+ });
}
- }
- ajaxReq.open("GET", "/reactions?article_id=" + articleId, true);
+ };
+ ajaxReq.open('GET', '/reactions?article_id=' + articleId, true);
ajaxReq.send();
}
}
- var reactionButts = document.getElementsByClassName("article-reaction-butt")
+ var reactionButts = document.getElementsByClassName(
+ 'article-reaction-butt',
+ );
for (var i = 0; i < reactionButts.length; i++) {
- reactionButts[i].onclick = function (e) {
- reactToArticle(articleId, this.dataset.category)
+ reactionButts[i].onclick = function(e) {
+ reactToArticle(articleId, this.dataset.category);
};
}
if (document.getElementById('jump-to-comments')) {
@@ -81,7 +90,7 @@ function initializeArticleReactions() {
});
};
}
- }, 3)
+ }, 3);
}
function reactToArticle(articleId, reaction) {
@@ -92,18 +101,20 @@ function reactToArticle(articleId, reaction) {
hideUserReaction(reaction);
setReactionCount(reaction, currentNum - 1);
} else {
- showUserReaction(reaction, "user-animated");
+ showUserReaction(reaction, 'user-animated');
setReactionCount(reaction, currentNum + 1);
}
}
- var userStatus = document.getElementsByTagName('body')[0].getAttribute('data-user-status');
+ var userStatus = document
+ .getElementsByTagName('body')[0]
+ .getAttribute('data-user-status');
sendHapticMessage('medium');
- if (userStatus == "logged-out") {
- showModal("react-to-article");
+ if (userStatus == 'logged-out') {
+ showModal('react-to-article');
return;
} else {
toggleReaction();
- document.getElementById("reaction-butt-" + reaction).disabled = true;
+ document.getElementById('reaction-butt-' + reaction).disabled = true;
}
function createFormdata() {
@@ -112,26 +123,26 @@ function reactToArticle(articleId, reaction) {
* The logic can be seen in sendFetch.js.
*/
var formData = new FormData();
- formData.append("reactable_type", "Article");
- formData.append("reactable_id", articleId);
- formData.append("category", reaction);
+ formData.append('reactable_type', 'Article');
+ formData.append('reactable_id', articleId);
+ formData.append('category', reaction);
return formData;
}
getCsrfToken()
- .then(sendFetch("reaction-creation", createFormdata()))
- .then(function (response) {
+ .then(sendFetch('reaction-creation', createFormdata()))
+ .then(function(response) {
if (response.status === 200) {
return response.json().then(() => {
- document.getElementById("reaction-butt-" + reaction).disabled = false;
+ document.getElementById('reaction-butt-' + reaction).disabled = false;
});
} else {
toggleReaction();
- document.getElementById("reaction-butt-" + reaction).disabled = false;
+ document.getElementById('reaction-butt-' + reaction).disabled = false;
}
})
- .catch(function (error) {
+ .catch(function(error) {
toggleReaction();
- document.getElementById("reaction-butt-" + reaction).disabled = false;
- })
+ document.getElementById('reaction-butt-' + reaction).disabled = false;
+ });
}
diff --git a/app/assets/javascripts/initializers/initializeFooterMod.js b/app/assets/javascripts/initializers/initializeFooterMod.js
index 788fc85cb..e64950ec4 100644
--- a/app/assets/javascripts/initializers/initializeFooterMod.js
+++ b/app/assets/javascripts/initializers/initializeFooterMod.js
@@ -1,7 +1,10 @@
function initializeFooterMod() {
- var footerContainer = document.getElementById("footer-container");
+ var footerContainer = document.getElementById('footer-container');
if (
- footerContainer && document.getElementById('page-content').className.indexOf('stories-show') > -1 && !document.getElementById('IS_CENTERED_PAGE')
+ footerContainer &&
+ document.getElementById('page-content').className.indexOf('stories-show') >
+ -1 &&
+ !document.getElementById('IS_CENTERED_PAGE')
) {
document
.getElementById('footer-container')
diff --git a/app/assets/javascripts/initializers/initializePWAFunctionality.js b/app/assets/javascripts/initializers/initializePWAFunctionality.js
index 0bb53cc63..fb0009197 100644
--- a/app/assets/javascripts/initializers/initializePWAFunctionality.js
+++ b/app/assets/javascripts/initializers/initializePWAFunctionality.js
@@ -15,21 +15,21 @@ function initializePWAFunctionality() {
e.preventDefault();
window.location.reload();
};
- var isTouchDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|DEV-Native-ios/i.test(navigator.userAgent);
+ var isTouchDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|DEV-Native-ios/i.test(
+ navigator.userAgent,
+ );
if (!isTouchDevice) {
- var domain = window.location.protocol + '//' + window.location.host
- var links = document.getElementsByTagName("a");
- for(var i=0, max=links.length; i
- This feature is in internal alpha testing mode.
- This feature is in internal alpha testing mode. Posting on behalf of org spends org credits.
+ Posting on behalf of org spends org credits.
+
-
- Contact
- {' '}
- {openedListing.author.name}
- {' '}
- via DEV Connect
-
+ Contact {openedListing.author.name} via DEV Connect
- {' '}
-IMAGES
+
IMAGES
{moreConfigBottomButton}
diff --git a/app/javascript/article-form/elements/moreConfig.jsx b/app/javascript/article-form/elements/moreConfig.jsx
index 19d5abebc..3c07268c0 100644
--- a/app/javascript/article-form/elements/moreConfig.jsx
+++ b/app/javascript/article-form/elements/moreConfig.jsx
@@ -70,12 +70,8 @@ export default class MoreConfig extends Component {
/>
- Change meta tag
- {' '}
-
canonical_url
- {' '}
-if this post was first published elsewhere
- (like your own blog)
+ Change meta tag canonical_url if this post was first
+ published elsewhere (like your own blog)
+
- )
+ );
};
-
render() {
const article = this.props.resource;
let heartReactedClass = '';
@@ -161,15 +168,10 @@ export default class Article extends Component {
src={article.user.profile_image_90}
alt={article.user.username}
/>
-
- {article.user.name}
- {' '}
-
+ {article.user.name}
{' '}
- |
- {' '}
- {article.readable_publish_date}
+ | {article.readable_publish_date}
@@ -179,9 +181,18 @@ export default class Article extends Component {
- @
- {user.user.username}
- {' '}
- -
- {' '}
- {user.title}
-
- {' '}
+
@
+ {user.user.username} - {user.title}
+ {' '}
{invite}
Danger Zone
- You have left this channel
- {' '}
+ You have left this channel{' '}
😢😢😢
diff --git a/app/javascript/chat/channels.jsx b/app/javascript/chat/channels.jsx
index 625472ded..6fd63bdf5 100644
--- a/app/javascript/chat/channels.jsx
+++ b/app/javascript/chat/channels.jsx
@@ -18,13 +18,13 @@ const Channels = ({
const isUnopened =
new Date(channel.channel_last_message_at) > new Date(lastOpened) &&
channel.channel_messages_count > 0;
- let newMessagesIndicator = isUnopened ? 'new' : 'old';
+ let newMessagesIndicator = isUnopened ? 'new' : 'old';
if (incomingVideoCallChannelIds.indexOf(channel.chat_channel_id) > -1) {
newMessagesIndicator = 'video';
}
const otherClassname = isActive
- ? 'chatchanneltab--active'
- : 'chatchanneltab--inactive';
+ ? 'chatchanneltab--active'
+ : 'chatchanneltab--inactive';
return (
- )
- })
+ );
+ });
let topNotice = '';
if (
expanded &&
@@ -66,11 +70,9 @@ const Channels = ({
;
+ channelConfigImage = (
+
+ );
} else {
channelHeaderInner = (
);
- channelConfigImage =
;
+ channelConfigImage = (
+
+ );
}
- if (this.state.activeContent[this.state.activeChannelId] && this.state.activeContent[this.state.activeChannelId].type_of) {
+ if (
+ this.state.activeContent[this.state.activeChannelId] &&
+ this.state.activeContent[this.state.activeChannelId].type_of
+ ) {
channelConfigImage = '';
}
channelHeader = (
- Listings Made:
- {' '}
- {userListings.length}
-
+ Listings Made: {userListings.length}
) : (
- Listings Made:
- {' '}
+ Listings Made:{' '}
{
organizationListings.filter(
listing => listing.organization_id === selected,
@@ -89,15 +84,10 @@ export class ListingDashboard extends Component {
const creditCount = (selected, userCreds, organizations) => {
return selected === 'user' ? (
-
- Credits Available:
- {' '}
- {userCredits}
-
+ Credits Available: {userCredits}
) : (
- Credits Available:
- {' '}
+ Credits Available:{' '}
{organizations.find(org => org.id === selected).unspent_credits_count}
);
diff --git a/app/javascript/listings/listingForm.jsx b/app/javascript/listings/listingForm.jsx
index e14f520cb..d02d988b0 100644
--- a/app/javascript/listings/listingForm.jsx
+++ b/app/javascript/listings/listingForm.jsx
@@ -28,13 +28,13 @@ export default class ListingForm extends Component {
categoriesForDetails: this.categoriesForDetails,
organizations,
organizationId: null, // change this for /edit later
- }
+ };
}
handleOrgIdChange = e => {
const organizationId = e.target.selectedOptions[0].value;
- this.setState({ organizationId })
- }
+ this.setState({ organizationId });
+ };
render() {
const {
@@ -48,36 +48,52 @@ export default class ListingForm extends Component {
organizations,
organizationId,
} = this.state;
- const orgArea = (organizations && organizations.length > 0) ? (
-
- All private interactions - {' '} - must - {' '} -abide by the - {' '} + All private interactions must abide by the{' '} code of conduct
diff --git a/app/javascript/listings/singleListing.jsx b/app/javascript/listings/singleListing.jsx index 42fc51ab0..cfb98b578 100644 --- a/app/javascript/listings/singleListing.jsx +++ b/app/javascript/listings/singleListing.jsx @@ -53,7 +53,12 @@ export const SingleListing = ({
+ Ben Halpern
+
+
+ Krusty the Clown
+
+
+ dev.to staff
+
+
+ community!
+ + DEV is where programmers share ideas and help each other grow. It’s a global community for contributing and discovering great ideas, having debates, and making friends. +
++ A couple quick questions for you before you get started... +
+{previousLocation}
+
+ );
+ }
+ return null;
+ };
+
+ return (
+ {user.summary}
+
+ community!
+ + DEV is where programmers share ideas and help each other grow. It’s + a global community for contributing and discovering great ideas, + having debates, and making friends. +
+A couple quick questions for you before you get started...
+